Config Reference
This reference maps directly to crates/core/src/config/toml_types.rs.
Top-Level Structure
[defaults]
[memory]
[budget]
[plugins]
[permissions]
[sandbox]
[hooks]
[session]
[tui]
[tui.colors]
[mcp]
[server]
[providers.<name>]
[agents.<name>]
[wasm_tools.<name>]
[mcp.servers.<name>][defaults]
| Field | Type | Description |
|---|---|---|
model | string | Default model id. |
provider | string | Default provider name. |
mode | string | Default runtime mode. |
[memory]
| Field | Type | Description |
|---|---|---|
enabled | bool | Enable project memory injection. |
max_prompt_lines | integer | Max memory lines injected into prompt. |
[budget]
| Field | Type | Description |
|---|---|---|
hard_cap | float | Hard budget cap. |
soft_cap | float | Soft warning cap. |
warning_threshold_pct | integer | Warning threshold percentage. |
[plugins]
| Field | Type | Description |
|---|---|---|
dirs | array(path) | Plugin discovery directories. |
[providers.<name>]
| Field | Type | Description |
|---|---|---|
type | string | Provider type identifier. |
authentication | string | Authentication mode (for example API key or OAuth). |
api_key_env | string | Env var name for API key lookup. |
base_url | string | Provider API base URL. |
[agents.<name>]
| Field | Type | Description |
|---|---|---|
model | string | Agent-specific model override. |
provider | string | Agent-specific provider override. |
instructions | string | Agent-specific instruction override. |
mode | string | Agent runtime mode. |
tools_allow | array(string) | Tool allowlist rules. |
tools_deny | array(string) | Tool denylist rules. |
mcp_servers | array(string) | MCP server names enabled for this agent. |
max_turns | integer | Per-agent max turns. |
cwd | path | Agent working directory override. |
worktree | bool | Enable isolated worktree for this agent. |
[permissions]
| Field | Type | Description |
|---|---|---|
trust_level | string | Trust level selector. |
preset | string | Permission preset (safe, standard, full). |
allow | array(string) | Explicit allow rules. |
sandbox | array(string) | Sandbox rules. |
ask | array(string) | Escalation rules. |
deny | array(string) | Deny rules. |
default_mode | string | Default policy mode for unresolved calls. |
[sandbox]
| Field | Type | Description |
|---|---|---|
allowed_paths | array(string) | Allowed filesystem roots. |
denied_paths | array(string) | Denied filesystem roots. |
allowed_domains | array(string) | Allowed network domains. |
[hooks]
Each event key takes [{ matcher = "...", hooks = [ ... ] }].
Supported event keys:
session_startuser_prompt_submitpermission_requestpre_tool_usepost_tool_usepost_tool_use_failurestoppre_compactconfig_changesession_endsubagent_startsubagent_stopteammate_idleteammate_idle_warningtask_completednotificationstall_detected
Hook handler variants:
type = "command":command,timeout,async,status_messagetype = "prompt":prompt,model,provider,timeouttype = "agent":prompt,model,provider,tools,max_turns,timeout
[session]
| Field | Type | Description |
|---|---|---|
max_consecutive_errors | integer | Stop after N consecutive errors. |
max_total_errors | integer | Stop after N total errors. |
max_turns | integer | Session turn cap. |
liveness | table | Optional liveness controls. |
[session.liveness]
| Field | Type | Description |
|---|---|---|
enabled | bool | Enable liveness monitoring. |
idle_nudge_after_secs | integer | Seconds before first idle nudge. |
idle_nudge_interval_secs | integer | Interval between nudges. |
max_nudges | integer | Max nudges before escalation. |
idle_warn_after_secs | integer | Seconds before idle warning event. |
stall_timeout_secs | integer | Stall timeout threshold. |
auto_interrupt_stalled | bool | Auto-interrupt stalled runs. |
[tui]
| Field | Type | Description |
|---|---|---|
theme | string | Theme name. |
frame_rate_cap | integer | Max frame rate cap. |
colors | table | Theme color overrides. |
[tui.colors]
Color keys: primary, success, error, warning, muted, accent, text, bg_subtle, border, spinner, text_weak, text_strong, border_focus, info, background.
[wasm_tools.<name>]
| Field | Type | Description |
|---|---|---|
path | string | WASM artifact path. |
capabilities | array(string) | Capability list. |
limits | table | Resource limits. |
secrets | array(string) | Secret names injected at runtime. |
workspace_prefixes | array(string) | Allowed workspace prefixes. |
endpoint_allowlist | array(string) | Allowed outbound endpoints. |
tool_aliases | table(string->string) | Alias names for this tool. |
[wasm_tools.<name>.limits]
| Field |
|---|
max_memory_bytes |
fuel_limit |
execution_timeout_secs |
max_log_entries |
max_http_requests |
max_tool_invocations |
max_file_read_bytes |
[mcp] and [mcp.servers.<name>]
[mcp] contains the servers map.
Server fields:
| Field | Type | Description |
|---|---|---|
enabled | bool | Enable server. |
type | string | Transport type. |
command | string | Command for stdio transport. |
args | array(string) | Command arguments. |
url | string | URL for HTTP transport. |
headers | table(string->string) | HTTP headers. |
env | table(string->string) | Environment variables. |
[server]
| Field | Type | Description |
|---|---|---|
port | integer | Web server port. |
hostname | string | Bind address/hostname. |
password | string | Server password. |
cors | array(string) | Additional CORS origins. |
permission_timeout_secs | integer | Permission response timeout in web mode. |