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:00:07

    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.

    Diffs

    text
    diffs
    is an optional plugin tool with short built-in system guidance and a companion skill that turns change content into a read-only diff artifact for agents.

    It accepts either:

    • text
      before
      and
      text
      after
      text
    • a unified
      text
      patch

    It can return:

    • a gateway viewer URL for canvas presentation
    • a rendered file path (PNG or PDF) for message delivery
    • both outputs in one call

    When enabled, the plugin prepends concise usage guidance into system-prompt space and also exposes a detailed skill for cases where the agent needs fuller instructions.

    Quick start

    Enable the plugin

    ```json5} { plugins: { entries: { diffs: { enabled: true, }, }, }, } ```

    Pick a mode

    Canvas-first flows: agents call `diffs` with `mode: "view"` and open `details.viewerUrl` with `canvas present`.
    text
    <Tab title="file"> Chat file delivery: agents call `diffs` with `mode: "file"` and send `details.filePath` with `message` using `path` or `filePath`. </Tab> <Tab title="both"> Combined: agents call `diffs` with `mode: "both"` to get both artifacts in one call. </Tab> </Tabs>

    Disable built-in system guidance

    If you want to keep the

    text
    diffs
    tool enabled but disable its built-in system-prompt guidance, set
    text
    plugins.entries.diffs.hooks.allowPromptInjection
    to
    text
    false
    :

    json5
    { plugins: { entries: { diffs: { enabled: true, hooks: { allowPromptInjection: false, }, }, }, }, }

    This blocks the diffs plugin's

    text
    before_prompt_build
    hook while keeping the plugin, tool, and companion skill available.

    If you want to disable both the guidance and the tool, disable the plugin instead.

    Typical agent workflow

    Call diffs

    Agent calls the `diffs` tool with input.

    Read details

    Agent reads `details` fields from the response.

    Present

    Agent either opens `details.viewerUrl` with `canvas present`, sends `details.filePath` with `message` using `path` or `filePath`, or does both.

    Input examples

    ```json} { "before": "# Hello\n\nOne", "after": "# Hello\n\nTwo", "path": "docs/example.md", "mode": "view" } ``` ```json} { "patch": "diff --git a/src/example.ts b/src/example.ts\n--- a/src/example.ts\n+++ b/src/example.ts\n@@ -1 +1 @@\n-const x = 1;\n+const x = 2;\n", "mode": "both" } ```

    Tool input reference

    All fields are optional unless noted.

    Original text. Required with `after` when `patch` is omitted. Updated text. Required with `before` when `patch` is omitted. Unified diff text. Mutually exclusive with `before` and `after`. Display filename for before and after mode. Language override hint for before and after mode. Unknown values fall back to plain text. Viewer title override. Output mode. Defaults to plugin default `defaults.mode`. Deprecated alias: `"image"` behaves like `"file"` and is still accepted for backward compatibility. Viewer theme. Defaults to plugin default `defaults.theme`. Diff layout. Defaults to plugin default `defaults.layout`. Expand unchanged sections when full context is available. Per-call option only (not a plugin default key). Rendered file format. Defaults to plugin default `defaults.fileFormat`. Quality preset for PNG or PDF rendering. Device scale override (`1`-`4`). Max render width in CSS pixels (`640`-`2400`). Artifact TTL in seconds for viewer and standalone file outputs. Max 21600. Viewer URL origin override. Overrides plugin `viewerBaseUrl`. Must be `http` or `https`, no query/hash.

    Output details contract

    The tool returns structured metadata under

    text
    details
    .

    Mode behavior summary:

    ModeWhat is returned
    text
    "view"
    Viewer fields only.
    text
    "file"
    File fields only, no viewer artifact.
    text
    "both"
    Viewer fields plus file fields. If file rendering fails, viewer still returns with
    text
    fileError
    and
    text
    imageError
    alias.

    Collapsed unchanged sections

    • The viewer can show rows like
      text
      N unmodified lines
      .
    • Expand controls on those rows are conditional and not guaranteed for every input kind.
    • Expand controls appear when the rendered diff has expandable context data, which is typical for before and after input.
    • For many unified patch inputs, omitted context bodies are not available in the parsed patch hunks, so the row can appear without expand controls. This is expected behavior.
    • text
      expandUnchanged
      applies only when expandable context exists.

    Plugin defaults

    Set plugin-wide defaults in

    text
    ~/.openclaw/openclaw.json
    :

    json5
    { plugins: { entries: { diffs: { enabled: true, config: { defaults: { fontFamily: "Fira Code", fontSize: 15, lineSpacing: 1.6, layout: "unified", showLineNumbers: true, diffIndicators: "bars", wordWrap: true, background: true, theme: "dark", fileFormat: "png", fileQuality: "standard", fileScale: 2, fileMaxWidth: 960, mode: "both", }, }, }, }, }, }

    Supported defaults:

    • text
      fontFamily
    • text
      fontSize
    • text
      lineSpacing
    • text
      layout
    • text
      showLineNumbers
    • text
      diffIndicators
    • text
      wordWrap
    • text
      background
    • text
      theme
    • text
      fileFormat
    • text
      fileQuality
    • text
      fileScale
    • text
      fileMaxWidth
    • text
      mode

    Explicit tool parameters override these defaults.

    Persistent viewer URL config

    Plugin-owned fallback for returned viewer links when a tool call does not pass `baseUrl`. Must be `http` or `https`, no query/hash.
    json5
    { plugins: { entries: { diffs: { enabled: true, config: { viewerBaseUrl: "https://gateway.example.com/openclaw", }, }, }, }, }

    Security config

    `false`: non-loopback requests to viewer routes are denied. `true`: remote viewers are allowed if tokenized path is valid.
    json5
    { plugins: { entries: { diffs: { enabled: true, config: { security: { allowRemoteViewer: false, }, }, }, }, }, }

    Artifact lifecycle and storage

    • Artifacts are stored under the temp subfolder:
      text
      $TMPDIR/openclaw-diffs
      .
    • Viewer artifact metadata contains:
      • random artifact ID (20 hex chars)
      • random token (48 hex chars)
      • text
        createdAt
        and
        text
        expiresAt
      • stored
        text
        viewer.html
        path
    • Default artifact TTL is 30 minutes when not specified.
    • Maximum accepted viewer TTL is 6 hours.
    • Cleanup runs opportunistically after artifact creation.
    • Expired artifacts are deleted.
    • Fallback cleanup removes stale folders older than 24 hours when metadata is missing.

    Viewer URL and network behavior

    Viewer route:

    • text
      /plugins/diffs/view/{artifactId}/{token}

    Viewer assets:

    • text
      /plugins/diffs/assets/viewer.js
    • text
      /plugins/diffs/assets/viewer-runtime.js

    The viewer document resolves those assets relative to the viewer URL, so an optional

    text
    baseUrl
    path prefix is preserved for both asset requests too.

    URL construction behavior:

    • If tool-call
      text
      baseUrl
      is provided, it is used after strict validation.
    • Else if plugin
      text
      viewerBaseUrl
      is configured, it is used.
    • Without either override, viewer URL defaults to loopback
      text
      127.0.0.1
      .
    • If gateway bind mode is
      text
      custom
      and
      text
      gateway.customBindHost
      is set, that host is used.

    text
    baseUrl
    rules:

    • Must be
      text
      http://
      or
      text
      https://
      .
    • Query and hash are rejected.
    • Origin plus optional base path is allowed.

    Security model

    Browser requirements for file mode

    text
    mode: "file"
    and
    text
    mode: "both"
    need a Chromium-compatible browser.

    Resolution order:

    Config

    `browser.executablePath` in OpenClaw config.

    Environment variables

    * `OPENCLAW_BROWSER_EXECUTABLE_PATH` * `BROWSER_EXECUTABLE_PATH` * `PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH`

    Platform fallback

    Platform command/path discovery fallback.

    Common failure text:

    • text
      Diff PNG/PDF rendering requires a Chromium-compatible browser...

    Fix by installing Chrome, Chromium, Edge, or Brave, or setting one of the executable path options above.

    Troubleshooting

    Operational guidance

    • Prefer
      text
      mode: "view"
      for local interactive reviews in canvas.
    • Prefer
      text
      mode: "file"
      for outbound chat channels that need an attachment.
    • Keep
      text
      allowRemoteViewer
      disabled unless your deployment requires remote viewer URLs.
    • Set explicit short
      text
      ttlSeconds
      for sensitive diffs.
    • Avoid sending secrets in diff input when not required.
    • If your channel compresses images aggressively (for example Telegram or WhatsApp), prefer PDF output (
      text
      fileFormat: "pdf"
      ).

    note

    Diff rendering engine powered by [Diffs](https://diffs.com).

    Related

    • Browser
    • Plugins
    • Tools overview

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine