Configuration Complete configuration reference for clawft including file location, all config keys with types and defaults, and environment variables.
The runtime resolves configuration through a three-step discovery chain, stopping at the first match:
Priority Source Notes 1 CLAWFT_CONFIG environment variableAbsolute path to a JSON file 2 ~/.clawft/config.jsonRecommended location 3 ~/.nanobot/config.jsonLegacy fallback for migration
If no file is found, all values use compiled-in defaults (equivalent to {}).
Inspect the resolved configuration:
weft config show # full config as JSON
weft config section agents # single section
weft config section gateway
The configuration file accepts both snake_case and camelCase keys. Keys are normalized to snake_case internally. Unknown fields are silently ignored for forward compatibility.
{
"agents" : { },
"providers" : { },
"channels" : { },
"gateway" : { },
"routing" : { },
"tools" : { },
"delegation" : { },
"voice" : { }
}
Default settings applied to every agent instance.
Field Type Default Description modelstring "anthropic/claude-opus-4-5"LLM model using provider/model syntax workspacestring "~/.nanobot/workspace"Working directory for file tools. Tilde expanded at runtime. max_tokensinteger 8192Maximum tokens in a single LLM response temperaturefloat 0.7Sampling temperature (0.0 = deterministic, 1.0 = creative) max_tool_iterationsinteger 20Maximum tool-use rounds per message turn memory_windowinteger 50Number of recent messages included in context
{
"agents" : {
"defaults" : {
"model" : "anthropic/claude-sonnet-4-20250514" ,
"max_tokens" : 8192 ,
"temperature" : 0.7 ,
"max_tool_iterations" : 20 ,
"memory_window" : 50
}
}
}
Credentials and endpoint overrides for LLM providers. API keys should be set via environment variables rather than hardcoded in configuration files.
Each provider entry has the same shape:
Field Type Default Description api_keystring ""API key (prefer env vars instead) api_basestring or null nullBase URL override for proxies or self-hosted endpoints extra_headersobject {}Additional HTTP headers sent with every request
Provider Prefix API Key Env Var Base URL OpenAI openai/OPENAI_API_KEYhttps://api.openai.com/v1Anthropic anthropic/ANTHROPIC_API_KEYhttps://api.anthropic.com/v1Groq groq/GROQ_API_KEYhttps://api.groq.com/openai/v1DeepSeek deepseek/DEEPSEEK_API_KEYhttps://api.deepseek.com/v1Mistral mistral/MISTRAL_API_KEYhttps://api.mistral.ai/v1Together together/TOGETHER_API_KEYhttps://api.together.xyz/v1OpenRouter openrouter/OPENROUTER_API_KEYhttps://openrouter.ai/api/v1Gemini gemini/GOOGLE_GEMINI_API_KEYhttps://generativelanguage.googleapis.com/v1beta/openaixAI xai/XAI_API_KEYhttps://api.x.ai/v1
HTTP server and heartbeat settings.
Field Type Default Description hoststring "0.0.0.0"Bind address portinteger 18790Listen port heartbeat_interval_minutesinteger 0Minutes between heartbeat messages. 0 disables. heartbeat_promptstring "heartbeat"Prompt text sent on each heartbeat tick
Each channel has an enabled boolean that defaults to false. Only enabled channels are started at runtime.
Field Type Default Description enabledboolean falseEnable Telegram tokenstring ""Bot token from @BotFather token_envstring/null nullEnv var holding the token (used when token is empty) allow_fromstring[] []Allowed user IDs. Empty = allow all. proxystring/null nullHTTP/SOCKS5 proxy URL
Field Type Default Description enabledboolean falseEnable Slack bot_tokenstring ""Bot User OAuth Token (xoxb-...) app_tokenstring ""App-level token for Socket Mode (xapp-...) modestring "socket"Connection mode group_policystring "mention"Group policy: "mention", "open", "allowlist" group_allow_fromstring[] []Channel IDs for allowlist policy dm.enabledboolean trueAccept direct messages dm.policystring "open"DM policy: "open" or "allowlist" dm.allow_fromstring[] []User IDs for allowlist DM policy
Field Type Default Description enabledboolean falseEnable Discord tokenstring ""Bot token from Developer Portal allow_fromstring[] []Allowed user IDs. Empty = allow all. gateway_urlstring "wss://gateway.discord.gg/?v=10&encoding=json"Gateway URL intentsinteger 37377Gateway intents bitmask
Controls model selection, cost management, and per-user permissions. When omitted, defaults to mode = "static" (single model from agents.defaults.model).
Field Type Default Description modestring "static""static" or "tiered"tiersarray []Model tier definitions selection_strategystring null"preference_order", "round_robin", "lowest_cost", "random"fallback_modelstring nullFallback model when all tiers exhausted
Each tier groups models at a similar cost/capability level:
Field Type Description namestring Tier name (e.g., "free", "standard", "premium") modelsstring[] Models in preference order ("provider/model") complexity_range[float, float] Complexity range (0.0-1.0) cost_per_1k_tokensfloat Approximate cost per 1K tokens in USD max_context_tokensinteger Maximum context window size
Per-user and per-channel permission levels:
{
"routing" : {
"permissions" : {
"users" : {
"user_id_123" : { "level" : 2 }
},
"channels" : {
"cli" : { "level" : 2 },
"discord" : { "level" : 1 }
}
}
}
}
Field Type Default Description global_daily_limit_usdfloat 50.0Daily spend limit global_monthly_limit_usdfloat 500.0Monthly spend limit tracking_persistenceboolean truePersist cost tracking across restarts
Field Type Default Description window_secondsinteger 60Rate limit window strategystring "sliding_window"Rate limiting strategy global_rate_limit_rpminteger 0Global rate limit (0 = unlimited)
Field Type Default Description restrict_to_workspaceboolean falseSandbox all file tools to workspace
Field Type Default Description api_keystring ""Search provider API key max_resultsinteger 5Maximum search results
Field Type Default Description timeoutinteger 60Command execution timeout in seconds
Field Type Default Description modestring "allowlist""allowlist" or "denylist"allowliststring[] []Permitted basenames (empty = 17 built-in defaults) denyliststring[] []Blocked patterns for denylist mode
Field Type Default Description enabledboolean trueWhether URL safety checks are active allowPrivateboolean falseAllow requests to private IP ranges allowedDomainsstring[] []Domains that bypass all safety checks blockedDomainsstring[] []Domains that are always blocked
External MCP server configurations. Each entry specifies a command (stdio) or URL (HTTP):
{
"tools" : {
"mcp_servers" : {
"my_server" : {
"command" : "npx" ,
"args" : [ "-y" , "my-mcp-server" ],
"internal_only" : false
}
}
}
}
Field Type Default Description commandstring ""Command to spawn (stdio transport) argsstring[] []Command arguments envobject {}Environment variables for the child process urlstring ""URL endpoint (HTTP transport) internal_onlyboolean trueWhen true, tools are not registered in the ToolRegistry
Field Type Default Description enabledboolean falseEnable voice features globally
Field Type Default Description providerstring "browser""browser", "openai", or "elevenlabs"modelstring varies TTS model voicestring varies Voice ID speedfloat 1.0Speed multiplier (0.25 - 4.0)
Field Type Default Description enabledboolean trueEnable speech-to-text languagestring ""Language code. Empty = auto-detect.
Field Type Default Description thresholdfloat 0.5VAD activation threshold (0.0 - 1.0) silence_timeout_msinteger 1500Silence duration before speech end
Field Type Default Description enabledboolean falseEnable wake word detection phrasestring "hey weft"Wake word phrase
Key environment variables used by clawft:
Variable Purpose CLAWFT_CONFIGOverride config file path RUST_LOGOverride log level (e.g., debug, info, clawft_llm=debug) OPENAI_API_KEYOpenAI API key ANTHROPIC_API_KEYAnthropic API key GROQ_API_KEYGroq API key DEEPSEEK_API_KEYDeepSeek API key MISTRAL_API_KEYMistral API key TOGETHER_API_KEYTogether API key OPENROUTER_API_KEYOpenRouter API key GOOGLE_GEMINI_API_KEYGoogle Gemini API key XAI_API_KEYxAI API key ELEVENLABS_API_KEYElevenLabs TTS API key