OpenClaw-native workflow registry, control plane, and visualization layer.
English · 中文 · Quick Start · Registry Spec
OpenTask is built around a simple split:
- OpenClaw executes the work.
- OpenTask keeps the workflow registry, run state projection, audit trail, and control UI.
The workflow must keep running even when the OpenTask backend or frontend is down. The shared source of truth is a registry directory containing versioned workflows and run folders under runs/.
For real runs, that registry root should be the stable OpenClaw workspace or the configured OPENTASK_REGISTRY_ROOT, not a throwaway temp directory. Runtime prompts and subagent handoffs should treat that same registry root as Workspace root, so relative workflows/... and runs/... paths resolve from the same place OpenClaw is executing in.
- A registry contract for workflows, runs, refs, events, controls, node-local working memory, and node outputs
- A shared OpenClaw skill at skills/opentask/SKILL.md
- A skill-side runtime helper at
skills/opentask/scripts/registry_helper.pyfor deterministic OpenClaw-native registry mutations - A Python core library and
opentaskCLI for operator-side deterministic state changes - A FastAPI backend that indexes the registry and exposes control APIs
- A React control plane for DAG visualization and explicit operator actions
OpenClaw remains the execution plane.
- The current Discord or channel session becomes the root orchestrator session.
- Subtasks are delegated through
sessions_spawn. - Cron keeps waking the root session until the workflow reaches a terminal state.
- Internal orchestration messages run without delivery.
- User-visible updates go out as explicit progress messages.
OpenTask becomes read-mostly control plane.
- The backend indexes the registry and exposes REST plus WebSocket endpoints.
- The web UI renders runs, DAGs, timeline events, node artifacts, and session bindings.
- Operator actions are written as explicit controls, not ad hoc in-memory mutations.
See the formal spec in docs/registry-spec.md.
<registry-root>/
workflows/
*.task.md
runs/
<runId>/
workflow.lock.md
state.json
refs.json
events.jsonl
control.jsonl
nodes/
<nodeId>/
plan.md
findings.md
progress.md
handoff.md
report.md
result.json
Key files:
state.json: UI projectionrefs.json: OpenClaw runtime bindings such as source session, root session, cron, child sessionsevents.jsonl: append-only audit trailcontrol.jsonl: explicit operator or UI control requestsnodes/<nodeId>/plan.md,findings.md,progress.md: canonical node-local working-memory paths, created lazily when a node actually needs multi-step notesnodes/<nodeId>/handoff.md: canonical parent-to-child brief for subagent nodes, typically written before dispatch
OpenClaw-native rule:
- the agent may edit
workflows/*.task.md,workflow.lock.md, and node-local artifacts directly - the agent should create
runs/<runId>/and mutateworkflow.lock.md,state.json,refs.json,events.jsonl, andcontrol.jsonlthroughpython3 skills/opentask/scripts/registry_helper.py ..., not by hand
Prerequisites:
- Python 3.12+
uv- Node.js and
pnpm - A running OpenClaw Gateway
- An OpenClaw deployment with a shared skills directory
Install dependencies:
uv sync --dev
pnpm --dir web installCommon environment variables:
export OPENTASK_REGISTRY_ROOT=$PWD
export OPENTASK_GATEWAY_URL=ws://127.0.0.1:18789
export OPENTASK_AGENT_ID=opentaskOpenTask automatically reuses local OpenClaw device auth from ~/.openclaw/identity/.
Install the OpenTask skill into the shared skills directory used by your OpenClaw deployment:
- Clone this repository and install dependencies.
- Copy or symlink skills/opentask into the OpenClaw shared skills directory as
opentask. - Set
OPENTASK_REGISTRY_ROOTto the stable registry root you want OpenTask to manage, or ensure the OpenClaw agent workspace itself is the intended registry root. - In the target OpenClaw conversation, use the installed
opentaskskill.
If the agent cannot read skills/opentask/SKILL.md, it is not installed correctly for OpenClaw yet.
The primary path is OpenClaw-native:
- The user asks for a long-running task in the current Discord or channel conversation.
- The OpenClaw agent uses skills/opentask/SKILL.md.
- The agent resolves the current
sessionKey,deliveryContext, and registry root. - The agent creates or validates a reusable workflow file under
workflows/. That source workflow should stay reusable and must not contain run-local metadata like concrete registry paths,runId, or transient status notes. - The agent runs
python3 skills/opentask/scripts/registry_helper.py scaffold ...directly from the reusable workflow frontmatter, validates the run, and only then begins execution. An explicit bootstrap spec is optional and only needed for override cases. - OpenClaw cron and subagents continue execution from there.
Operator-side equivalent:
uv run opentask run create \
--workflow-path workflows/research-demo.task.md \
--source-session-key 'agent:main:discord:channel:1234567890' \
--source-agent-id main \
--delivery-context-json '{"channel":"discord","to":"channel:1234567890"}'Validate a workflow:
uv run opentask workflow validate workflows/research-demo.task.mdPause or resume:
uv run opentask control pause <runId>
uv run opentask control resume <runId>Send an explicit progress update:
uv run opentask control send_message <runId> --message "Still running."Patch cron:
uv run opentask control patch_cron <runId> --patch-json '{"enabled": true}'Start the backend:
uv run opentask-apiThe API listens on http://127.0.0.1:8000.
Start the frontend:
pnpm --dir web devThe Vite app listens on http://127.0.0.1:5174/.
The UI is a control plane, not the primary task-start surface. It is best used for:
- viewing the registry-backed run list
- inspecting DAG structure and node artifacts
- reviewing audit events
- issuing explicit actions such as
pause,resume,retry,skip,approve,send_message, andpatch_cron
Public endpoints:
GET /api/runsGET /api/runs/{runId}GET /api/runs/{runId}/eventsPOST /api/runs/{runId}/actions/{pause|resume|retry|skip|approve|send_message|patch_cron|tick}WS /api/runs/{runId}/stream
POST /api/runs still exists, but it is now a debug and operator wrapper around the same core library. It is not the preferred production entry point.
- QUICKSTART.md
- docs/registry-spec.md
- skills/opentask/SKILL.md
- workflows/research-demo.task.md
- web/README.md
- The preferred start path assumes the OpenClaw agent can resolve the current session, delivery context, and registry root before it starts writing run files.
- Registry locking is local filesystem locking, not distributed locking.
- The frontend is intentionally read-mostly and does not offer free-form DAG editing.
- This repository still ships API debug entrypoints because they are useful for operators and tests.
