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:| Field | Description | Default |
|---|---|---|
max_retries | Number of retry attempts with exponential backoff | 3 |
fallback | Name of fallback provider to use after retries exhaust | None |
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:
| Field | Description | Default |
|---|---|---|
tools | Allowlist of tool names this agent can use | All tools |
max_iterations | Maximum agent loop iterations | 50 |
require_approval | Tools requiring user confirmation before execution | [] |
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

