Configuration Options
Kage uses TOML for configuration. This page documents all available options.
Global Configuration
Located at ~/.config/kage/config.toml:
# Daemon settings
[]
# Unix socket path for IPC
= "/tmp/kage.sock"
# Directory for persistent state (agents, tasks, events)
= "~/.local/share/kage/state/"
# Directory for daemon logs
= "~/.local/share/kage/logs/"
# Maximum concurrent agents
= 10
# gRPC listen address (enables remote mode)
# grpc_listen = "0.0.0.0:50051"
# Claude Code agent settings
[]
# Default model (opus, sonnet, haiku)
= "sonnet"
# Maximum iterations before pause
= 50
# Default approval level (none, on-write, on-commit, always)
= "on-commit"
# Path to custom CLAUDE.md instruction file
# claude_md = "/path/to/custom/CLAUDE.md"
# Memory system settings
[]
# Storage backend (filesystem, s3, azure)
= "filesystem"
# Working memory TTL
= "24h"
# Long-term memory retention
= "90d"
# Maximum entries per namespace
= 10000
# Secrets backend
[]
# Backend type (keyring, aws, azure)
= "keyring"
# Task defaults
[]
# Default approval level for new tasks
= "on-commit"
# Default max iterations
= 10
# Default checkpoint interval
= 2
# Approval settings
[]
# Timeout before auto-pausing task
= "30m"
# Enable system notifications
= true
# Subscription pool settings
[]
# Default routing strategy (round-robin, priority, least-used)
= "priority"
# Rate limit window duration
= "1m"
# Cooldown after hitting rate limit
= "5m"
Namespace Configuration
Define namespaces in your global config:
[]
# Repositories in this namespace
= [
"~/code/api",
"~/code/auth",
"~/code/worker"
]
# Memory sharing mode (full, isolated, cascade)
= "full"
# Namespace-specific approval level
= "on-commit"
# Maximum concurrent agents in this namespace
= 5
[]
= [
"~/code/web",
"~/code/mobile"
]
= "cascade"
= "on-write"
Memory Sharing Modes
| Mode | Description |
|---|---|
full | All agents share all memory within the namespace |
isolated | Agents only see their own memory |
cascade | Agents see shared + their own memory |
Subscription Routing
Configure subscription routing rules:
[]
# Route namespace to specific subscriptions
= ["backend-dedicated", "work-premium"]
= ["frontend-sub", "personal"]
# Route priority levels
= ["premium-1", "premium-2"]
= ["work-1", "work-2"]
= ["batch-1", "batch-2", "batch-3"]
Per-Project Configuration
Located at <repo>/.kage/config.toml:
# Override namespace assignment
= "backend"
# Project-specific Claude settings
[]
= "opus"
= 100
# Custom CLAUDE.md for this project
= ".kage/CLAUDE.md"
# Project-specific approval level
[]
= "on-commit"
# Custom memory settings
[]
# Tags automatically applied to memory from this repo
= ["api", "backend"]
Environment Variables
All configuration options can be overridden via environment variables:
| Variable | Description |
|---|---|
KAGE_SOCKET_PATH | Unix socket path |
KAGE_STATE_DIR | State directory |
KAGE_LOG_DIR | Log directory |
KAGE_MAX_AGENTS | Maximum concurrent agents |
KAGE_CLAUDE_MODEL | Default Claude model |
KAGE_CLAUDE_MAX_ITERATIONS | Default max iterations |
KAGE_APPROVAL | Default approval level |
Environment variables follow the pattern KAGE_<SECTION>_<KEY> in uppercase with underscores.
Claude-Specific Settings
The ~/.config/kage/claude.toml file contains Claude-specific settings:
# Model selection
= "sonnet" # opus, sonnet, haiku
# Allowed tools (empty = all allowed)
= []
# Denied tools
= ["Bash(rm -rf:*)"]
# MCP servers to enable
[]
= "npx"
= ["-y", "@anthropic/mcp-server-memory"]
= true
[]
= "npx"
= ["-y", "@anthropic/mcp-server-filesystem", "--root", "~"]
= true
Example: Complete Configuration
Here’s a comprehensive example configuration:
# ~/.config/kage/config.toml
[]
= "/tmp/kage.sock"
= "~/.local/share/kage/state/"
= "~/.local/share/kage/logs/"
= 8
[]
= "sonnet"
= 30
= "on-commit"
[]
= "filesystem"
= "24h"
= "90d"
[]
= "keyring"
[]
= "on-commit"
= 15
= 3
[]
= "1h"
= true
[]
= "priority"
[]
= ["work-main", "work-backup"]
= ["premium"]
[]
= ["~/code/api", "~/code/auth"]
= "full"
= 4
[]
= ["~/code/web"]
= "cascade"
= "on-write"
= 2
[]
= ["~/code/infra", "~/code/deploy"]
= "always"
= 1