Configuration reference

RavenClaws uses a layered configuration system. Each layer overrides the previous one.

  1. Default values (built into the binary)
  2. Config file (ravenclaws.toml in the current directory, or via --config)
  3. Environment variables (prefixed with RAVENCLAWS__, using __ as the separator)
  4. CLI flags (highest priority)

Config file location

By default, RavenClaws looks for ravenclaws.toml in the current directory. You can specify a different path:

shell
ravenclaws --config /path/to/config.toml

Environment variable format

Environment variables use the pattern RAVENCLAWS__SECTION__KEY. For nested keys, use additional __ separators:

environment
export RAVENCLAWS__LLM__PROVIDER="openai"
export RAVENCLAWS__LLM__MODEL="gpt-4o"
export RAVENCLAWS__LLM__ENDPOINT="https://api.openai.com/v1"
export RAVENCLAWS__LLM__API_KEY="sk-..."
export RAVENCLAWS__LLM__MAX_TOKENS="4096"
export RAVENCLAWS__LLM__TEMPERATURE="0.7"
export RAVENCLAWS__LLM__SYSTEM_PROMPT="You are a helpful assistant."

Full configuration

[llm] — LLM provider settings

KeyTypeDefaultDescription
providerstring"litellm"Provider: litellm, openai, openrouter, ollama, anthropic, openai-compatible
endpointstringAPI endpoint URL
api_keystringAPI key (prefer env var RAVENCLAWS__LLM__API_KEY)
modelstring"gpt-4o-mini"Model name
max_tokensinteger4096Maximum tokens in response
temperaturefloat0.7Response temperature (0.0–2.0)
system_promptstringSystem prompt / persona
max_historyinteger50Max conversation turns to retain

[runtime] — Runtime settings

KeyTypeDefaultDescription
max_iterationsinteger25Max agent loop iterations
request_timeout_secsinteger120LLM request timeout
sandbox_dirstring"/tmp/ravenclaws"Sandbox working directory
audit_log_pathstring"audit.log"Audit log file path
policy_filestringPolicy allow-list file

[security] — Security settings

KeyTypeDefaultDescription
allowed_shell_commandsarray[]Allowed shell commands (empty = deny all)
allowed_pathsarray[]Allowed file system paths
allowed_domainsarray[]Allowed network domains
sandbox_enabledbooleantrueEnable sandboxed execution

[swarm] — Swarm settings

KeyTypeDefaultDescription
max_workersinteger100Maximum number of swarm workers
profilesarrayWorker personality profiles (array of tables)
topologystring"star"Swarm topology: star, mesh, hierarchical, hybrid

[heartbeat] — Heartbeat settings

KeyTypeDefaultDescription
goalstringRequired. Agent's autonomous mission prompt
tick_interval_secsinteger300Sleep interval between cycles (seconds)
max_ticksinteger0Max ticks (0 = unlimited)
max_iterations_per_tickinteger5Max agent loop iterations per tick
enable_toolsbooleantrueEnable tool calling during heartbeat ticks
workdirstring"/workspace"Working directory for state persistence

[background] — Background task settings

KeyTypeDefaultDescription
tasks_dirstring"background-tasks"Task persistence directory
max_concurrentinteger10Max concurrent background tasks

[scheduler] — Scheduler settings

KeyTypeDefaultDescription
triggersarray[]Trigger configurations (cron, webhook, file-watch)

[server] — HTTP server settings

KeyTypeDefaultDescription
hoststring"0.0.0.0"Server bind address
portinteger8080Server port

[telemetry] — OpenTelemetry settings

KeyTypeDefaultDescription
otel_disabledbooleantrueDisable OpenTelemetry tracing (opt-in)
otel_endpointstring"http://localhost:4317"OTLP collector endpoint
otel_service_namestring"ravenclaws"Service name for traces

Example configurations

Minimal (LiteLLM)

ravenclaws.toml
[llm]
provider = "litellm"
endpoint = "http://localhost:4000"
api_key = "sk-litellm-key"
model = "gpt-4o-mini"

Secure sandbox with policy

ravenclaws.toml
[llm]
provider = "ollama"
endpoint = "http://localhost:11434"
model = "llama3.1"

[runtime]
sandbox_dir = "/var/lib/ravenclaws/sandbox"
audit_log_path = "/var/log/ravenclaws/audit.log"

[security]
allowed_shell_commands = ["ls", "cat", "grep", "find"]
allowed_paths = ["/var/lib/ravenclaws/data"]
allowed_domains = ["api.github.com"]
sandbox_enabled = true

Swarm mode

ravenclaws.toml
[llm]
provider = "openai"
api_key = "${OPENAI_API_KEY}"
model = "gpt-4o"

[swarm]
max_workers = 3
topology = "star"

[[swarm.profiles]]
name = "coder"
persona = "You are an expert software engineer."

[[swarm.profiles]]
name = "researcher"
persona = "You are a thorough research analyst."

[[swarm.profiles]]
name = "reviewer"
persona = "You are a meticulous code reviewer."

CLI flags

FlagDescription
--config <path>Config file path
-m, --mode <mode>Agent mode: single, swarm, or supervisor (default: single)
-e, --exec <prompt>One-shot execution mode
-R, --replInteractive REPL mode
--serveHTTP server mode (long-running with /health, /ready, /metrics)
--mcp-serverMCP server mode (expose tools over stdio via MCP protocol)
--mcp-command <cmd>MCP client command (stdio transport)
--mcp-args <args>MCP client arguments (space-separated)
--mcp-env <vars>MCP client environment variables (KEY=VALUE, comma-separated)
--heartbeatAutonomous heartbeat mode (persistent assess→plan→act→sleep loop)
--heartbeat-goal <text>Goal prompt for heartbeat mode
--heartbeat-tick-interval <secs>Tick interval in seconds (default: 300)
--heartbeat-max-ticks <N>Maximum ticks (0 = unlimited)
--heartbeat-session <id>Heartbeat session ID for resuming
--swarm-topology <type>Swarm topology: star, mesh, hierarchical, hybrid (default: star)
--swarm-max-depth <N>Maximum recursion depth for hierarchical swarm (default: 3)
--swarm-max-workers <N>Maximum workers in the swarm (default: 100)
--swarm-dynamic-rolesEnable dynamic role assignment in swarm mode
--swarm-profiles <path>Worker profiles file path (JSON)
--swarm-communicationEnable inter-agent communication in swarm mode
--swarm-health-monitoringEnable swarm health monitoring
--backgroundSubmit a background task and return immediately
--task-status <id>Check status of a background task
--task-listList all background tasks
--task-cancel <id>Cancel a background task
--task-resumeResume incomplete background tasks on startup
--schedulerRun the scheduler with configured triggers (cron, webhook, file-watch)
--eval <path>Run eval suite from config file
--eval-jsonOutput eval results as JSON
--provider <name>Override LLM provider: litellm, openai, openrouter, ollama, anthropic, openai-compatible
--endpoint <url>Override LLM endpoint URL
--model <name>Override model name
--system-prompt <text>Override system prompt
--require-approvalRequire human approval for sensitive tool calls (HITL)
--max-iterations <N>Maximum iterations for the agent loop (default: 10)
--token-budget <N>Token budget per run (stops when exceeded)
--retry-max <N>Retry max attempts (default: 3)
--retry-base-delay-ms <N>Retry base delay in ms (default: 100)
--fallback-chain <providers>Enable provider fallback chain (comma-separated)
--server-host <host>HTTP server host (overrides config)
--server-port <port>HTTP server port (overrides config)
--webhook-port <port>Webhook server port (default: 9090)
--otel-endpoint <url>OpenTelemetry OTLP gRPC endpoint
--otel-service-name <name>OpenTelemetry service name
--otel-disabledDisable OpenTelemetry tracing
-v, --verboseEnable verbose logging
-V, --versionPrint version and exit
-h, --helpPrint help and exit