TaskFlow
DashboardFreewriteWhiteboardsProjectsCRMTasksNotificationsSettingsAgent TowerAPI Docs
OpenClaw Docs
?

User

Member

Caricamento in corso...

Home
Progetti
Task
Notifiche
CRM

    OpenClaw

    Documentation Mirror

    Documentation Overview

    Docs

    Auth credential semantics
    Scheduled tasks
    Hooks
    Automation & tasks
    Standing orders
    Task flow
    Background tasks
    BlueBubbles
    Broadcast groups
    Channel routing
    Discord
    Feishu
    Google Chat
    Group messages
    Groups
    iMessage
    Chat channels
    IRC
    LINE
    Channel location parsing
    Matrix
    Matrix migration
    Matrix push rules for quiet previews
    Mattermost
    Microsoft Teams
    Nextcloud Talk
    Nostr
    Pairing
    QA channel
    QQ bot
    Signal
    Slack
    Synology Chat
    Telegram
    Tlon
    Channel troubleshooting
    Twitch
    WeChat
    WhatsApp
    Yuanbao
    Zalo
    Zalo personal
    CI pipeline
    ACP
    Agent
    Agents
    Approvals
    Backup
    Browser
    Channels
    Clawbot
    `openclaw commitments`
    Completion
    Config
    Configure
    Cron
    Daemon
    Dashboard
    Devices
    Directory
    DNS
    Docs
    Doctor
    Flows (redirect)
    Gateway
    Health
    Hooks
    CLI reference
    Inference CLI
    Logs
    MCP
    Memory
    Message
    Migrate
    Models
    Node
    Nodes
    Onboard
    Pairing
    Plugins
    Proxy
    QR
    Reset
    Sandbox CLI
    Secrets
    Security
    Sessions
    Setup
    Skills
    Status
    System
    `openclaw tasks`
    TUI
    Uninstall
    Update
    Voicecall
    Webhooks
    Wiki
    Active memory
    Agent runtime
    Agent loop
    Agent runtimes
    Agent workspace
    Gateway architecture
    Channel docking
    Inferred commitments
    Compaction
    Context
    Context engine
    Delegate architecture
    Dreaming
    Experimental features
    Features
    Markdown formatting
    Memory overview
    Builtin memory engine
    Honcho memory
    QMD memory engine
    Memory search
    Messages
    Model failover
    Model providers
    Models CLI
    Multi-agent routing
    OAuth
    OpenClaw App SDK
    Presence
    QA overview
    Matrix QA
    Command queue
    Steering queue
    Retry policy
    Session management
    Session pruning
    Session tools
    SOUL.md personality guide
    Streaming and chunking
    System prompt
    Timezones
    TypeBox
    Typing indicators
    Usage tracking
    Date and time
    Node + tsx crash
    Diagnostics flags
    Authentication
    Background exec and process tool
    Bonjour discovery
    Bridge protocol
    CLI backends
    Configuration — agents
    Configuration — channels
    Configuration — tools and custom providers
    Configuration
    Configuration examples
    Configuration reference
    Diagnostics export
    Discovery and transports
    Doctor
    Gateway lock
    Health checks
    Heartbeat
    Gateway runbook
    Local models
    Gateway logging
    Multiple gateways
    Network model
    OpenAI chat completions
    OpenResponses API
    OpenShell
    OpenTelemetry export
    Gateway-owned pairing
    Prometheus metrics
    Gateway protocol
    Remote access
    Remote gateway setup
    Sandbox vs tool policy vs elevated
    Sandboxing
    Secrets management
    Secrets apply plan contract
    Security audit checks
    Security
    Tailscale
    Tools invoke API
    Troubleshooting
    Trusted proxy auth
    Debugging
    Environment variables
    FAQ
    FAQ: first-run setup
    FAQ: models and auth
    GPT-5.5 / Codex agentic parity
    GPT-5.5 / Codex parity maintainer notes
    Help
    Scripts
    Testing
    Testing: live suites
    General troubleshooting
    OpenClaw
    Ansible
    Azure
    Bun (experimental)
    ClawDock
    Release channels
    DigitalOcean
    Docker
    Docker VM runtime
    exe.dev
    Fly.io
    GCP
    Hetzner
    Hostinger
    Install
    Installer internals
    Kubernetes
    macOS VMs
    Migration guide
    Migrating from Claude
    Migrating from Hermes
    Nix
    Node.js
    Northflank
    Oracle Cloud
    Podman
    Railway
    Raspberry Pi
    Render
    Uninstall
    Updating
    Logging
    Network
    Audio and voice notes
    Camera capture
    Image and media support
    Nodes
    Location command
    Media understanding
    Talk mode
    Node troubleshooting
    Voice wake
    Pi integration architecture
    Pi development workflow
    Android app
    Platforms
    iOS app
    Linux app
    Gateway on macOS
    Canvas
    Gateway lifecycle
    macOS dev setup
    Health checks (macOS)
    Menu bar icon
    macOS logging
    Menu bar
    Peekaboo bridge
    macOS permissions
    Remote control
    macOS signing
    Skills (macOS)
    Voice overlay
    Voice wake (macOS)
    WebChat (macOS)
    macOS IPC
    macOS app
    Windows
    Plugin internals
    Plugin architecture internals
    Building plugins
    Plugin bundles
    Codex Computer Use
    Codex harness
    Community plugins
    Plugin compatibility
    Google Meet plugin
    Plugin hooks
    Plugin manifest
    Memory LanceDB
    Memory wiki
    Message presentation
    Agent harness plugins
    Building channel plugins
    Channel turn kernel
    Plugin entry points
    Plugin SDK migration
    Plugin SDK overview
    Building provider plugins
    Plugin runtime helpers
    Plugin setup and config
    Plugin SDK subpaths
    Plugin testing
    Skill workshop plugin
    Voice call plugin
    Webhooks plugin
    Zalo personal plugin
    OpenProse
    Alibaba Model Studio
    Anthropic
    Arcee AI
    Azure Speech
    Amazon Bedrock
    Amazon Bedrock Mantle
    Chutes
    Claude Max API proxy
    Cloudflare AI gateway
    ComfyUI
    Deepgram
    Deepinfra
    DeepSeek
    ElevenLabs
    Fal
    Fireworks
    GitHub Copilot
    GLM (Zhipu)
    Google (Gemini)
    Gradium
    Groq
    Hugging Face (inference)
    Provider directory
    Inferrs
    Inworld
    Kilocode
    LiteLLM
    LM Studio
    MiniMax
    Mistral
    Model provider quickstart
    Moonshot AI
    NVIDIA
    Ollama
    OpenAI
    OpenCode
    OpenCode Go
    OpenRouter
    Perplexity
    Qianfan
    Qwen
    Runway
    SGLang
    StepFun
    Synthetic
    Tencent Cloud (TokenHub)
    Together AI
    Venice AI
    Vercel AI gateway
    vLLM
    Volcengine (Doubao)
    Vydra
    xAI
    Xiaomi MiMo
    Z.AI
    Default AGENTS.md
    Release policy
    API usage and costs
    Credits
    Device model database
    Full release validation
    Memory configuration reference
    OpenClaw App SDK API design
    Prompt caching
    Rich output protocol
    RPC adapters
    SecretRef credential surface
    Session management deep dive
    AGENTS.md template
    BOOT.md template
    BOOTSTRAP.md template
    HEARTBEAT.md template
    IDENTITY template
    SOUL.md template
    TOOLS.md template
    USER template
    Tests
    Token use and costs
    Transcript hygiene
    Onboarding reference
    Contributing to the threat model
    Threat model (MITRE ATLAS)
    Formal verification (security models)
    Network proxy
    Agent bootstrapping
    Docs directory
    Getting started
    Docs hubs
    OpenClaw lore
    Onboarding (macOS app)
    Onboarding overview
    Personal assistant setup
    Setup
    Showcase
    Onboarding (CLI)
    CLI automation
    CLI setup reference
    ACP agents
    ACP agents — setup
    Agent send
    apply_patch tool
    Brave search
    Browser (OpenClaw-managed)
    Browser control API
    Browser troubleshooting
    Browser login
    WSL2 + Windows + remote Chrome CDP troubleshooting
    BTW side questions
    ClawHub
    Code execution
    Creating skills
    Diffs
    DuckDuckGo search
    Elevated mode
    Exa search
    Exec tool
    Exec approvals
    Exec approvals — advanced
    Firecrawl
    Gemini search
    Grok search
    Image generation
    Tools and plugins
    Kimi search
    LLM task
    Lobster
    Tool-loop detection
    Media overview
    MiniMax search
    Multi-agent sandbox and tools
    Music generation
    Ollama web search
    PDF tool
    Perplexity search
    Plugins
    Reactions
    SearXNG search
    Skills
    Skills config
    Slash commands
    Sub-agents
    Tavily
    Thinking levels
    Tokenjuice
    Trajectory bundles
    Text-to-speech
    Video generation
    Web search
    Web fetch
    Linux server
    Control UI
    Dashboard
    Web
    TUI
    WebChat

    OpenAPI Specs

    openapi
    TaskFlow
    docs/openclaw
    Original Docs

    Real-time Synchronized Documentation

    Last sync: 01/05/2026 07:02:51

    Note: This content is mirrored from docs.openclaw.ai and is subject to their terms and conditions.

    OpenClaw Docs

    v2.4.0 Production

    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.

    Secrets management

    OpenClaw supports additive SecretRefs so supported credentials do not need to be stored as plaintext in configuration.

    note

    Plaintext still works. SecretRefs are opt-in per credential.

    Goals and runtime model

    Secrets are resolved into an in-memory runtime snapshot.

    • Resolution is eager during activation, not lazy on request paths.
    • Startup fails fast when an effectively active SecretRef cannot be resolved.
    • Reload uses atomic swap: full success, or keep the last-known-good snapshot.
    • SecretRef policy violations (for example OAuth-mode auth profiles combined with SecretRef input) fail activation before runtime swap.
    • Runtime requests read from the active in-memory snapshot only.
    • After the first successful config activation/load, runtime code paths keep reading that active in-memory snapshot until a successful reload swaps it.
    • Outbound delivery paths also read from that active snapshot (for example Discord reply/thread delivery and Telegram action sends); they do not re-resolve SecretRefs on each send.

    This keeps secret-provider outages off hot request paths.

    Active-surface filtering

    SecretRefs are validated only on effectively active surfaces.

    • Enabled surfaces: unresolved refs block startup/reload.
    • Inactive surfaces: unresolved refs do not block startup/reload.
    • Inactive refs emit non-fatal diagnostics with code
      text
      SECRETS_REF_IGNORED_INACTIVE_SURFACE
      .

    Gateway auth surface diagnostics

    When a SecretRef is configured on

    text
    gateway.auth.token
    ,
    text
    gateway.auth.password
    ,
    text
    gateway.remote.token
    , or
    text
    gateway.remote.password
    , gateway startup/reload logs the surface state explicitly:

    • text
      active
      : the SecretRef is part of the effective auth surface and must resolve.
    • text
      inactive
      : the SecretRef is ignored for this runtime because another auth surface wins, or because remote auth is disabled/not active.

    These entries are logged with

    text
    SECRETS_GATEWAY_AUTH_SURFACE
    and include the reason used by the active-surface policy, so you can see why a credential was treated as active or inactive.

    Onboarding reference preflight

    When onboarding runs in interactive mode and you choose SecretRef storage, OpenClaw runs preflight validation before saving:

    • Env refs: validates env var name and confirms a non-empty value is visible during setup.
    • Provider refs (
      text
      file
      or
      text
      exec
      ): validates provider selection, resolves
      text
      id
      , and checks resolved value type.
    • Quickstart reuse path: when
      text
      gateway.auth.token
      is already a SecretRef, onboarding resolves it before probe/dashboard bootstrap (for
      text
      env
      ,
      text
      file
      , and
      text
      exec
      refs) using the same fail-fast gate.

    If validation fails, onboarding shows the error and lets you retry.

    SecretRef contract

    Use one object shape everywhere:

    json5
    { source: "env" | "file" | "exec", provider: "default", id: "..." }
    ```json5} { source: "env", provider: "default", id: "OPENAI_API_KEY" } ```
    text
    Validation: * `provider` must match `^[a-z][a-z0-9_-]{0,63}$` * `id` must match `^[A-Z][A-Z0-9_]{0,127}$`
    ```json5} { source: "file", provider: "filemain", id: "/providers/openai/apiKey" } ```
    text
    Validation: * `provider` must match `^[a-z][a-z0-9_-]{0,63}$` * `id` must be an absolute JSON pointer (`/...`) * RFC6901 escaping in segments: `~` => `~0`, `/` => `~1`
    ```json5} { source: "exec", provider: "vault", id: "providers/openai/apiKey" } ```
    text
    Validation: * `provider` must match `^[a-z][a-z0-9_-]{0,63}$` * `id` must match `^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$` * `id` must not contain `.` or `..` as slash-delimited path segments (for example `a/../b` is rejected)

    Provider config

    Define providers under

    text
    secrets.providers
    :

    json5
    { secrets: { providers: { default: { source: "env" }, filemain: { source: "file", path: "~/.openclaw/secrets.json", mode: "json", // or "singleValue" }, vault: { source: "exec", command: "/usr/local/bin/openclaw-vault-resolver", args: ["--profile", "prod"], passEnv: ["PATH", "VAULT_ADDR"], jsonOnly: true, }, }, defaults: { env: "default", file: "filemain", exec: "vault", }, resolution: { maxProviderConcurrency: 4, maxRefsPerProvider: 512, maxBatchBytes: 262144, }, }, }

    Exec integration examples

    MCP server environment variables

    MCP server env vars configured via

    text
    plugins.entries.acpx.config.mcpServers
    support SecretInput. This keeps API keys and tokens out of plaintext config:

    json5
    { plugins: { entries: { acpx: { enabled: true, config: { mcpServers: { github: { command: "npx", args: ["-y", "@modelcontextprotocol/server-github"], env: { GITHUB_PERSONAL_ACCESS_TOKEN: { source: "env", provider: "default", id: "MCP_GITHUB_PAT", }, }, }, }, }, }, }, }, }

    Plaintext string values still work. Env-template refs like

    text
    ${MCP_SERVER_API_KEY}
    and SecretRef objects are resolved during gateway activation before the MCP server process is spawned. As with other SecretRef surfaces, unresolved refs only block activation when the
    text
    acpx
    plugin is effectively active.

    Sandbox SSH auth material

    The core

    text
    ssh
    sandbox backend also supports SecretRefs for SSH auth material:

    json5
    { agents: { defaults: { sandbox: { mode: "all", backend: "ssh", ssh: { target: "user@gateway-host:22", identityData: { source: "env", provider: "default", id: "SSH_IDENTITY" }, certificateData: { source: "env", provider: "default", id: "SSH_CERTIFICATE" }, knownHostsData: { source: "env", provider: "default", id: "SSH_KNOWN_HOSTS" }, }, }, }, }, }

    Runtime behavior:

    • OpenClaw resolves these refs during sandbox activation, not lazily during each SSH call.
    • Resolved values are written to temp files with restrictive permissions and used in generated SSH config.
    • If the effective sandbox backend is not
      text
      ssh
      , these refs stay inactive and do not block startup.

    Supported credential surface

    Canonical supported and unsupported credentials are listed in:

    • SecretRef Credential Surface

    note

    Runtime-minted or rotating credentials and OAuth refresh material are intentionally excluded from read-only SecretRef resolution.

    Required behavior and precedence

    • Field without a ref: unchanged.
    • Field with a ref: required on active surfaces during activation.
    • If both plaintext and ref are present, ref takes precedence on supported precedence paths.
    • The redaction sentinel
      text
      __OPENCLAW_REDACTED__
      is reserved for internal config redaction/restore and is rejected as literal submitted config data.

    Warning and audit signals:

    • text
      SECRETS_REF_OVERRIDES_PLAINTEXT
      (runtime warning)
    • text
      REF_SHADOWED
      (audit finding when
      text
      auth-profiles.json
      credentials take precedence over
      text
      openclaw.json
      refs)

    Google Chat compatibility behavior:

    • text
      serviceAccountRef
      takes precedence over plaintext
      text
      serviceAccount
      .
    • Plaintext value is ignored when sibling ref is set.

    Activation triggers

    Secret activation runs on:

    • Startup (preflight plus final activation)
    • Config reload hot-apply path
    • Config reload restart-check path
    • Manual reload via
      text
      secrets.reload
    • Gateway config write RPC preflight (
      text
      config.set
      /
      text
      config.apply
      /
      text
      config.patch
      ) for active-surface SecretRef resolvability within the submitted config payload before persisting edits

    Activation contract:

    • Success swaps the snapshot atomically.
    • Startup failure aborts gateway startup.
    • Runtime reload failure keeps the last-known-good snapshot.
    • Write-RPC preflight failure rejects the submitted config and keeps both disk config and active runtime snapshot unchanged.
    • Providing an explicit per-call channel token to an outbound helper/tool call does not trigger SecretRef activation; activation points remain startup, reload, and explicit
      text
      secrets.reload
      .

    Degraded and recovered signals

    When reload-time activation fails after a healthy state, OpenClaw enters degraded secrets state.

    One-shot system event and log codes:

    • text
      SECRETS_RELOADER_DEGRADED
    • text
      SECRETS_RELOADER_RECOVERED

    Behavior:

    • Degraded: runtime keeps last-known-good snapshot.
    • Recovered: emitted once after the next successful activation.
    • Repeated failures while already degraded log warnings but do not spam events.
    • Startup fail-fast does not emit degraded events because runtime never became active.

    Command-path resolution

    Command paths can opt into supported SecretRef resolution via gateway snapshot RPC.

    There are two broad behaviors:

    For example `openclaw memory` remote-memory paths and `openclaw qr --remote` when it needs remote shared-secret refs. They read from the active snapshot and fail fast when a required SecretRef is unavailable. For example `openclaw status`, `openclaw status --all`, `openclaw channels status`, `openclaw channels resolve`, `openclaw security audit`, and read-only doctor/config repair flows. They also prefer the active snapshot, but degrade instead of aborting when a targeted SecretRef is unavailable in that command path.
    text
    Read-only behavior: * When the gateway is running, these commands read from the active snapshot first. * If gateway resolution is incomplete or the gateway is unavailable, they attempt targeted local fallback for the specific command surface. * If a targeted SecretRef is still unavailable, the command continues with degraded read-only output and explicit diagnostics such as "configured but unavailable in this command path". * This degraded behavior is command-local only. It does not weaken runtime startup, reload, or send/auth paths.

    Other notes:

    • Snapshot refresh after backend secret rotation is handled by
      text
      openclaw secrets reload
      .
    • Gateway RPC method used by these command paths:
      text
      secrets.resolve
      .

    Audit and configure workflow

    Default operator flow:

    Audit current state

    ```bash} openclaw secrets audit --check ```

    Configure SecretRefs

    ```bash} openclaw secrets configure ```

    Re-audit

    ```bash} openclaw secrets audit --check ```

    One-way safety policy

    warning

    OpenClaw intentionally does not write rollback backups containing historical plaintext secret values.

    Safety model:

    • preflight must succeed before write mode
    • runtime activation is validated before commit
    • apply updates files using atomic file replacement and best-effort restore on failure

    Legacy auth compatibility notes

    For static credentials, runtime no longer depends on plaintext legacy auth storage.

    • Runtime credential source is the resolved in-memory snapshot.
    • Legacy static
      text
      api_key
      entries are scrubbed when discovered.
    • OAuth-related compatibility behavior remains separate.

    Web UI note

    Some SecretInput unions are easier to configure in raw editor mode than in form mode.

    Related

    • Authentication — auth setup
    • CLI: secrets — CLI commands
    • Environment Variables — environment precedence
    • SecretRef Credential Surface — credential surface
    • Secrets Apply Plan Contract — plan contract details
    • Security — security posture

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine