agents key. Each entry is a named agent with its own model, instruction, toolsets, and optional behavior configuration.
Full schema
Fields
Model reference. Either an inline
provider/model-name string (e.g., openai/gpt-4o) or the name of a model defined in the top-level models section.Short description of the agent’s purpose. Used by coordinator agents to decide which sub-agent to delegate to.
System prompt that defines the agent’s behavior, personality, and constraints. Supports multi-line YAML strings with
|.List of tool configurations. Each entry is an object with at minimum a
type field. See Tools for all toolset types and options.Names of other agents this agent can delegate tasks to. Adding sub-agents automatically enables the
transfer_task tool. See Multi-Agent.Automatic model failover configuration. See Fallback configuration below.
When
true, injects the current date into the agent’s context at the start of each session.When
true, injects working directory, OS, CPU architecture, and git repository info into the agent’s context.List of file paths whose contents are appended to the system prompt. Useful for including coding standards, guidelines, or additional context files.
When
true, adds agent descriptions as a parameter in tool schemas. Helps with tool selection in multi-agent scenarios.When
true, formats tool responses in a code-optimized format with structured output schemas. Useful for MCP gateway and programmatic access.Maximum number of tool-calling loops.
0 means unlimited. Set this to prevent runaway loops — a value of 20–50 is typical for development agents.Maximum number of tool calls the agent can make in a row without an intermediate model response.
0 means unlimited.Limit the number of conversation history messages sent to the model.
0 sends all messages. Useful for managing context window size in long conversations.Names of RAG configurations to attach as retrieval tools. References sources defined in the top-level
rag section. See RAG.Enable skill discovery.
true loads skills from standard local directories. Pass a list of URLs to also load remote skills.Named prompts that can be run with
/command_name in the TUI or docker agent run config.yaml /command_name from the CLI. See Named commands.Message displayed to the user when a session starts. Useful for providing context or instructions.
List of A2A agent names this agent can delegate to. See A2A Protocol.
Constrain agent output to match a JSON schema. See Structured output.
Fallback configuration
Agents can automatically fail over to backup models when the primary fails or is rate-limited.Ordered list of fallback models to try. Each entry can be an inline
provider/model string or a named model from the models section.Number of retries per model with exponential backoff. Applies to retryable errors (5xx, timeouts). Use
-1 to disable retries entirely.How long to stick with a successful fallback before retrying the primary. Triggered after a non-retryable error (e.g., HTTP 429). Uses Go duration format:
30s, 1m, 2m30s.| Error type | Behavior |
|---|---|
| HTTP 5xx, 408, network timeout | Retry same model with exponential backoff |
| HTTP 429 (rate limit) | Skip to next fallback model |
| HTTP 4xx (client error) | Skip to next fallback model |
Named commands
Define reusable prompt shortcuts callable from the TUI or CLI:Welcome message
Display a message when users start a session:Deferred tool loading
Usedefer: true on a toolset to load its tools on-demand and speed up agent startup: