AI providers, agents, and output validation
Choose a registered agent and understand model settings, tools, and how structured output reaches the feature.
A provider determines how to call a model. An agent chooses which model, output format, and tools a feature can use. Service runs registered agents through app.ai(). Translation, SEO, and chat each handle their own results and persistence.
Which agent to use
| Job | Agent key | Code default |
|---|---|---|
| Translate content | translation.translate |
JSON, one step, no tools |
| Generate SEO copy | cms.seo.generate |
JSON, one step, no tools |
| Answer a visitor | chat.support |
Text with registered support tools |
| Assist an Admin operator | admin.assistant |
Text with registered Admin assistant tools |
In Admin at /internal/ai, configure the protocol, address, and credential of a registered provider, then choose a provider and model for the agent. A model test uses the entered model ID without updating the saved agent. Admin can override registered settings. To add an agent, provider, or tool, start at the code registry in packages/service/app/ai.ts and the owning feature’s definitions.
Why valid JSON can still be rejected
JSON describes the response format. Translation also validates the source structure, field types, and protected literals such as link destinations, placeholders, and measurement units. A result that alters those constraints can be rejected while the previous translation remains intact. A saved translation and the version at a public URL can advance separately. See localization and publication.
Tool agents validate tool input. Ordinary tool failures are returned to the model as tool results. Cancellation interrupts the run. The owning feature stores any conversation history, such as the chat feature for visitor conversations.
Trace a failure to the right layer
| Symptom | Where to start |
|---|---|
| A model test is rejected | Provider enablement, protocol, address, model ID, and credential |
| The provider responded but the translation was not saved | Business validation, source revision, and translation task status |
| Admin saved new copy but the public page is older | The locale publication task and current public HTML release |
| The assistant can see the page but an action fails | The registered page action, input, principal, and Service response |
Editors can start with the Admin assistant guide. Developers can trace requests and jobs with runtime records.