Configuration Files
klaw uses TOML for configuration. Files are stored in~/.klaw/:
Main Configuration
Full Example
Environment Variables
Environment variables override config file values:Variable Reference
Use${VAR_NAME} in config files:
Initialization
Create default configuration:~/.klaw/config.tomlwith defaults~/.klaw/workspace/with template files~/.klaw/agents/directory
Provider Configuration
Anthropic (Direct)
OpenRouter
each::labs
Provider Priority
klaw auto-detects provider in this order:- OpenRouter (if
OPENROUTER_API_KEYset) - each::labs (if
EACHLABS_API_KEYset) - Anthropic (if
ANTHROPIC_API_KEYset)
--provider:
Provider Resilience
Configure retry and fallback behavior per provider:
Retries use exponential backoff starting at 1s, capped at 30s, with 25% random jitter. Retryable errors include HTTP 429 (rate limit), 500, 502, 503, and connection errors.
Cost Budget
Set a per-session spending limit in the[defaults] section:
budget_exceeded error. A warning is logged when cost reaches 80% of the budget.
Channel Configuration
Slack
API Server
Orchestrator Configuration
Disabled (Single Agent)
Rules-Based
AI-Based
Hybrid
Per-Agent Configuration
Define per-agent settings under[agent.<name>]. Each agent can have its own tool allowlist, iteration limit, and approval requirements:
Tools Configuration
Logging Configuration
Managing Configuration
View Current Config
Set Values
Reset to Defaults
Context Management
For distributed mode, manage cluster contexts:Next Steps
Providers
Configure LLM providers
Channels
Set up communication channels

