# ByteClaw configuration. Secrets can come from env instead: # BYTECLAW_AUTH_TOKEN, BYTECLAW_LLM_API_KEY, BYTECLAW_LLM_BASE_URL, BYTECLAW_LLM_MODEL, # BYTECLAW_LISTEN, BYTECLAW_DATA_DIR, BYTECLAW_WORKSPACE, BYTECLAW_ALLOWED_ORIGINS (comma separated) listen: 127.0.0.1:8787 # bind to 0.0.0.0 only behind TLS (reverse proxy) or in a trusted LAN auth_token: "" # optional static admin token (>= 16 chars, sees all sessions). Generate: openssl rand -hex 32 allow_registration: true # users sign up via POST /api/auth/register; set false after creating your account token_ttl_hours: 720 # login token lifetime allowed_origins: [] # browser origins allowed besides same host; "*" only if you really mean it data_dir: ./data workspace: "" # default: /workspace; file tools cannot leave it llm: # Preset: openai | openrouter | ollama | dahl | gonkarouter | custom (env: BYTECLAW_LLM_PROVIDER) # Presets fill base_url/model if empty; api_key falls back to OPENAI_API_KEY, OPENROUTER_API_KEY, # DAHL_API_KEY or GONKAROUTER_API_KEY. "custom" requires base_url and model. provider: openai base_url: "" # override, e.g. https://inference.dahl.global/v1 api_key: "" model: "" # e.g. MiniMaxAI/MiniMax-M2.7, zai-org/GLM-5.3-Flash timeout_sec: 120 temperature: 0.7 # Further providers the app may switch to at runtime (PUT /api/providers/active or per session). # Keys stay on the server and are never sent to the app. Presets also pick up their env key. providers: # dahl: { api_key: "" } # or env DAHL_API_KEY # gonkarouter: { api_key: "" } # or env GONKAROUTER_API_KEY # mylocal: { base_url: "http://127.0.0.1:8000/v1", model: "qwen3" } agent: system_prompt: "You are ByteClaw, a concise and helpful self-hosted assistant. Use tools when they help." max_iterations: 8 history_limit: 50 # Summarise long sessions with the LLM (originals stay in SQLite). Manual: POST /api/sessions/{id}/summarize summarize: enabled: true max_messages: 40 # unsummarised messages before summarising max_tokens: 12000 # or estimated tokens (chars/4) keep_recent: 10 # newest messages always kept verbatim tools: web_fetch: enabled: true max_bytes: 524288 timeout_sec: 15 allow_private: false # true allows localhost/LAN targets (SSRF risk) shell: # opt-in; runs WITHOUT a shell interpreter, only in the workspace enabled: false allowed_commands: [] # e.g. [ls, cat, wc, head, tail, grep, date]; sh/bash/env/xargs/python/... are refused timeout_sec: 30 max_output_bytes: 65536 files_enabled: true file_max_bytes: 1048576