Provide instant, human-readable explanations for iTop Phrasebook queries by connecting the query editor with the AI backend shipped in the itomig-ai-base extension. The module is authored and maintained by ITOMIG GmbH.
- Adds an Explain (by AI) popup action to every
QueryOQLobject in the Phrasebook. - Sends the selected OQL statement to the configured AI provider and stores the explanation back on the query record.
- Ships with a default system prompt optimised for functional administrators while still allowing full customisation via module settings.
- iTop installation with the
itomig-ai-base v25.2.1enabled and configured (API key, model, …). The extension is published at github.com/itomig-de/itomig-ai-base. - Access to an AI provider supported by
itomig-ai-base(public or hosted by your own).
- Download the latest release archive from the repository and extract it into either
extensions/itomig-ai-explain-oql/inside your iTop installation. - Ensure file ownership and permissions match the rest of your iTop modules.
- Run the iTop setup wizard (CLI or web) to detect the new module and trigger the compilation step.
- Verify that both AI Base and AI Explain OQL are listed as installed modules under Administration → System Information.
All tunables are standard iTop module settings. Add them to conf/production/config-itop.php (or the relevant environment configuration) inside the 'itomig-ai-explain-oql' array:
'itomig-ai-explain-oql' => array(
// Optional: override the system prompt registered with the AI backend.
'system_prompt' => 'You are an experienced iTop administrator. Explain OQL queries clearly and concisely.',
// Optional: attribute code on QueryOQL objects that receives the AI response.
'target_attribute' => 'description',
),When a setting is omitted the helper falls back to its built-in defaults (src/Helper/AIOQLHelper.php:31 and ajax.explain-oql.php:23).
- Open any Phrasebook query (
QueryOQL) in iTop. - Click on Actions → Explain (by AI).
- The request is sent asynchronously. On success the page reloads and the configured attribute (default:
description) contains the generated explanation. - If the AI backend returns an error, a popup displays the translated error message defined in
en.dict.itomig-ai-explain-oql.php.
- Hooks that must always be loaded are listed in
module.itomig-ai-explain-oql.php, matching the ITOMIG extension guidelines. - Composer’s PSR-4 autoloader is already configured (
composer.json). Runcomposer dump-autoload -oafter adding new classes undersrc/. - Translations for the popup action live in
en.dict.itomig-ai-explain-oql.phpandde.dict.itomig-ai-explain-oql.php. iTop discovers these automatically during compilation. - For an in-depth walkthrough on building your own AI-enabled iTop module using the shared base component, follow the public tutorial: Tutorial implement your own iTop AI Extension - EN (PDF).
Distributed under the terms of the GNU Affero General Public License v3.0.