Configuration Schema

The Clawdius configuration file is a TOML document with the following schema.

File Locations

Clawdius looks for configuration in this order (later overrides earlier):

  1. .clawdius/config.toml (default)
  2. clawdius.toml (in current directory)
  3. Path specified by --config / -C flag

Top-Level Schema

[project]
name = "my-project"
rigor_level = "high"           # low | medium | high
lifecycle_phase = "context_discovery"

[workspace]
name = "default"
storage = "sqlite"              # sqlite | postgres | mariadb
database_path = ".clawdius/workspace.db"
postgres_url = ""               # For postgres backend
mariadb_url = ""                # For mariadb backend
per_project_tokens = 2000
max_total_tokens = 8000

[storage]
database_path = ".clawdius/graph/index.db"
vector_path = ".clawdius/graph/vectors.lance"
sessions_path = ".clawdius/sessions.db"

[llm]
default_provider = "anthropic"  # anthropic | openai | ollama | zai | deepseek | google
max_tokens = 4096

[llm.anthropic]
model = "claude-sonnet-4-20250514"
api_key_env = "ANTHROPIC_API_KEY"
api_key = ""                    # Not recommended
base_url = ""                   # Custom endpoint

[llm.openai]
model = "gpt-4o"
api_key_env = "OPENAI_API_KEY"

[llm.ollama]
model = "llama3.2"
base_url = "http://localhost:11434"

[llm.retry]
max_retries = 3
initial_delay_ms = 1000
max_delay_ms = 30000
exponential_base = 2.0
retry_on = ["rate_limit", "timeout", "server_error", "network_error"]

[session]
compact_threshold = 0.85
keep_recent = 4
min_messages = 10
auto_save = true

[output]
show_progress = true
format = "text"                # text | json | stream-json

[shell_sandbox]
blocked_commands = [
    "rm -rf /",
    "mkfs",
    "dd if=/dev/zero",
]
timeout_secs = 120
max_output_bytes = 1048576
restrict_to_cwd = true

Section Reference

[project]

KeyTypeDefaultDescription
namestring"clawdius"Project name
rigor_levelstring"high"Rigor level: low, medium, high
lifecycle_phasestring"context_discovery"Current Nexus FSM phase

[storage]

KeyTypeDefaultDescription
database_pathpath.clawdius/graph/index.dbSQLite database path
vector_pathpath.clawdius/graph/vectors.lanceLanceDB vector store path
sessions_pathpath.clawdius/sessions.dbSessions database path

[llm]

KeyTypeDefaultDescription
default_providerstring(none)Default LLM provider
max_tokensinteger4096Maximum response tokens

[session]

KeyTypeDefaultDescription
compact_thresholdfloat0.85Auto-compact at this context fraction
keep_recentinteger4Messages to keep when compacting
min_messagesinteger10Minimum messages before compacting
auto_savebooleantrueAuto-save sessions

[shell_sandbox]

KeyTypeDefaultDescription
blocked_commandsarray of strings(see defaults)Blocked command patterns
timeout_secsinteger120Command timeout in seconds
max_output_bytesinteger1048576Maximum output size in bytes
restrict_to_cwdbooleantrueRestrict to project directory

[llm.retry]

KeyTypeDefaultDescription
max_retriesinteger3Maximum retry attempts
initial_delay_msinteger1000Initial delay in ms
max_delay_msinteger30000Maximum delay cap in ms
exponential_basefloat2.0Backoff multiplier
retry_onarray of strings(all)Conditions: rate_limit, timeout, server_error, network_error

Viewing Configuration

clawdius config show       # Show current config (API keys masked)
clawdius config path       # Show config file path
clawdius config list       # List available keys
clawdius config get llm.default_provider
clawdius config set llm.default_provider openai

Environment Variable Overrides

API keys can be set via environment variables (highest priority):

VariableProvider
ANTHROPIC_API_KEYAnthropic
OPENAI_API_KEYOpenAI
DEEPSEEK_API_KEYDeepSeek
ZAI_API_KEYZ.AI
OLLAMA_BASE_URLOllama server URL