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:03:08

    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.

    Music generation

    The

    text
    music_generate
    tool lets the agent create music or audio through the shared music-generation capability with configured providers — Google, MiniMax, and workflow-configured ComfyUI today.

    For session-backed agent runs, OpenClaw starts music generation as a background task, tracks it in the task ledger, then wakes the agent again when the track is ready so the agent can post the finished audio back into the original channel.

    note

    The built-in shared tool only appears when at least one music-generation provider is available. If you do not see `music_generate` in your agent's tools, configure `agents.defaults.musicGenerationModel` or set up a provider API key.

    Quick start

    Configure auth

    Set an API key for at least one provider — for example `GEMINI_API_KEY` or `MINIMAX_API_KEY`.
    text
    <Step title="Pick a default model (optional)"> ```json5} { agents: { defaults: { musicGenerationModel: { primary: "google/lyria-3-clip-preview", }, }, }, } ``` </Step> <Step title="Ask the agent"> *"Generate an upbeat synthpop track about a night drive through a neon city."* The agent calls `music_generate` automatically. No tool allow-listing needed. </Step> </Steps> For direct synchronous contexts without a session-backed agent run, the built-in tool still falls back to inline generation and returns the final media path in the tool result.

    Configure the workflow

    Configure `plugins.entries.comfy.config.music` with a workflow JSON and prompt/output nodes.
    text
    <Step title="Cloud auth (optional)"> For Comfy Cloud, set `COMFY_API_KEY` or `COMFY_CLOUD_API_KEY`. </Step> <Step title="Call the tool"> ```text} /tool music_generate prompt="Warm ambient synth loop with soft tape texture" ``` </Step> </Steps>

    Example prompts:

    text
    Generate a cinematic piano track with soft strings and no vocals.
    text
    Generate an energetic chiptune loop about launching a rocket at sunrise.

    Supported providers

    ProviderDefault modelReference inputsSupported controlsAuth
    ComfyUI
    text
    workflow
    Up to 1 imageWorkflow-defined music or audio
    text
    COMFY_API_KEY
    ,
    text
    COMFY_CLOUD_API_KEY
    Google
    text
    lyria-3-clip-preview
    Up to 10 images
    text
    lyrics
    ,
    text
    instrumental
    ,
    text
    format
    text
    GEMINI_API_KEY
    ,
    text
    GOOGLE_API_KEY
    MiniMax
    text
    music-2.6
    None
    text
    lyrics
    ,
    text
    instrumental
    ,
    text
    durationSeconds
    ,
    text
    format=mp3
    text
    MINIMAX_API_KEY
    or MiniMax OAuth

    Capability matrix

    The explicit mode contract used by

    text
    music_generate
    , contract tests, and the shared live sweep:

    Provider
    text
    generate
    text
    edit
    Edit limitShared live lanes
    ComfyUI✓✓1 imageNot in the shared sweep; covered by
    text
    extensions/comfy/comfy.live.test.ts
    Google✓✓10 images
    text
    generate
    ,
    text
    edit
    MiniMax✓—None
    text
    generate

    Use

    text
    action: "list"
    to inspect available shared providers and models at runtime:

    text
    /tool music_generate action=list

    Use

    text
    action: "status"
    to inspect the active session-backed music task:

    text
    /tool music_generate action=status

    Direct generation example:

    text
    /tool music_generate prompt="Dreamy lo-fi hip hop with vinyl texture and gentle rain" instrumental=true

    Tool parameters

    Music generation prompt. Required for `action: "generate"`. `"status"` returns the current session task; `"list"` inspects providers. Provider/model override (e.g. `google/lyria-3-pro-preview`, `comfy/workflow`). Optional lyrics when the provider supports explicit lyric input. Request instrumental-only output when the provider supports it. Single reference image path or URL. Multiple reference images (up to 10 on supporting providers). Target duration in seconds when the provider supports duration hints. Output format hint when the provider supports it.

    Output filename hint. Optional provider request timeout in milliseconds.

    note

    Not all providers support all parameters. OpenClaw still validates hard limits such as input counts before submission. When a provider supports duration but uses a shorter maximum than the requested value, OpenClaw clamps to the closest supported duration. Truly unsupported optional hints are ignored with a warning when the selected provider or model cannot honor them. Tool results report applied settings; `details.normalization` captures any requested-to-applied mapping.

    Async behavior

    Session-backed music generation runs as a background task:

    • Background task:
      text
      music_generate
      creates a background task, returns a started/task response immediately, and posts the finished track later in a follow-up agent message.
    • Duplicate prevention: while a task is
      text
      queued
      or
      text
      running
      , later
      text
      music_generate
      calls in the same session return task status instead of starting another generation. Use
      text
      action: "status"
      to check explicitly.
    • Status lookup:
      text
      openclaw tasks list
      or
      text
      openclaw tasks show <taskId>
      inspects queued, running, and terminal status.
    • Completion wake: OpenClaw injects an internal completion event back into the same session so the model can write the user-facing follow-up itself.
    • Prompt hint: later user/manual turns in the same session get a small runtime hint when a music task is already in flight, so the model does not blindly call
      text
      music_generate
      again.
    • No-session fallback: direct/local contexts without a real agent session run inline and return the final audio result in the same turn.

    Task lifecycle

    StateMeaning
    text
    queued
    Task created, waiting for the provider to accept it.
    text
    running
    Provider is processing (typically 30 seconds to 3 minutes depending on provider and duration).
    text
    succeeded
    Track ready; the agent wakes and posts it to the conversation.
    text
    failed
    Provider error or timeout; the agent wakes with error details.

    Check status from the CLI:

    bash
    openclaw tasks list openclaw tasks show <taskId> openclaw tasks cancel <taskId>

    Configuration

    Model selection

    json5
    { agents: { defaults: { musicGenerationModel: { primary: "google/lyria-3-clip-preview", fallbacks: ["minimax/music-2.6"], }, }, }, }

    Provider selection order

    OpenClaw tries providers in this order:

    1. text
      model
      parameter from the tool call (if the agent specifies one).
    2. text
      musicGenerationModel.primary
      from config.
    3. text
      musicGenerationModel.fallbacks
      in order.
    4. Auto-detection using auth-backed provider defaults only:
      • current default provider first;
      • remaining registered music-generation providers in provider-id order.

    If a provider fails, the next candidate is tried automatically. If all fail, the error includes details from each attempt.

    Set

    text
    agents.defaults.mediaGenerationAutoProviderFallback: false
    to use only explicit
    text
    model
    ,
    text
    primary
    , and
    text
    fallbacks
    entries.

    Provider notes

    Choosing the right path

    • Shared provider-backed when you want model selection, provider failover, and the built-in async task/status flow.
    • Plugin path (ComfyUI) when you need a custom workflow graph or a provider that is not part of the shared bundled music capability.

    If you are debugging ComfyUI-specific behavior, see ComfyUI. If you are debugging shared provider behavior, start with Google (Gemini) or MiniMax.

    Provider capability modes

    The shared music-generation contract supports explicit mode declarations:

    • text
      generate
      for prompt-only generation.
    • text
      edit
      when the request includes one or more reference images.

    New provider implementations should prefer explicit mode blocks:

    typescript
    capabilities: { generate: { maxTracks: 1, supportsLyrics: true, supportsFormat: true, }, edit: { enabled: true, maxTracks: 1, maxInputImages: 1, supportsFormat: true, }, }

    Legacy flat fields such as

    text
    maxInputImages
    ,
    text
    supportsLyrics
    , and
    text
    supportsFormat
    are not enough to advertise edit support. Providers should declare
    text
    generate
    and
    text
    edit
    explicitly so live tests, contract tests, and the shared
    text
    music_generate
    tool can validate mode support deterministically.

    Live tests

    Opt-in live coverage for the shared bundled providers:

    bash
    OPENCLAW_LIVE_TEST=1 pnpm test:live -- extensions/music-generation-providers.live.test.ts

    Repo wrapper:

    bash
    pnpm test:live:media music

    This live file loads missing provider env vars from

    text
    ~/.profile
    , prefers live/env API keys ahead of stored auth profiles by default, and runs both
    text
    generate
    and declared
    text
    edit
    coverage when the provider enables edit mode. Coverage today:

    • text
      google
      :
      text
      generate
      plus
      text
      edit
    • text
      minimax
      :
      text
      generate
      only
    • text
      comfy
      : separate Comfy live coverage, not the shared provider sweep

    Opt-in live coverage for the bundled ComfyUI music path:

    bash
    OPENCLAW_LIVE_TEST=1 COMFY_LIVE_TEST=1 pnpm test:live -- extensions/comfy/comfy.live.test.ts

    The Comfy live file also covers comfy image and video workflows when those sections are configured.

    Related

    • Background tasks — task tracking for detached
      text
      music_generate
      runs
    • ComfyUI
    • Configuration reference —
      text
      musicGenerationModel
      config
    • Google (Gemini)
    • MiniMax
    • Models — model configuration and failover
    • Tools overview

    © 2024 TaskFlow Mirror

    Powered by TaskFlow Sync Engine