CLI Agent Delegation
Delegate tasks to external CLI coding tools like Claude Code, Gemini CLI, Codex, Copilot, or Aider.
Tool Name
cli_agent
Parameters
| Key | Type | Default | Description |
|---|---|---|---|
tool | string | โ | Name of the CLI tool to invoke (e.g., "claude", "gemini") |
prompt | string | โ | The prompt/task to send to the CLI tool |
working_dir | string | null | Working directory for command execution |
Default Tools
When cli_agents.enabled = true with no explicit tool configs, these defaults are registered (if the command exists on the system):
| Name | Command | Default Args |
|---|---|---|
| claude | claude | -p --output-format json |
| gemini | gemini | -p --output-format json --sandbox=false |
| codex | codex | exec --json --full-auto |
| copilot | copilot | -p |
| aider | aider | --yes --message |
Discovery
Only tools whose commands are found via
which are registered. Missing tools are silently skipped.Custom Configuration
config.toml
[cli_agents]
enabled = true
timeout_secs = 600
max_output_chars = 16000
[cli_agents.tools.claude]
command = "claude"
args = ["-p", "--output-format", "json"]
description = "Claude Code for coding tasks"
[cli_agents.tools.custom-tool]
command = "/usr/local/bin/my-ai-tool"
args = ["--json"]
description = "My custom AI tool"
timeout_secs = 120Output Extraction
The tool attempts to extract structured output:
- JSON: looks for
result,output,content, ormessagefields - JSONL: takes the last line containing content
- Fallback: returns raw output, truncated to
max_output_chars