Skip to main content

Configuration Guide

ZeroClaw uses a TOML-based configuration system with environment variable overrides and secure secret storage.

Configuration Files

After running zeroclaw onboard, you’ll find:
Never commit .secret_key to version control. Add it to .gitignore:

Configuration Resolution

ZeroClaw loads configuration in this order (later sources override earlier):
1

Default Values

Built-in defaults from src/config/schema.rs:
  • default_provider: "openrouter"
  • default_model: "anthropic/claude-sonnet-4.6"
  • default_temperature: 0.7
2

config.toml

User configuration file at ~/.zeroclaw/config.toml or path specified via --config-dir
3

Environment Variables

Variables prefixed with ZEROCLAW_ or provider-specific keys:
  • ZEROCLAW_API_KEY or API_KEY
  • ZEROCLAW_PROVIDER
  • ZEROCLAW_MODEL
  • OPENROUTER_API_KEY, ANTHROPIC_API_KEY, etc.
4

CLI Flags

Command-line arguments take highest precedence:

Core Configuration

Provider Settings

config.toml
Supported Providers: anthropic, openai, openrouter, groq, mistral, deepseek, xai, fireworks, together-ai, cohere, moonshot, glm, minimax, qwen, gemini, ollama, vllm, sglang, venice, and custom OpenAI-compatible endpoints.

Multiple Provider Profiles

Define named provider configurations (Codex app-server compatible):
Use profiles via CLI:

Provider-Specific Overrides

Environment Variable Reference

Autonomy and Security

Autonomy Levels

Control tool execution approval:
Autonomy Modes:
  • approve: Prompt user for every execution
  • supervised: Auto-approve safe operations (reads), prompt for risky ones (writes/deletes)
  • auto: Full autonomy within workspace boundaries

Security Settings

Changing workspace_root after onboarding requires updating file paths in your config. The agent cannot access files outside this directory.

Gateway Configuration

Start the gateway:
Use environment variables for dynamic port binding:

Memory Configuration

Memory Backend Comparison

Channel Configuration

Channel-specific configuration guides:

Runtime Configuration

Research Phase

Research phase runs before response generation. The agent gathers facts via tools, then uses that context to answer accurately.

Reliability Settings

Observability

Enable OpenTelemetry:

Proxy Configuration

Environment variable equivalents:

Tool Configuration

Scheduler and Cron

Cron schedule format: minute hour day_of_month month day_of_week

Hardware and Peripherals

Enable hardware support:

Export and Validate Configuration

Example Complete Configuration

Next Steps

Provider Reference

Detailed guide for all supported AI providers

Channel Reference

Setup guides for Telegram, Discord, Slack, Matrix, and more

Tool Reference

Built-in tools and custom tool development

API Reference

Trait interfaces and advanced customization