AI Assistant
The AI Assistant is a conversational interface powered by interactive AI engines that supports arbitrary tasks through configurable session templates. Each template defines a persona, tools, MCP servers, and working directory — so you can create sessions tailored to specific workflows, from generating Axiom configuration to general-purpose coding assistance.
Out of the box, Axiom ships three built-in templates you can start sessions from: a Configuration Assistant for creating and updating tools, action types, toolsets, event sources, subscriptions, workflows, and session templates, a General Assistant for open-ended tasks, and a Subject Assistant for working within the context of a specific subject. A fourth built-in template, Workflow Workbench, drives the AI Assistant of the Workflow Workbench; it only works inside the workbench, so the template picker does not list it. You can also create your own templates to define custom workflows.
AI help in other pages
The AI Assistant is the general conversational interface. The Workflow Workbench has its own AI assistant, built into the workbench page, that works on the workflow, action types and tools of a composition; see Workflow Workbench. The action type and tool editors no longer have their own AI Assistant buttons; use the Workbench or a Configuration Assistant session instead.
Note
The AI Assistant requires at least one registered agent that supports interactive
sessions (currently claude-code or opencode). A session template can select
which agent type to use; if none is specified, the template falls back to the
instance's default agent type. If OpenCode capability checks fail at startup,
session creation using an OpenCode-backed template is rejected with a compatibility
error.
MCP servers configured on a template are available to both Claude Code and OpenCode sessions. For
OpenCode, Axiom writes them to an opencode.json file in the session directory and starts the
session's opencode serve process with OPENCODE_CONFIG pointing at it. MCP servers from your global
OpenCode configuration are also loaded. If a configured MCP server fails to connect, the session shows a
warning message with the error reported by OpenCode.
OpenCode sessions run in the same working directory as Claude Code sessions: the template's working
directory if set, otherwise the subject workspace for subject sessions, otherwise a directory created
inside the session directory. The template's environment variables and, for subject sessions only,
AXIOM_SUBJECT_ID, AXIOM_SUBJECT_NAME, AXIOM_REF, and AXIOM_REPOSITORY are passed to the
session's opencode serve process, so they are available to OpenCode's tools and MCP servers.
Environment variables (including template secrets) are visible to the agent's tools, for example its
shell tool. Like Claude Code with CLAUDE.md, OpenCode also loads project-level configuration
(opencode.json, .opencode/, AGENTS.md) from the working directory and its git repository;
project-level opencode.json settings are applied after Axiom's generated config and can override
them (for example MCP servers or permissions).
For OpenCode sessions, the template's Allowed Tools are written as OpenCode permission rules:
listed tools (for example Read(*), Bash(ls *) or mcp__axiom__axiom_list_tools) run without
asking, and any other tool asks for approval in the chat. Auto-approval rules apply to these
requests. Denying a request makes that tool call fail and ends the current reply; send a new
message to continue. When a template has no allowed tools, OpenCode's default permissions apply.
With Read(*) allowed, .env files are read without prompting (the same as Claude Code).
OpenCode may ask a second time for the same tool call, for example to access a directory outside
the session working directory; this prompt appears on the same tool block.
The template's system prompt, including subject context for subject sessions, is applied to both engines.
Claude Code receives it with --append-system-prompt; OpenCode receives it as the system prompt of every
message, added to OpenCode's own system prompt.
OpenCode sessions use the template's model (in provider/model form, for example
github-copilot/claude-sonnet-5), or axiom.agent.opencode.model when the template has none. The model
is checked against the providers OpenCode has configured; if it is not available, the chat shows a warning
and the session falls back to axiom.agent.opencode.model, or to OpenCode's own default model if that is
also unavailable (in which case the session header shows no model).
Each OpenCode session's local server is protected with a generated password (a template value for
OPENCODE_SERVER_PASSWORD is ignored). If the connection to OpenCode drops, Axiom reconnects and shows a
notice that some updates may be missing. If stopping a reply fails, a notice is shown and the session
keeps running.
OpenCode sessions support slash commands: type / to list OpenCode's commands (for example /init).
Commands run without the template's system prompt, because OpenCode's command endpoint cannot carry one.
An unknown /name is sent to the model as ordinary text.
/clear starts a fresh OpenCode conversation in the same session. When OpenCode runs a subagent (its
task tool), the subagent appears as a subagent card with its progress, and its permission requests
appear on that card.
Accessing the Assistant
Click the robot icon (AI Assistant) in the top-right corner of the Axiom masthead. The icon throbs until you click it for the first time. It is shown only when an interactive AI engine is available.
This takes you to the AI Assistant page (/assistant), where you can create a new session
or resume an existing one.
Session Templates
Session templates define the behavior and capabilities of an AI Assistant session. Each template specifies:
| Field | Purpose |
|---|---|
| Name / Description | Display name and summary shown in the template picker. |
| System Prompt | Markdown instructions passed to the active interactive engine. |
| Welcome Message | First message shown in the chat, attributed to the assistant. |
| Agent Type | Optional override selecting which registered agent type (claude-code, opencode) drives sessions created from this template. Falls back to the instance's default agent type when unset. |
| Working Directory | Absolute path for the session. If empty, Axiom creates a temporary directory under ~/.axiom/assistant/sessions/. For subject-scoped sessions, defaults to the subject workspace. |
| Initial Message | Optional message automatically sent to the AI when a session starts. Supports {{subjectName}} placeholder. |
| Model | Optional AI model override (e.g., a specific Claude model). |
| MCP Servers | Built-in Axiom servers (@axiom-*) and configured MCP servers to start for the session. Servers whose tools are listed in Allowed Tools are added automatically; a selected server that does not exist stops the session from starting. See MCP Servers. |
| Allowed Tools | Tool patterns for --allowedTools (e.g., Read(*), Bash(ls *)). Use @ToolsetName to include all tools from a toolset. |
| Init Script | Optional startup script executed when the session is created (see Init Scripts below). |
| Environment | Optional key-value environment variables for the interactive engine process, the only variables it gets beyond Axiom's own. Values support ${secret:NAME} syntax; secrets are not injected automatically, and a missing secret stops the session from starting. |
Built-in Templates
Axiom ships four built-in templates:
- Axiom Configuration Assistant (
axiom-config-assistant) — purpose-built for creating and updating Axiom configuration items (tools, action types, toolsets, event sources, subscriptions, workflows, and session templates) with a two-panel layout and Apply workflow. - General Assistant (
general-assistant) — a minimal template for open-ended tasks with no sidebar or special behavior. - Subject Assistant (
subject-assistant) — scoped to a specific Axiom subject, with the working directory set to the subject workspace and access to subject-specific MCP tools for querying tasks, events, and the discussion thread. - Workflow Workbench (
axiom-workbench) — the template behind the Workflow Workbench's AI Assistant. It works on a workbench composition through theaxiom-workbenchMCP server; use it from the Workbench rather than from the AI Assistant page.
Built-in templates cannot be deleted, and most of their fields are locked. You can clone the General, Subject and Workflow Workbench templates to create fully editable copies; the Configuration Assistant cannot be cloned.
Customizing Built-in Templates
The Engine, Model and Environment of each built-in template can be customized per deployment from the template's detail page. Customized fields are marked Modified, and the template list shows a Customized label. Click Reset to defaults to discard all customizations and restore the shipped values; Axiom asks for confirmation before resetting. For any other change, clone the template instead. Cloning a customized built-in template copies its current (customized) engine, model and environment into the new template.
Customizations are stored in Axiom's database and are not included in configuration packs, so exporting
and importing a pack does not carry them over. They are also available through the REST API at
/api/v1/assistant/templates/{templateId}/overrides (GET, PUT, and DELETE to reset); template
responses list customized fields in overriddenFields.
User-Defined Templates
You create and manage custom templates from Components > AI Assistant (the AI Assistant
Templates page, /session-templates). Click Create Template to add one. Each
template supports all the fields listed above, giving you full control over the
assistant's persona and capabilities.
Init Scripts
Init scripts run once when a session is created, before the interactive engine starts. They execute in the session's working directory and are useful for preparing the environment — cloning a repository, installing dependencies, fetching data, or writing config files that the assistant will need during the conversation.
Script types:
| Type | Runner | Use when |
|---|---|---|
| Bash | /bin/bash |
Shell commands, git operations, file manipulation, package installs |
| Node.js | node |
Fetching data from APIs, generating config files, complex setup logic |
Select the script type from the Init Script tab dropdown when editing a template. Write the script body in the editor below it.
Timeout: Init scripts have a 60-second timeout. If the script does not exit within 60 seconds, or exits with a non-zero status, session creation fails and an error is shown. Keep scripts focused on quick setup tasks — long-running operations should be handled by the assistant itself during the conversation.
Environment: Init scripts do not inherit the template's environment variables.
Template environment variables (including resolved ${secret:NAME} references) are
injected into the interactive engine process, which starts after the init script finishes. If
your init script needs credentials (e.g., for git clone or API calls), they must be
available through the server's own environment or set up by other means.
Common use cases:
- Clone a repository —
git clonea repo into the working directory so the assistant can work on it immediately. - Install dependencies — run
npm install,pip install -r requirements.txt, ormvn dependency:resolveto prepare the project. - Write configuration files — generate
.env,settings.json, or other config files that the assistant or its tools will need. - Fetch context — download issue details, pull request metadata, or other context from external APIs and save it to a file the assistant can read.
Example (bash):
#!/bin/bash
# Clone a specific repo branch into the working directory
git clone --branch main --depth 1 \
https://${GH_TOKEN}@github.com/my-org/my-repo.git .
npm install
Example (Node.js):
const fs = require("fs");
const resp = await fetch("https://api.github.com/repos/my-org/my-repo/issues/42", {
headers: { Authorization: `Bearer ${process.env.GH_TOKEN}` },
});
const issue = await resp.json();
fs.writeFileSync("context.json", JSON.stringify(issue, null, 2));
Security: Init scripts run unsandboxed
Init scripts execute as the same OS user that runs the Axiom server process. There is no sandboxing, filesystem restriction, or network isolation — the only guard is the 60-second timeout. This means anyone who can create or edit a session template can run arbitrary code on the server with the server's full privileges.
Recommendations:
- Restrict template creation to trusted administrators. Treat the ability to create or edit session templates as equivalent to shell access on the server.
- If Axiom is deployed in a multi-tenant or untrusted environment, consider running the server under a restricted service account with minimal filesystem and network permissions, or use container-level isolation to limit the blast radius of init scripts.
Creating a Session
- Click New Session on the Assistant page.
- A template picker modal appears. Browse or search available templates — each shows its name and description.
- Select a template.
- A name modal appears with an auto-generated fun name (e.g., "rocket-penguin-waffle"). You can accept or change it.
- Click Create to start the session.
Axiom supports a limited number of concurrent sessions (default: 3, configurable via
axiom.assistant.max-sessions).
The Session Interface
Header Toolbar
The session header toolbar provides quick access to session controls and status:
- Session name — displayed prominently, editable inline via the pencil icon
- Plan Mode — an orange label appears when the assistant is in plan mode
- Engine — a label showing the interactive engine (Claude Code or OpenCode)
- Model — shows the AI model in use for this session
- Running cost — real-time cost display (e.g.,
$0.0342) that accumulates per turn; hover to see input and output tokens. When the engine reports no cost, the token count is shown instead - Subject — for subject sessions, a label linking to the subject
- Apply All — imports generated items (Config Assistant sessions only; disabled when no items exist)
- Allow All — a switch that, after a confirmation, approves every tool request in the session without prompting
- Auto-approval badge — shield icon with a count of active auto-approval rules (shown when at least one rule exists)
- End Session — stops the session with a confirmation prompt
- Open in new window — opens the session in a dedicated browser tab (breakout window) for a focused, full-screen experience
Chat Panel
The chat panel is a conversation interface where you interact with the assistant:
- Your messages appear right-aligned in blue bubbles
- Assistant messages appear left-aligned in grey, with full markdown rendering (tables, code blocks, lists) via react-markdown
- Tool use blocks are expandable and color-coded by category:
- Green — axiom-sdk tools
- Purple — axiom-tools
- Orange — plan/agent operations
- Teal — AskUser interactions
You can send another message while the assistant is still working; it is queued and answered after the current reply. If a message cannot be delivered, the chat shows a "Message was not delivered" notice. When you stop the assistant, OpenCode discards messages that are still queued, while Claude Code answers them after stopping.
While the assistant is working, a Stop button appears next to Send. It stops the current reply without ending the session, so you can continue the conversation. If the reply can't be stopped, the chat shows a notice.
Slash Commands
Type / in the chat input to see available slash commands. Use arrow keys to navigate
the autocomplete list and Tab or Enter to select a command. The available commands are
populated from the active interactive session runtime.
Permission Prompts
When the assistant needs to use a tool, a permission prompt appears with Allow and Deny buttons. You can also click Allow Pattern... to create an auto-approval rule so similar requests are approved automatically in the future.
With the OpenCode engine, an Always Allow button also appears when OpenCode provides
"always" patterns for the request (for example echo * for a bash command). It approves
the request and tells OpenCode to approve matching requests for the rest of the session.
Hover over the button to see the patterns. Claude Code does not offer this, so the button
does not appear there.
Special permission types have dedicated UX:
- AskUserQuestion — renders structured multi-choice options
- ExitPlanMode — displays the plan as rendered markdown with Approve and Reject buttons
Plan Mode
When the assistant enters plan mode, the session header shows visual indicators: an orange border and a "Plan Mode" label. The plan is rendered as markdown, and you can Approve or Reject it before the assistant proceeds.
Auto-Approval Rules
Auto-approval rules let you skip repetitive permission prompts for trusted tool operations. Each rule defines:
- Tool name — the tool to auto-approve (e.g.,
Read,Bash) - Field name (optional) — a specific input field to match
- Regex pattern (optional) — a regular expression the field value must match
For example, you could auto-approve all Read tool calls where the file path matches
/src/.* to avoid approving every source file read individually.
Rules are scoped to the current session and managed via the shield icon in the toolbar. Click the icon to view active rules or delete individual ones.
Breakout Window
Click the Open in new window icon in the session toolbar to open the session in a dedicated browser tab. This hides the Axiom masthead and sidebar, giving you a focused, full-screen chat experience. The breakout window stays connected to the same session — you can switch between the main window and the breakout at any time.
Cost Monitoring
The session toolbar displays a running cost for the current session (e.g.,
$0.0342). This accumulates in real time as the assistant processes each turn,
tracking input tokens, output tokens, and duration. Use this to monitor how much a
session is consuming, especially for long or complex conversations. The displayed cost is the
session's total, including spend from before any /clear.
Configuration Assistant
The Configuration Assistant template (axiom-config-assistant) provides a
specialized workflow for creating and updating Axiom configuration items. It extends
the standard session interface with a two-panel layout and an Apply workflow.
Two-Panel Layout
- Chat panel (70%) — the standard conversation interface
- Generated Items sidebar (30%) — displays items the assistant has created
Generated Items
As the assistant creates or updates items, they appear in the sidebar. The assistant can work with these types of configuration items:
| Type | What it produces |
|---|---|
| Tools | Script-based tools with parameters, descriptions, and bash script templates |
| Action Types | Agent or script-mode action types with prompt templates, allowed tools, and inputs/outputs |
| Toolsets | Named groups of tools that can be referenced in action types and session templates using @ToolsetName |
| Session Templates | Custom AI Assistant session configurations with a persona, system prompt, MCP servers, and allowed tools |
| Event Sources | Links to GitHub or Jira for the event stream pipeline |
| Subscriptions | Filter expressions and routing rules over the event stream |
| Workflows | Versioned, multi-step automation definitions |
Each item shows its type, name, and validation status — a green checkmark if valid, or a warning/error icon if there are problems. Click any item to open a detail modal showing its full configuration and any validation errors.
The assistant understands the relationships between these items. When it creates an action type that needs a custom tool, it creates the tool first and adds it to the action type's allowed tools list automatically.
When it writes action types, the assistant declares an input for everything the action operates on (issue
reference, repository, ids) and maps those inputs on workflow action nodes from context.* or earlier
outputs — action types never rely on ambient subject data. It also leaves output-format instructions out of
prompts, because Axiom appends the output contract automatically. See
Inputs, Placeholders and Mappings.
Validation
The assistant follows a validate-before-write loop. Before it writes a generated item, it checks the
item with the axiom_validate_item(type, item) MCP tool (or the equivalent REST endpoint
POST /api/v1/assistant/sessions/{sessionId}/validate), fixes any reported problems, and only then writes
the item. The type is one of tool, action-type, toolset, session-template, workflow,
event-source, or subscription.
Validation uses the same rules Axiom uses when importing a configuration pack and on Apply, so an item that passes validation in the session will be accepted by Apply. After an item is written, the assistant still receives validation feedback in real time: any errors are sent back to the assistant as messages, allowing it to fix issues without you having to point them out.
The assistant's system prompt includes a generated reference of every item type, its fields, and worked examples. These examples are checked by Axiom's test suite, so the patterns the assistant copies are known to validate and apply cleanly.
Applying Generated Items
Generated items exist only within the session until you apply them. Nothing is saved to your Axiom configuration until you explicitly click Apply All in the session header.
Apply All first validates every item in the session. If any item has an error, nothing is written and the problems are reported. Otherwise the items are applied to your Axiom configuration in one atomic operation, in dependency order: tools, toolsets, action types, session templates, workflows, event sources, and finally subscriptions. If anything fails part-way, the whole operation is rolled back.
During Apply:
- Items with names matching existing configuration are updated in place; items with new names are created.
- Workflows are published, so they can be started immediately. A workflow whose definition is unchanged from its latest published version is not re-published.
- Subscription routing rules of type
create-workflowmay reference a workflow by name usingworkflowDefinitionNameinstead ofworkflowDefinitionId. The name is resolved to the workflow's id, so a subscription can target a workflow created in the same session. - Event sources and subscriptions created by the assistant are disabled unless the item sets
enabled: true; the assistant is instructed to leave them disabled. Review them and enable them on their detail pages when you are ready for events to flow.
A summary dialog shows what was applied with a breakdown of created and updated counts (e.g., "2 tool(s) created, 1 tool(s) updated"). After applying, the session ends and you are returned to the sessions list.
Warning
If you end a session without applying, all generated items are discarded. This cannot be undone.
Querying Existing Configuration
The Configuration Assistant has access to an MCP server that lets it query your existing Axiom configuration — it can list your current tools, action types, event sources, workflows, and more to understand what is already set up. This is especially useful when updating existing items, as the assistant fetches the current definition before making changes.
Example Conversation
Here is an example of how you might use the Configuration Assistant to create the auto-labeling configuration from the Usage Examples:
You: I want to automatically label new GitHub issues. Create three tools: one to fetch the available labels from a repo, one to fetch an issue's details, and one to apply labels. Then create an action type that uses them.
The assistant will:
- Create
fetch_github_labels,fetch_github_issue, andapply_github_labelstools with appropriate parameters and scripts - Create an
Auto-Label Issueaction type withrefandrepositoryinputs and a prompt template referencing all three tools - Show all four items in the Generated Items panel with validation status
You can then review each item, ask for changes, and apply them all at once.
Managing Sessions
The AI Assistant page lists all sessions with color-coded status labels:
- Starting (blue) — session is initializing
- Running (green) — session is active and ready
- Stopped (grey) — session has ended
- Error (red) — session encountered a problem
You can filter sessions by name or template, and delete sessions with a confirmation modal.
Tips
Configuration Assistant Tips
- Be specific about what you need. "Create a tool that lists GitHub labels for a
repository using the
ghCLI" gives better results than "make a label tool." - Create related items together. The assistant shines when creating a group of items that reference each other — tools plus the action type that uses them, for example.
- Review before applying. Click each generated item in the sidebar to inspect its full configuration and check for validation warnings.
- Iterate in conversation. If something isn't right, tell the assistant what to change rather than starting over. It can read and update the items it already created.
- Update existing items by name. Tell the assistant which item you want to modify and what to change. It will fetch the current definition, apply your changes, and write the updated JSON. When you apply, matching names are updated in place.
- Ask about existing configuration. The assistant can query your current tools, action types, workflows, toolsets, session templates, and other configuration to understand your setup before creating or updating items.
General Tips
- Use breakout windows for focused work. When you need the full screen for a long conversation, open the session in a breakout window to hide the Axiom navigation.
- Set up auto-approval rules early. If you know the assistant will need to read files or run commands repeatedly, create auto-approval rules at the start of the session to avoid repeated permission prompts.
- Use slash commands. Type
/to discover available runtime commands. These give you direct control over the assistant's behavior without typing full instructions. - Monitor costs. Keep an eye on the running cost display in the toolbar, especially during complex multi-step tasks. End sessions when you are done to avoid unnecessary token usage.
- Choose the right template. Use the Configuration Assistant when you need to create or update Axiom configuration items. To build or fix a workflow together with its action types and tools, use the Workflow Workbench. Use the General Assistant or a custom template for everything else.