Config Reference
AgentZero uses a single agentzero.toml file located in the data directory (default: ~/.agentzero/). Generate a starter config with agentzero onboard.
Full Configuration Template
Section titled “Full Configuration Template”# ─── Provider ────────────────────────────────────────────[provider]kind = "openrouter" # openai, openrouter, anthropic, ollama, custombase_url = "https://openrouter.ai/api/v1" # provider API endpointmodel = "anthropic/claude-sonnet-4-6" # model identifierdefault_temperature = 0.7 # 0.0 – 2.0# provider_api = "openai-chat-completions" # or "openai-responses"# model_support_vision = true # enable vision/multimodal
# ─── Memory ──────────────────────────────────────────────[memory]backend = "sqlite" # sqlite or tursosqlite_path = "~/.agentzero/agentzero.db" # database file path
# ─── Agent Settings ──────────────────────────────────────[agent]max_tool_iterations = 20 # max tool calls per turnrequest_timeout_ms = 30000 # per-request timeoutmemory_window_size = 50 # context window (message count)max_prompt_chars = 8000 # max prompt character lengthmode = "development" # development or productionparallel_tools = false # parallel tool executiontool_dispatcher = "auto" # auto or sequentialcompact_context = true # compress context when large
# Loop detection thresholdsloop_detection_no_progress_threshold = 3loop_detection_ping_pong_cycles = 2loop_detection_failure_streak = 3
[agent.hooks]enabled = falsetimeout_ms = 250fail_closed = falseon_error_default = "warn" # block, warn, or ignore# on_error_low = "ignore"# on_error_medium = "warn"# on_error_high = "block"
# ─── Security ────────────────────────────────────────────[security]allowed_root = "." # filesystem scope rootallowed_commands = ["ls", "pwd", "cat", "echo"] # shell command allowlist
[security.read_file]max_read_bytes = 65536 # 64 KiBallow_binary = false
[security.write_file]enabled = false # explicit opt-in requiredmax_write_bytes = 65536
[security.shell]max_args = 8max_arg_length = 128max_output_bytes = 8192forbidden_chars = ";&|><$`\n\r"context_aware_parsing = true
[security.mcp]enabled = falseallowed_servers = [] # must be non-empty when enabled
[security.plugin]enabled = false
[security.audit]enabled = falsepath = "./agentzero-audit.log"
[security.url_access]block_private_ip = trueallow_loopback = falseenforce_domain_allowlist = falsedomain_allowlist = []domain_blocklist = []
[security.otp]enabled = falsemethod = "totp"token_ttl_secs = 30cache_valid_secs = 300gated_actions = ["shell", "file_write", "browser_open", "browser", "memory_forget"]
[security.estop]enabled = falsestate_file = "~/.agentzero/estop-state.json"require_otp_to_resume = true
[security.outbound_leak_guard]enabled = trueaction = "redact" # redact or blocksensitivity = 0.7
[security.syscall_anomaly]enabled = truestrict_mode = falsealert_on_unknown_syscall = truemax_denied_events_per_minute = 5max_alerts_per_minute = 30
# ─── Autonomy ────────────────────────────────────────────[autonomy]level = "supervised" # supervised or autonomousworkspace_only = trueforbidden_paths = ["/etc", "/root", "/proc", "/sys", "~/.ssh", "~/.gnupg", "~/.aws"]max_actions_per_hour = 20max_cost_per_day_cents = 500require_approval_for_medium_risk = trueblock_high_risk_commands = true
# ─── Gateway ─────────────────────────────────────────────[gateway]host = "127.0.0.1"port = 42617require_pairing = trueallow_public_bind = false
[gateway.node_control]enabled = false# auth_token = "****"allowed_node_ids = []
# ─── Observability ───────────────────────────────────────[observability]backend = "none" # none or otelotel_endpoint = "http://localhost:4318"otel_service_name = "agentzero"runtime_trace_mode = "none" # none or fileruntime_trace_path = "state/runtime-trace.jsonl"runtime_trace_max_entries = 200
# ─── Cost Tracking ───────────────────────────────────────[cost]enabled = falsedaily_limit_usd = 10.0monthly_limit_usd = 100.0warn_at_percent = 80
# ─── Identity ────────────────────────────────────────────[identity]format = "openclaw" # openclaw or aieos# aieos_path = "identity.json"
# ─── Runtime ─────────────────────────────────────────────[runtime]kind = "native" # native or docker# reasoning_enabled = true
[runtime.wasm]tools_dir = "tools/wasm"fuel_limit = 1000000memory_limit_mb = 64max_module_size_mb = 50allow_workspace_read = falseallow_workspace_write = falseallowed_hosts = []
[runtime.wasm.security]require_workspace_relative_tools_dir = truereject_symlink_modules = truereject_symlink_tools_dir = truestrict_host_validation = truecapability_escalation_mode = "deny"module_hash_policy = "warn" # warn or enforce
# ─── Tools ───────────────────────────────────────────────[browser]enabled = falsebackend = "agent_browser"
[http_request]enabled = falseallowed_domains = []max_response_size = 1000000timeout_secs = 30
[web_fetch]enabled = falseprovider = "fast_html2md"max_response_size = 500000
[web_search]enabled = falseprovider = "duckduckgo"max_results = 5
[composio]enabled = false
# ─── Skills ──────────────────────────────────────────────[skills]open_skills_enabled = falseprompt_injection_mode = "full"
# ─── Multimodal ──────────────────────────────────────────[multimodal]max_images = 4max_image_size_mb = 5allow_remote_fetch = false
# ─── Research Mode ───────────────────────────────────────[research]enabled = falsetrigger = "never" # never, always, or keywordmax_iterations = 5
# ─── Model Provider Profiles ─────────────────────────────# [model_providers.local-ollama]# base_url = "http://localhost:11434/v1"# model = "llama3.2"
# ─── Model Routes ────────────────────────────────────────# [[model_routes]]# hint = "code"# provider = "openrouter"# model = "anthropic/claude-sonnet-4-6"
# ─── Delegate Sub-Agents ─────────────────────────────────# [agents.researcher]# provider = "openrouter"# model = "anthropic/claude-sonnet-4-6"# max_depth = 3# agentic = true# allowed_tools = ["web_search", "web_fetch"]Config Inspection Commands
Section titled “Config Inspection Commands”# Show effective config (secrets masked)agentzero config show
# Show raw config (secrets visible)agentzero config show --raw
# Query a single valueagentzero config get provider.model
# Set a valueagentzero config set provider.model "anthropic/claude-sonnet-4-6"
# Print TOML templateagentzero config schema
# Print JSON schemaagentzero config schema --jsonConfig Precedence
Section titled “Config Precedence”- CLI flags (highest)
- Environment variables
agentzero.tomlfile- Compiled defaults (lowest)
Data Directory
Section titled “Data Directory”Default: ~/.agentzero/
Override with:
--data-dir <path>flag (highest)AGENTZERO_DATA_DIRenv vardata_dirin config file