Overview
The agent.* block controls the agent loop itself: iteration budget, system prompt, session compression, tool-call approval policies, and skills discovery. Every key lives on AgentConfig, CompressionConfig, ApproverConfig, and PatternEntry in internal/config/config.go.
agent.*
| Field | Type | Default | Required | Description | Source |
|---|---|---|---|---|---|
agent.system_prompt |
string | empty (falls back to the built-in prompt in internal/cli/chat.go:systemPrompt) |
no | Overrides the system prompt. Empty uses the sensible default. | AgentConfig.SystemPrompt |
agent.max_iterations |
int | 32 |
no | Hard cap on tool-use loops per turn. Set to 0 to fall back to the default. | AgentConfig.MaxIterations |
agent.skills_dir |
string | empty | no | Directory of agentskills.io-style Markdown files with YAML frontmatter. Empty disables skills discovery. | AgentConfig.SkillsDir |
agent.compression.*
LLM-backed session compression. Disabled by default because subscription-tier providers rarely need it — turn on when running against pay-per-token backends.
| Field | Type | Default | Required | Description | Source |
|---|---|---|---|---|---|
agent.compression.enabled |
bool | false |
no | Toggle the LLM-backed compressor. Off = NoopCompressor. |
CompressionConfig.Enabled |
agent.compression.trigger_messages |
int | 60 |
no | Message count above which compression fires. 0 uses the default. | CompressionConfig.TriggerMessages |
agent.compression.keep_recent |
int | 8 |
no | Recent messages preserved verbatim. 0 uses the default. | CompressionConfig.KeepRecent |
agent.compression.prompt |
string | empty | no | Overrides the default summarisation instruction. | CompressionConfig.Prompt |
agent.approver.*
Picks and configures the tool-call approval policy.
| Field | Type | Default | Required | Description | Source |
|---|---|---|---|---|---|
agent.approver.mode |
string | allow_all |
no | One of allow_all, deny_all, pattern. |
ApproverConfig.Mode |
agent.approver.reason |
string | empty | no | Human-readable reason attached to denials. | ApproverConfig.Reason |
agent.approver.default |
string | empty (deny recommended) |
no | Default fallback for pattern mode. allow or deny. |
ApproverConfig.Default |
agent.approver.allow |
[]PatternEntry | empty | no | Regex allow rules. Only relevant to pattern mode. |
ApproverConfig.Allow |
agent.approver.deny |
[]PatternEntry | empty | no | Regex deny rules. Deny wins over allow. | ApproverConfig.Deny |
PatternEntry
| Field | Type | Description |
|---|---|---|
tool |
string | Tool name (read, write, edit, grep, bash, or a custom tool). |
match |
string | Go regex; matched against the tool call's input rendering. |
Approver modes
Every tool call runs unconditionally. Suitable when the provider is claudecli, which handles its own approvals — no rousseau-side filtering.
agent:
approver:
mode: allow_all
Every tool call is blocked. Useful as a smoke-test or read-only inspection session (the model can still reason, it just cannot touch the filesystem).
agent:
approver:
mode: deny_all
Applies allow/deny regex rules; deny wins over allow; unmatched requests fall back to default.
agent:
approver:
mode: pattern
default: deny
allow:
- {tool: read, match: ".*"}
- {tool: grep, match: ".*"}
- {tool: edit, match: "^\\./workspace/.*"}
- {tool: bash, match: "^(ls|cat|rg|git status|git diff)"}
deny:
- {tool: bash, match: "rm -rf|sudo|:\\(\\)\\{ :\\|:& \\};:"}
- {tool: write, match: "\\.ssh/|\\.aws/|/etc/"}
Environment variable equivalents
| YAML | Env var |
|---|---|
agent.max_iterations |
ROUSSEAU_AGENT_MAX_ITERATIONS |
agent.skills_dir |
ROUSSEAU_AGENT_SKILLS_DIR |
agent.compression.enabled |
ROUSSEAU_AGENT_COMPRESSION_ENABLED |
agent.compression.trigger_messages |
ROUSSEAU_AGENT_COMPRESSION_TRIGGER_MESSAGES |
agent.compression.keep_recent |
ROUSSEAU_AGENT_COMPRESSION_KEEP_RECENT |
agent.approver.mode |
ROUSSEAU_AGENT_APPROVER_MODE |
agent.approver.default |
ROUSSEAU_AGENT_APPROVER_DEFAULT |
List types (allow, deny) must be provided via the YAML file — env vars cannot express them cleanly.