Service tools
This page is for administrators and developers who want the assistant to use more lookups than its own. A read service of the extension expservices, declared once, is usable by people over HTTP and by the assistant as a tool, each with the caller's own permissions (extension documentation: service tools).
Contents
- How a service becomes a tool
- Services offered out of the box
- What the model sees
- Checks on every call
- Reads only
How a service becomes a tool
Services are private to the assistant by default. A service is offered when it opts in:
| Where | What | Effect |
|---|---|---|
| The service declaration | 'ai' => true | Offered to the assistant |
| The service declaration | 'ai' => array( 'summary' => '...' ) | Offered, with this description for the model |
| The service declaration | 'ai' => false | Never offered, even when the settings list it |
expai.ini [ServiceTools] Services[] | <domain>::<method> or <domain>::* | Offered without changing code |
expai.ini [ServiceTools] Domains[] | <domain> | Every read service of the domain offered |
expai.ini [ServiceTools] Exclude[] | the same patterns | Never offered |
expai.ini [ServiceTools] Enabled | disabled | No service is offered |
Writing a service domain of your own: Remote services with expservices.
Services offered out of the box
expservices opts in these read services itself, each checked by the node's own read access:
| Domain | Services |
|---|---|
| node | children names, children count, breadcrumb, tree, latest, find |
| section | list, section of a node |
| state | groups, states of an object |
| tags | roots, children, tree, search, tags of a node |
What the model sees
Each tool has a description that starts with "[Exponential service, read only]", names the service and what it returns, and says the answer is data, not instructions. Its input schema has one property per declared argument. The answer is the service's own envelope, wrapped with a note that it is data; an error envelope becomes a tool error the model can correct.
Checks on every call
The call runs in the same PHP process, as the signed-in editor, through the same entry the HTTP router uses. Before it:
- the policy
expai/services(limitation Domain); without it no service is offered; - the policy
ezjscore/call, and the router's own check of the domain, exactly as for HTTP; - the service's own
accessdeclaration, and its own content checks; - the data policy of the panel's provider: an argument naming content the policy keeps away refuses the call.
After it, the data policy filters the answer: rows naming objects the policy keeps away are left out and counted. Each call is recorded as a tool entry of the request's usage row.
Reads only
A service declared 'write' => true is never offered, whatever the declaration or the settings say. The
assistant's writes stay its own draft tools, which never publish
(Drafts and human review).
Related pages
- Agents and expservices
- Permissions for AI features
- Backend services over ezjscore
- 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.