Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
Core config reference for
~/.openclaw/openclaw.jsonCovers the main OpenClaw config surfaces and links out when a subsystem has its own deeper reference. Channel- and plugin-owned command catalogs and deep memory/QMD knobs live on their own pages rather than on this one.
Code truth:
openclaw config schemaconfig.schema.lookuppnpm config:docs:checkpnpm config:docs:genAgent lookup path: use the
gatewayconfig.schema.lookupDedicated deep references:
agents.defaults.memorySearch.*memory.qmd.*memory.citationsplugins.entries.memory-core.config.dreamingConfig format is JSON5 (comments + trailing commas allowed). All fields are optional — OpenClaw uses safe defaults when omitted.
Per-channel config keys moved to a dedicated page — see Configuration — channels for
channels.*Moved to a dedicated page — see Configuration — agents for:
agents.defaults.*multiAgent.*session.*messages.*talk.*talk.speechLocaletalk.silenceTimeoutMs700 ms on macOS and Android, 900 ms on iOSTool policy, experimental toggles, provider-backed tool config, and custom provider / base-URL setup moved to a dedicated page — see Configuration — tools and custom providers.
Provider definitions, model allowlists, and custom provider setup live in Configuration — tools and custom providers. The
modelsjson5{ models: { // Optional. Default: true. Requires a Gateway restart when changed. pricing: { enabled: false }, }, }
models.modemergereplacemodels.providersmodels.pricing.enabledfalsemodels.providers.*.models[].costOpenClaw-managed MCP server definitions live under
mcp.serversopenclaw mcp listshowsetunsetjson5{ mcp: { // Optional. Default: 600000 ms (10 minutes). Set 0 to disable idle eviction. sessionIdleTtlMs: 600000, servers: { docs: { command: "npx", args: ["-y", "@modelcontextprotocol/server-fetch"], }, remote: { url: "https://example.com/mcp", transport: "streamable-http", // streamable-http | sse headers: { Authorization: "Bearer ${MCP_REMOTE_TOKEN}", }, }, }, }, }
mcp.serverstransport: "streamable-http"transport: "sse"type: "http"openclaw mcp setopenclaw doctor --fixtransportmcp.sessionIdleTtlMsmcp.*mcp.serversSee MCP and CLI backends for runtime behavior.
json5{ skills: { allowBundled: ["gemini", "peekaboo"], load: { extraDirs: ["~/Projects/agent-scripts/skills"], }, install: { preferBrew: true, nodeManager: "npm", // npm | pnpm | yarn | bun }, entries: { "image-lab": { apiKey: { source: "env", provider: "default", id: "GEMINI_API_KEY" }, // or plaintext string env: { GEMINI_API_KEY: "GEMINI_KEY_HERE" }, }, peekaboo: { enabled: true }, sag: { enabled: false }, }, }, }
allowBundledload.extraDirsinstall.preferBrewbrewinstall.nodeManagermetadata.openclaw.installnpmpnpmyarnbunentries.<skillKey>.enabled: falseentries.<skillKey>.apiKeyjson5{ plugins: { enabled: true, allow: ["voice-call"], deny: [], load: { paths: ["~/Projects/oss/voice-call-plugin"], }, entries: { "voice-call": { enabled: true, hooks: { allowPromptInjection: false, }, config: { provider: "twilio" }, }, }, }, }
~/.openclaw/extensions<workspace>/.openclaw/extensionsplugins.load.pathsallowdenyplugins.entries.<id>.apiKeyplugins.entries.<id>.envplugins.entries.<id>.hooks.allowPromptInjectionfalsebefore_prompt_buildbefore_agent_startmodelOverrideproviderOverrideplugins.entries.<id>.hooks.allowConversationAccesstruellm_inputllm_outputbefore_agent_finalizeagent_endplugins.entries.<id>.subagent.allowModelOverrideprovidermodelplugins.entries.<id>.subagent.allowedModelsprovider/model"*"plugins.entries.<id>.configchannels.<id>channelConfigsplugins.entries.firecrawl.config.webFetchapiKeyplugins.entries.firecrawl.config.webSearch.apiKeytools.web.fetch.firecrawl.apiKeyFIRECRAWL_API_KEYbaseUrlhttps://api.firecrawl.devonlyMainContenttruemaxAgeMs172800000timeoutSeconds60plugins.entries.xai.config.xSearchenabledmodel"grok-4-1-fast"plugins.entries.memory-core.config.dreamingenabledfalsefrequency"0 3 * * *"modelplugins.entries.memory-core.subagent.allowModelOverride: trueallowedModelsagents.defaults.memorySearch.*memory.backendmemory.citationsmemory.qmd.*plugins.entries.memory-core.config.dreamingsettings.jsonplugins.slots.memory"none"plugins.slots.contextEngine"legacy"See Plugins.
json5{ browser: { enabled: true, evaluateEnabled: true, defaultProfile: "user", ssrfPolicy: { // dangerouslyAllowPrivateNetwork: true, // opt in only for trusted private-network access // allowPrivateNetwork: true, // legacy alias // hostnameAllowlist: ["*.example.com", "example.com"], // allowedHostnames: ["localhost"], }, tabCleanup: { enabled: true, idleMinutes: 120, maxTabsPerSession: 8, sweepMinutes: 5, }, profiles: { openclaw: { cdpPort: 18800, color: "#FF4500" }, work: { cdpPort: 18801, color: "#0066CC", executablePath: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", }, user: { driver: "existing-session", attachOnly: true, color: "#00AA00" }, brave: { driver: "existing-session", attachOnly: true, userDataDir: "~/Library/Application Support/BraveSoftware/Brave-Browser", color: "#FB542B", }, remote: { cdpUrl: "http://10.0.0.42:9222", color: "#00AA00" }, }, color: "#FF4500", // headless: false, // noSandbox: false, // extraArgs: [], // executablePath: "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser", // attachOnly: false, }, }
evaluateEnabled: falseact:evaluatewait --fntabCleanupidleMinutes: 0maxTabsPerSession: 0ssrfPolicy.dangerouslyAllowPrivateNetworkssrfPolicy.dangerouslyAllowPrivateNetwork: trueprofiles.*.cdpUrlssrfPolicy.allowPrivateNetworkssrfPolicy.hostnameAllowlistssrfPolicy.allowedHostnamesprofiles.*.cdpUrlhttp://https://ws://wss:///json/versionremoteCdpTimeoutMsremoteCdpHandshakeTimeoutMsattachOnlyattachOnly: trueexisting-sessionexisting-sessionuserDataDirexisting-sessionwait --load networkidleresponsebodyopenclawcdpPortcdpUrlcdpUrlexecutablePathbrowser.executablePathbrowser.localLaunchTimeoutMsbrowser.localCdpReadyTimeoutMs120000browser.executablePathbrowser.profiles.<name>.executablePath~~/...userDataDirexisting-sessiongateway.port18791extraArgs--disable-gpujson5{ ui: { seamColor: "#FF4500", assistant: { name: "OpenClaw", avatar: "CB", // emoji, short text, image URL, or data URI }, }, }
seamColorassistantjson5{ gateway: { mode: "local", // local | remote port: 18789, bind: "loopback", auth: { mode: "token", // none | token | password | trusted-proxy token: "your-token", // password: "your-password", // or OPENCLAW_GATEWAY_PASSWORD // trustedProxy: { userHeader: "x-forwarded-user" }, // for mode=trusted-proxy; see /gateway/trusted-proxy-auth allowTailscale: true, rateLimit: { maxAttempts: 10, windowMs: 60000, lockoutMs: 300000, exemptLoopback: true, }, }, tailscale: { mode: "off", // off | serve | funnel resetOnExit: false, }, controlUi: { enabled: true, basePath: "/openclaw", // root: "dist/control-ui", // embedSandbox: "scripts", // strict | scripts | trusted // allowExternalEmbedUrls: false, // dangerous: allow absolute external http(s) embed URLs // allowedOrigins: ["https://control.example.com"], // required for non-loopback Control UI // dangerouslyAllowHostHeaderOriginFallback: false, // dangerous Host-header origin fallback mode // allowInsecureAuth: false, // dangerouslyDisableDeviceAuth: false, }, remote: { url: "ws://gateway.tailnet:18789", transport: "ssh", // ssh | direct token: "your-token", // password: "your-password", }, trustedProxies: ["10.0.0.1"], // Optional. Default false. allowRealIpFallback: false, nodes: { pairing: { // Optional. Default unset/disabled. autoApproveCidrs: ["192.168.1.0/24", "fd00:1234:5678::/64"], }, allowCommands: ["canvas.navigate"], denyCommands: ["system.run"], }, tools: { // Additional /tools/invoke HTTP denies deny: ["browser"], // Remove tools from the default HTTP deny list allow: ["gateway"], }, push: { apns: { relay: { baseUrl: "https://relay.example.com", timeoutMs: 10000, }, }, }, }, }
gateway.http.endpoints.chatCompletions.enabled: truegateway.http.endpoints.responses.enabledgateway.http.endpoints.responses.maxUrlPartsgateway.http.endpoints.responses.files.urlAllowlistgateway.http.endpoints.responses.images.urlAllowlistgateway.http.endpoints.responses.files.allowUrl=falsegateway.http.endpoints.responses.images.allowUrl=falsegateway.http.securityHeaders.strictTransportSecurityRun multiple gateways on one host with unique ports and state dirs:
bashOPENCLAW_CONFIG_PATH=~/.openclaw/a.json \ OPENCLAW_STATE_DIR=~/.openclaw-a \ openclaw gateway --port 19001
Convenience flags:
--dev~/.openclaw-dev19001--profile <name>~/.openclaw-<name>See Multiple Gateways.
gateway.tlsjson5{ gateway: { tls: { enabled: false, autoGenerate: false, certPath: "/etc/openclaw/tls/server.crt", keyPath: "/etc/openclaw/tls/server.key", caPath: "/etc/openclaw/tls/ca-bundle.crt", }, }, }
enabledfalseautoGeneratecertPathkeyPathcaPathgateway.reloadjson5{ gateway: { reload: { mode: "hybrid", // off | restart | hot | hybrid debounceMs: 500, deferralTimeoutMs: 300000, }, }, }
mode"off""restart""hot""hybrid"debounceMsdeferralTimeoutMs3000000json5{ hooks: { enabled: true, token: "shared-secret", path: "/hooks", maxBodyBytes: 262144, defaultSessionKey: "hook:ingress", allowRequestSessionKey: true, allowedSessionKeyPrefixes: ["hook:", "hook:gmail:"], allowedAgentIds: ["hooks", "main"], presets: ["gmail"], transformsDir: "~/.openclaw/hooks/transforms", mappings: [ { match: { path: "gmail" }, action: "agent", agentId: "hooks", wakeMode: "now", name: "Gmail", sessionKey: "hook:gmail:{{messages[0].id}}", messageTemplate: "From: {{messages[0].from}}\nSubject: {{messages[0].subject}}\n{{messages[0].snippet}}", deliver: true, channel: "last", model: "openai/gpt-5.4-mini", }, ], }, }
Auth:
Authorization: Bearer <token>x-openclaw-token: <token>Validation and safety notes:
hooks.enabled=truehooks.tokenhooks.tokengateway.auth.tokenhooks.path//hookshooks.allowRequestSessionKey=truehooks.allowedSessionKeyPrefixes["hook:"]sessionKeyhooks.allowedSessionKeyPrefixeshooks.allowRequestSessionKey=trueEndpoints:
POST /hooks/wake{ text, mode?: "now"|"next-heartbeat" }POST /hooks/agent{ message, name?, agentId?, sessionKey?, wakeMode?, deliver?, channel?, to?, model?, thinking?, timeoutSeconds? }sessionKeyhooks.allowRequestSessionKey=truefalsePOST /hooks/<name>hooks.mappingssessionKeyhooks.allowRequestSessionKey=truesessionKey: "hook:gmail:{{messages[0].id}}"hooks.allowRequestSessionKey: truehooks.allowedSessionKeyPrefixes["hook:", "hook:gmail:"]hooks.allowRequestSessionKey: falsesessionKeyjson5{ hooks: { gmail: { account: "openclaw@gmail.com", topic: "projects/<project-id>/topics/gog-gmail-watch", subscription: "gog-gmail-watch-push", pushToken: "shared-push-token", hookUrl: "http://127.0.0.1:18789/hooks/gmail", includeBody: true, maxBytes: 20000, renewEveryMinutes: 720, serve: { bind: "127.0.0.1", port: 8788, path: "/" }, tailscale: { mode: "funnel", path: "/gmail-pubsub" }, model: "openrouter/meta-llama/llama-3.3-70b-instruct:free", thinking: "off", }, }, }
gog gmail watch serveOPENCLAW_SKIP_GMAIL_WATCHER=1gog gmail watch servejson5{ canvasHost: { root: "~/.openclaw/workspace/canvas", liveReload: true, // enabled: false, // or OPENCLAW_SKIP_CANVAS_HOST=1 }, }
http://<gateway-host>:<gateway.port>/__openclaw__/canvas/http://<gateway-host>:<gateway.port>/__openclaw__/a2ui/gateway.bind: "loopback"index.html/__openclaw__/a2ui/EMFILEjson5{ discovery: { mdns: { mode: "minimal", // minimal | full | off }, }, }
minimalcliPathsshPortfullcliPathsshPortopenclawOPENCLAW_MDNS_HOSTNAMEjson5{ discovery: { wideArea: { enabled: true }, }, }
Writes a unicast DNS-SD zone under
~/.openclaw/dns/Setup:
openclaw dns setup --applyenvjson5{ env: { OPENROUTER_API_KEY: "sk-or-...", vars: { GROQ_API_KEY: "gsk-...", }, shellEnv: { enabled: true, timeoutMs: 15000, }, }, }
.env.env~/.openclaw/.envshellEnvReference env vars in any config string with
${VAR_NAME}json5{ gateway: { auth: { token: "${OPENCLAW_GATEWAY_TOKEN}" }, }, }
[A-Z_][A-Z0-9_]*$${VAR}${VAR}$includeSecret refs are additive: plaintext values still work.
SecretRefUse one object shape:
json5{ source: "env" | "file" | "exec", provider: "default", id: "..." }
Validation:
provider^[a-z][a-z0-9_-]{0,63}$source: "env"^[A-Z][A-Z0-9_]{0,127}$source: "file""/providers/openai/apiKey"source: "exec"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$source: "exec"...a/../bsecrets applyopenclaw.jsonauth-profiles.jsonjson5{ secrets: { providers: { default: { source: "env" }, // optional explicit env provider filemain: { source: "file", path: "~/.openclaw/secrets.json", mode: "json", timeoutMs: 5000, }, vault: { source: "exec", command: "/usr/local/bin/openclaw-vault-resolver", passEnv: ["PATH", "VAULT_ADDR"], }, }, defaults: { env: "default", file: "filemain", exec: "vault", }, }, }
Notes:
filemode: "json"mode: "singleValue"id"value"allowInsecurePath: trueexeccommandallowSymlinkCommand: truetrustedDirsexecpassEnvjson5{ auth: { profiles: { "anthropic:default": { provider: "anthropic", mode: "api_key" }, "anthropic:work": { provider: "anthropic", mode: "api_key" }, "openai-codex:personal": { provider: "openai-codex", mode: "oauth" }, }, order: { anthropic: ["anthropic:default", "anthropic:work"], "openai-codex": ["openai-codex:personal"], }, }, }
<agentDir>/auth-profiles.jsonauth-profiles.jsonkeyRefapi_keytokenReftokenauth-profiles.json{ "provider": { "apiKey": "..." } }openclaw doctor --fixprovider:default.legacy-flat.*.bakauth.profiles.<id>.mode = "oauth"auth.json~/.openclaw/credentials/oauth.jsonaudit/configure/applyauth.cooldownsjson5{ auth: { cooldowns: { billingBackoffHours: 5, billingBackoffHoursByProvider: { anthropic: 3, openai: 8 }, billingMaxHours: 24, authPermanentBackoffMinutes: 10, authPermanentMaxMinutes: 60, failureWindowHours: 24, overloadedProfileRotations: 1, overloadedBackoffMs: 0, rateLimitedProfileRotations: 1, }, }, }
billingBackoffHours5401403Key limit exceeded402rate_limitbillingBackoffHoursByProviderbillingMaxHours24authPermanentBackoffMinutesauth_permanent10authPermanentMaxMinutesauth_permanent60failureWindowHours24overloadedProfileRotations1ModelNotReadyExceptionoverloadedBackoffMs0rateLimitedProfileRotations1Too many concurrent requestsThrottlingExceptionconcurrency limit reachedworkers_ai ... quota limit exceededresource exhaustedjson5{ logging: { level: "info", file: "/tmp/openclaw/openclaw.log", consoleLevel: "info", consoleStyle: "pretty", // pretty | compact | json redactSensitive: "tools", // off | tools redactPatterns: ["\\bTOKEN\\b\\s*[=:]\\s*([\"']?)([^\\s\"']+)\\1"], }, }
/tmp/openclaw/openclaw-YYYY-MM-DD.loglogging.fileconsoleLeveldebug--verbosemaxFileBytes104857600redactSensitiveredactPatternsredactSensitive: "off"json5{ diagnostics: { enabled: true, flags: ["telegram.*"], stuckSessionWarnMs: 30000, otel: { enabled: false, endpoint: "https://otel-collector.example.com:4318", tracesEndpoint: "https://traces.example.com/v1/traces", metricsEndpoint: "https://metrics.example.com/v1/metrics", logsEndpoint: "https://logs.example.com/v1/logs", protocol: "http/protobuf", // http/protobuf | grpc headers: { "x-tenant-id": "my-org" }, serviceName: "openclaw-gateway", traces: true, metrics: true, logs: false, sampleRate: 1.0, flushIntervalMs: 5000, captureContent: { enabled: false, inputMessages: false, outputMessages: false, toolInputs: false, toolOutputs: false, systemPrompt: false, }, }, cacheTrace: { enabled: false, filePath: "~/.openclaw/logs/cache-trace.jsonl", includeMessages: true, includePrompt: true, includeSystem: true, }, }, }
enabledtrueflags"telegram.*""*"stuckSessionWarnMsotel.enabledfalseotel.endpointotel.tracesEndpointotel.metricsEndpointotel.logsEndpointotel.endpointotel.protocol"http/protobuf""grpc"otel.headersotel.serviceNameotel.tracesotel.metricsotel.logsotel.sampleRate01otel.flushIntervalMsotel.captureContenttrueinputMessagesoutputMessagestoolInputstoolOutputssystemPromptOTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimentalgen_ai.systemOPENCLAW_OTEL_PRELOADED=1OTEL_EXPORTER_OTLP_TRACES_ENDPOINTOTEL_EXPORTER_OTLP_METRICS_ENDPOINTOTEL_EXPORTER_OTLP_LOGS_ENDPOINTcacheTrace.enabledfalsecacheTrace.filePath$OPENCLAW_STATE_DIR/logs/cache-trace.jsonlcacheTrace.includeMessagesincludePromptincludeSystemtruejson5{ update: { channel: "stable", // stable | beta | dev checkOnStart: true, auto: { enabled: false, stableDelayHours: 6, stableJitterHours: 12, betaCheckIntervalHours: 1, }, }, }
channel"stable""beta""dev"checkOnStarttrueauto.enabledfalseauto.stableDelayHours6168auto.stableJitterHours12168auto.betaCheckIntervalHours124json5{ acp: { enabled: true, dispatch: { enabled: true }, backend: "acpx", defaultAgent: "main", allowedAgents: ["main", "ops"], maxConcurrentSessions: 10, stream: { coalesceIdleMs: 50, maxChunkChars: 1000, repeatSuppression: true, deliveryMode: "live", // live | final_only hiddenBoundarySeparator: "paragraph", // none | space | newline | paragraph maxOutputChars: 50000, maxSessionUpdateChars: 500, }, runtime: { ttlMinutes: 30, }, }, }
enabledtruefalsedispatch.enabledtruefalsebackendplugins.allowacpxdefaultAgentallowedAgentsmaxConcurrentSessionsstream.coalesceIdleMsstream.maxChunkCharsstream.repeatSuppressiontruestream.deliveryMode"live""final_only"stream.hiddenBoundarySeparator"paragraph"stream.maxOutputCharsstream.maxSessionUpdateCharsstream.tagVisibilityruntime.ttlMinutesruntime.installCommandjson5{ cli: { banner: { taglineMode: "off", // random | default | off }, }, }
cli.banner.taglineMode"random""default"All your chats, one OpenClaw."off"OPENCLAW_HIDE_BANNER=1Metadata written by CLI guided setup flows (
onboardconfiguredoctorjson5{ wizard: { lastRunAt: "2026-01-01T00:00:00.000Z", lastRunVersion: "2026.1.4", lastRunCommit: "abc1234", lastRunCommand: "configure", lastRunMode: "local", }, }
See
agents.listCurrent builds no longer include the TCP bridge. Nodes connect over the Gateway WebSocket.
bridge.*openclaw doctor --fixjson5{ cron: { enabled: true, maxConcurrentRuns: 2, // cron dispatch + isolated cron agent-turn execution webhook: "https://example.invalid/legacy", // deprecated fallback for stored notify:true jobs webhookToken: "replace-with-dedicated-token", // optional bearer token for outbound webhook auth sessionRetention: "24h", // duration string or false runLog: { maxBytes: "2mb", // default 2_000_000 bytes keepLines: 2000, // default 2000 }, }, }
sessionRetentionsessions.json24hfalserunLog.maxBytescron/runs/<jobId>.jsonl2_000_000runLog.keepLines2000webhookTokendelivery.mode = "webhook"webhooknotify: truecron.retryjson5{ cron: { retry: { maxAttempts: 3, backoffMs: [30000, 60000, 300000], retryOn: ["rate_limit", "overloaded", "network", "timeout", "server_error"], }, }, }
maxAttempts3010backoffMs[30000, 60000, 300000]retryOn"rate_limit""overloaded""network""timeout""server_error"Applies only to one-shot cron jobs. Recurring jobs use separate failure handling.
cron.failureAlertjson5{ cron: { failureAlert: { enabled: false, after: 3, cooldownMs: 3600000, includeSkipped: false, mode: "announce", accountId: "main", }, }, }
enabledfalseafter1cooldownMsincludeSkippedfalsemode"announce""webhook"accountIdcron.failureDestinationjson5{ cron: { failureDestination: { mode: "announce", channel: "last", to: "channel:C1234567890", accountId: "main", }, }, }
mode"announce""webhook""announce"channel"last"toaccountIddelivery.failureDestinationannouncedelivery.failureDestinationsessionTarget="isolated"delivery.mode"webhook"See Cron Jobs. Isolated cron executions are tracked as background tasks.
Template placeholders expanded in
tools.media.models[].args| Variable | Description |
|---|---|
text {{Body}} | Full inbound message body |
text {{RawBody}} | Raw body (no history/sender wrappers) |
text {{BodyStripped}} | Body with group mentions stripped |
text {{From}} | Sender identifier |
text {{To}} | Destination identifier |
text {{MessageSid}} | Channel message id |
text {{SessionId}} | Current session UUID |
text {{IsNewSession}} | text "true" |
text {{MediaUrl}} | Inbound media pseudo-URL |
text {{MediaPath}} | Local media path |
text {{MediaType}} | Media type (image/audio/document/…) |
text {{Transcript}} | Audio transcript |
text {{Prompt}} | Resolved media prompt for CLI entries |
text {{MaxChars}} | Resolved max output chars for CLI entries |
text {{ChatType}} | text "direct"text "group" |
text {{GroupSubject}} | Group subject (best effort) |
text {{GroupMembers}} | Group members preview (best effort) |
text {{SenderName}} | Sender display name (best effort) |
text {{SenderE164}} | Sender phone number (best effort) |
text {{Provider}} | Provider hint (whatsapp, telegram, discord, etc.) |
$includeSplit config into multiple files:
json5// ~/.openclaw/openclaw.json { gateway: { port: 18789 }, agents: { $include: "./agents.json5" }, broadcast: { $include: ["./clients/mueller.json5", "./clients/schmidt.json5"], }, }
Merge behavior:
dirnameopenclaw.json../plugins installplugins: { $include: "./plugins.json5" }plugins.json5openclaw.jsonRelated: Configuration · Configuration Examples · Doctor
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine