Features¶
Each feature below has a short video recorded on the same community garden
site: Drupal standard with the shipped toolsets, the editorial workflow and
Anthropic's claude-sonnet-5-5. The first video starts at the login page; the
others start signed in. Waits on the model are shortened, under a "Thinking
sequences shortened" badge, and the replies are the ones the model gave when
the video was recorded.
Every feature needs Site Agent installed with a model chosen and a toolset granted, as Install and first draft sets up. Under each feature, Needs lists what it adds to that, and Set up what to configure.
Drafts and publishing¶
Ask for a page in plain words. The agent reads the content model and writes the page as a draft, which the preview beside the chat shows as visitors will see it. A further request changes the same draft. The agent can't publish: you publish the draft from its card, which checks your workflow transition and that the content hasn't changed since the card was shown. A write that goes live at once, such as a menu link, waits for your approval on a card before it is saved.
Needs
- Content
Moderation,
with a workflow on the content types, and Tool Belt's
tool_belt_content_moderation, so that writes land as drafts. Without a workflow, each write waits for approval and takes effect when approved. - Optional: Content
Deployment with
content_deployment_tools, whose content spec tools the Editor toolset prefers. With them, a new page and an edit run without a prompt, as drafts.
Set up
-
Add the editorial workflow and Tool Belt's moderation tools:
-
At
/admin/config/workflow/workflows/manage/editorial, apply the workflow to the content types. - Grant the role that uses the chat "Use the Editor toolset", create and edit for each content type, "View any unpublished content", "View the latest version", its text formats, and the workflow's transitions.
- Optional: at
/admin/config/ai/site-agent/settings, "Open the chat after logging in" sends those accounts to the chat when they log in. It is on by default.
See Install and first draft and Approvals and publishing.
Chat about a page¶
Each content entity with a page and an edit form has a tab titled with the
agent's name, at the page's path plus /site-agent; with core's Navigation,
it is under More actions. A chat opened there is about that page: the composer
shows its title, and "this page" means it. An edit of a published page is
saved as a draft, and the card compares the draft with what visitors see.
Accounts that may see core's moderated content listing get a "Drafts to
review" link to it.
Needs: nothing more than drafts and publishing.
See Chat.
Images¶
Add an image to a message from the composer's "+" menu, or drop it on the chat: PNG, GIF, JPEG or WebP, up to 10 MiB, up to ten on one message. It is saved privately, and only you may download it. An image has no alt text when it is uploaded, so the agent asks what it shows and uses your words; a write that leaves an image's required alt text empty is refused. Adding the image to the media library publishes the media item, so its card waits for your approval.
Needs
- A private file system. Without one, the composer has no "+" menu, and the status report says so.
- An image media type, such as the one
core/recipes/image_media_typeadds. - Optional: Content Deployment's media ingest tool, which the Editor toolset uses to add an image to the media library.
Set up
-
In settings.php, set the private file path, outside the web root:
-
Grant the role "Image: Create new media".
Revisions¶
Ask what changed in a page's recent revisions and who made each change. The agent lists the revisions and compares them field by field. An earlier revision comes back as a draft, which you publish from its card; the revert is a new revision, with the chat in its log message, so nothing is lost.
Needs: the Site Agent Tool Belt submodule, whose revision tools the Editor toolset offers.
Set up
-
Enable the submodule:
-
Grant the role the revision permissions of its content types, such as "Basic page: View revisions" and "Basic page: Revert revisions".
See Site Agent Tool Belt and Editor.
Bulk changes and terms¶
Ask for several pages at once: up to 25 entities of one type are created or changed in one call, each as a draft. One card lists every item, each with its own Publish, and Publish all publishes each one you may publish. Terms are content too: the agent reads a vocabulary's tree, and moves a term under a new parent live, so each move waits for your approval.
Needs: the Site Agent Tool Belt submodule; Taxonomy for the term tools.
Set up: enable site_agent_tool_belt, and grant the role "Garden topics:
Edit terms" for each vocabulary it arranges, or "Administer vocabularies and
terms".
Translation¶
Ask for a translation from the page's tab. A translation is a draft of its language alone, and its card labels each field with the language and compares it with what that language's visitors see. Each language is published on its own, so publishing a translation leaves the other languages as they are.
Needs: core's Language and Content Translation, and the Site Agent Tool Belt submodule.
Set up
-
Enable the modules:
-
At
/admin/config/regional/language, add the languages. - At
/admin/config/regional/content-language, make the content types translatable. - Grant the role "Create translations", "Edit translations", and "Translate any entity" or each content type's translate permission.
See Editor and Publishing.
Chat history and models¶
Each chat is kept, at its own URL. The history pane lists your chats, newest first; its search matches titles as you type and, with Search API, also finds chats by what was said and what the tools returned. A chat reopens as it ran, with its tool results and cards. Rename or delete a chat from its entry; deleting it keeps the record of the changes it made. Where the site lets users choose, the composer has a model menu, and each chat keeps the model picked for it. Stop ends a turn that is going the wrong way.
Needs
- For searching what was said: Search API 1.40 or later, with its Database Search, for which Site Agent ships an index of chats on the site's own database.
- Optional: Search API Instant, for a search-as-you-type of chats.
- Optional: AI Effort, for an effort slider beside the model menu.
Set up
-
Enable Database Search and index the chats that exist; later changes are indexed as they happen:
-
At
/admin/config/ai/site-agent/settings, turn on "Let users choose the model", and check the models under "Models users may choose".
See Threads and transcripts, Searching chats and Settings.
Site context¶
Editors write the site's voice, standards and rules as AI Context items: some for the whole site, some for a content type or a section. The agent gets the items that apply to the request and the page, and reads the items for a page before drafting it. When you tell it something to remember, it proposes a new item, saved as a draft in AI Context with why it was proposed; no chat gets it until an editor publishes it.
Needs: AI Context 1.0.0-rc1 or later, and the Site Agent AI Context submodule.
Set up
-
Install them:
-
At
/admin/config/ai/context/items, add the items, each with its Context scope: Global for the whole site, or an entity type, a bundle or a site section. - Grant the roles that use the chat "Use Published AI Context in AI Features". To let the agent propose items for them, grant "Create AI Context Item" and the AI Context workflow's Create New Draft transition too.
- Give AI Context's editing permissions, and its publish transition, only to roles trusted to instruct the model.
See Site context.
Content types and fields¶
A Site builder chat builds a site's structure: content types, fields, form and
view displays, image styles and vocabularies. Each change is configuration, so
its card shows the configuration as a YAML diff and waits for your approval.
The agent reads what exists first, and reuses a field storage where it can.
Once a chat has changed configuration, its "Configuration changes" button
lists what differs from the sync directory, to export with drush
config:export and deploy from git.
Needs
- Writable configuration. Configuration is deployed from git, so configuration writes are refused, and left out of the tool list, until a site allows them.
- The Site Agent Tool Belt submodule, for the display tools.
Set up
-
On a development site, allow configuration writes in settings.php. With Config Read-only installed, configuration is writable where
$settings['config_readonly']is not TRUE instead. -
Grant the role "Use the Site builder toolset", and the permissions of the screens it works in, such as "Administer content types", "Content: Administer fields", "Content: Administer form display" and "Content: Administer display".
See Site builder, Configuration changes and Staging and locked configuration.
Site structure¶
The Site builder toolset also changes the basic site settings, views, URL alias patterns, menus, blocks and role permissions. A view with a page is saved disabled, for a person to enable in Views. A permission change is destructive, so it asks every time. Reject a change with a reason: nothing changes, and the agent reads the reason.
Needs
- Writable configuration and the Site builder toolset, as for content types.
- The Site Agent Tool Belt submodule, for the site settings, Views, menu, block and permission tools.
- For URL alias patterns: Pathauto and the Site Agent Pathauto submodule.
Set up
-
Enable the submodules:
-
Grant the role the permissions of the screens each tool mirrors: "Administer site configuration", "Administer views", "Administer menus and menu links", "Administer blocks", "Administer pathauto" and "Administer permissions". Each tool is offered only to accounts that have its permission.
See Site Agent Tool Belt and Site Agent Pathauto.
Webforms¶
The Site Agent Webform submodule builds and changes webforms from the chat, each change shown as its configuration, elements included, for approval. Submissions hold visitors' personal data, and what a tool reads goes to the model's provider, so reading them is a toolset of its own, Webform results, for the roles that may share that data. Listing is pre-approved; reading a submission asks once in each chat. No tool changes or deletes a submission.
Needs: Webform and the Site Agent Webform submodule. Installing it adds the webform tools to the Site builder toolset.
Set up
-
Enable the submodule:
-
Grant the Site builder role Webform's "Create webforms" and "Edit webform source code", or "Administer webforms".
- Grant "Use the Webform results toolset" only to roles that may share submissions with the model's provider.
See Site Agent Webform.
Staging¶
On a development site, content is staged in a workspace and deployed as a changeset. A chat started in Live writes no content, and the agent says to switch to a staging workspace. A chat started in a workspace keeps it, names it, drafts and publishes there, and links to the workspace's changeset export. Exporting the changeset is the approval to publish it on the live site, so no tool does it.
Needs: writable configuration, core's Workspaces, and Content Deployment's
content_deployment_export.
Set up
-
Enable them on the development site:
-
Grant the roles that deploy "Export content deployment changesets", for the chat's export link.
See Staging.
PHP¶
With the Site Agent PHP submodule, the agent writes PHP when its other tools fall short: when no tool does the job, when it would take many calls, or when a tool failed. Its card shows the exact code before it runs, and the code runs as you. The result card shows what it returned and the content it saved, with Publish where it left a draft. The PHP console beside the chat runs PHP as you, and your next message tells the agent what you ran and what it returned.
Needs: the Site Agent PHP submodule, and PsySH, which Drush requires. It is off until settings.php turns it on, so nothing in the UI can turn on code execution.
Set up
-
Enable the submodule:
-
In settings.php, turn PHP on, then rebuild caches:
-
Grant "Run PHP with Site Agent", a restricted permission, only to roles trusted with the site's code, and "Use the Developer toolset" for the agent's PHP tool.
See PHP.
Remote clients¶
The Site Agent MCP submodule offers an account's toolsets to MCP clients outside the site, such as Claude, Claude Code and the MCP Inspector, through the same checks, approvals and audit log as the chat. A pre-approved read runs at once. A call that needs approval is decided in the client: as the card itself in clients that render MCP Apps, such as claude.ai and Claude Desktop, or as a prompt with the card as text in clients that support elicitation, such as Claude Code.
Needs
- MCP Server 2.0.0-beta7 or
later, with
mcp/sdk0.9 or later, and the Site Agent MCP submodule. - For clients that sign in with OAuth, such as Claude's connectors: MCP Server OAuth and Simple OAuth.
Set up
-
Install them:
-
Grant "Access MCP server" and the toolsets' permissions to the roles that connect.
-
Connect a client beside the site over STDIO, as the account given, without OAuth:
Or connect a remote client to
https://SITE/mcpwith OAuth, as Connecting Claude sets up. 4. Optional:drush site-agent:setup-ai --mcp=http --uri=https://SITEcopies the Agent Skill for coding agents into the project and adds the site to its.mcp.json.
See Remote clients.
More features¶
- Settings: the agent's name, the greeting, site conventions added to every system prompt, the tool call rounds per message, and how long transcripts and the audit log are kept. See Settings.
- Toolsets: each entry of a toolset names a tool, its fallbacks and its approval mode: pre-approved, once per chat, or always. Refinements limit or fix a tool's inputs. A chat has the tools of every toolset its account may use. See Toolsets.
- Audit log: every call leaves a record of its tool, arguments, status, who decided and its result. Reports ยป Site Agent refused calls counts the calls refused by access checks. See Approvals and publishing.
- Content search: the agent finds content by its text, best match first. It searches the site's Search API index of content where the Site Agent Search API submodule is enabled, preferring one on Solr, then core Search's index, and otherwise the titles and text fields.
- Locked configuration: on a production site, where configuration is locked, configuration writes leave the tool list and are refused, and content still lands as drafts. See Staging and locked configuration.
- Drush:
drush site-agent:toolslists the tools a toolset gives an account, as the model sees them. See Install and first draft.