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.
Task Flow is the flow orchestration substrate that sits above background tasks. It manages durable multi-step flows with their own state, revision tracking, and sync semantics while individual tasks remain the unit of detached work.
Use Task Flow when work spans multiple sequential or branching steps and you need durable progress tracking across gateway restarts. For single background operations, a plain task is sufficient.
| Scenario | Use |
|---|---|
| Single background job | Plain task |
| Multi-step pipeline (A then B then C) | Task Flow (managed) |
| Observe externally created tasks | Task Flow (mirrored) |
| One-shot reminder | Cron job |
For recurring workflows such as market intelligence briefings, treat the schedule, orchestration, and reliability checks as separate layers:
Example cron shape:
bashopenclaw cron add \ --name "Market intelligence brief" \ --cron "0 7 * * 1-5" \ --tz "America/New_York" \ --session session:market-intel \ --message "Run the market-intel Lobster workflow. Verify source freshness before summarizing." \ --announce \ --channel slack \ --to "channel:C1234567890"
Use
session:<id>isolatedisolatedInside the workflow, put reliability checks before the LLM summary step:
yamlname: market-intel-brief steps: - id: preflight command: market-intel check --json - id: collect command: market-intel collect --json stdin: $preflight.json - id: summarize command: market-intel summarize --json stdin: $collect.json - id: approve command: market-intel deliver --preview stdin: $summarize.json approval: required - id: deliver command: market-intel deliver --execute stdin: $summarize.json condition: $approve.approved
Recommended preflight checks:
openclawuserlobsterbrowserllm-taskRecommended data provenance fields for every collected item:
json{ "sourceUrl": "https://example.com/report", "retrievedAt": "2026-04-24T12:00:00Z", "asOf": "2026-04-24", "title": "Example report", "content": "..." }
Have the workflow reject or mark stale items before summarization. The LLM step should receive only structured JSON and should be asked to preserve
sourceUrlretrievedAtasOfFor reusable team or community workflows, package the CLI,
.lobsterTask Flow owns the lifecycle end-to-end. It creates tasks as flow steps, drives them to completion, and advances the flow state automatically.
Example: a weekly report flow that (1) gathers data, (2) generates the report, and (3) delivers it. Task Flow creates each step as a background task, waits for completion, then moves to the next step.
textFlow: weekly-report Step 1: gather-data → task created → succeeded Step 2: generate-report → task created → succeeded Step 3: deliver → task created → running
Task Flow observes externally created tasks and keeps flow state in sync without taking ownership of task creation. This is useful when tasks originate from cron jobs, CLI commands, or other sources and you want a unified view of their progress as a flow.
Example: three independent cron jobs that together form a "morning ops" routine. A mirrored flow tracks their collective progress without controlling when or how they run.
Each flow persists its own state and tracks revisions so progress survives gateway restarts. Revision tracking enables conflict detection when multiple sources attempt to advance the same flow concurrently. The flow registry uses SQLite with bounded write-ahead-log maintenance, including periodic and shutdown checkpoints, so long-running gateways do not retain unbounded
registry.sqlite-walopenclaw tasks flow cancelbash# List active and recent flows openclaw tasks flow list # Show details for a specific flow openclaw tasks flow show <lookup> # Cancel a running flow and its active tasks openclaw tasks flow cancel <lookup>
| Command | Description |
|---|---|
text openclaw tasks flow list | Shows tracked flows with status and sync mode |
text openclaw tasks flow show <id> | Inspect one flow by flow id or lookup key |
text openclaw tasks flow cancel <id> | Cancel a running flow and its active tasks |
Flows coordinate tasks, not replace them. A single flow may drive multiple background tasks over its lifetime. Use
openclaw tasksopenclaw tasks flowopenclaw tasks flow© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine