Exponential Intelligence (expai) for applications
This page is for application creators who want AI assistance in their application or want to know how it fits.
Exponential Intelligence is the expai extension: a writing assistant in the administration that looks up what it
needs and writes drafts as the signed-in editor, never publishing on its own
(expai). Its full documentation is in its repository and in
extension/expai/doc/.
Contents
- What it does
- Requirements and switching it on
- Data policy, usage and audit
- How applications plug in
- Design rules for AI features
What it does
- The Intelligence tab of a node: a conversation per user and node; each lookup and draft is a step.
- The edit form: fill fields from a brief, field actions (write, rewrite, shorten, translate, suggest), presets per class, an Improve menu, alternative texts for images from a vision model.
- Vector: threads with plan and write modes, staged review, checkpoints, revert.
- Chains and translation sync run through the job queue.
Requirements and switching it on
From the feature page: Exponential 6.0.14 or later, PHP 8.0+ with curl, dom, json, mbstring; ezjscore and
ezformtoken; expqueue for queued work; a provider key or a local model (Anthropic, OpenAI-compatible services, or
Ollama).
- Activate it in each admin siteaccess (
ActiveAccessExtensions[]=expai) or everywhere. - Put keys only in
settings/override/expai.ini.append.php(mode 0640, never committed). - Activate and run
expqueuefor queued work (Queues with expqueue).
Data policy, usage and audit
- A master switch (
[AISettings] Enabled) and a veto hook. - Per provider: a region (
us,eu,local) and retention; rules per section and class. - Every request in a usage log (user IDs only), estimated cost, limits and budgets.
- Every request, draft and draft state change in the audit trail channel
ai; prompts, answers and keys are never recorded. EI: Summary gives a data protection officer one printable page.
How applications plug in
| Need | Mechanism |
|---|---|
| A field action for your class | settings only ([EditViewSettings] FieldActions[]) |
| The assistant reading your data | a tool class, or a read service of expservices with 'ai' => true |
| Another AI service | a provider class or a provider group in settings |
| UI in the panel | a panel section template and JavaScript hooks |
Details and worked examples: Extending Exponential Intelligence.
Design rules for AI features
- AI writes drafts; humans publish. Keep it that way in your own features.
- Run as the user, with the user's permissions.
- Keep secrets in settings, never in prompts or payloads.
- Make cost visible and limited.
Related pages
- Extending Exponential Intelligence
- Queues with expqueue
- Privacy standard
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.