ClawFlow is a Python-first orchestration layer designed to sit in front of OpenClaw. It accepts a high-level prompt, decomposes it into a task graph, allocates agents, executes the graph, and synthesizes a final result.
This repository is scaffolded from the provided SRS with two priorities:
- Keep the orchestration core independent from OpenClaw specifics.
- Make the eventual OpenClaw integration a single adapter swap instead of a rewrite.
src/clawflow/services: orchestration pipeline componentssrc/clawflow/adapters/openclaw: integration boundary and a mock adaptersrc/clawflow/api: FastAPI app for status, pipelines, and executionsrc/clawflow/ui: lightweight dashboard served by the APItests: basic orchestration and CLI coverage
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
activate-clawflow
clawflow run "launch a social media marketing campaign for a startup"
uvicorn clawflow.api.app:app --reloadactivate-clawflow: initialize the engine and verify the configured adapterclawflow run "<prompt>": run a prompt through the orchestration pipelineclawflow status: view engine statusclawflow pipelines: inspect recent pipeline runs
The OpenClawGateway protocol in src/clawflow/adapters/openclaw/base.py is the integration contract. To wire in OpenClaw later, replace the mock gateway with a concrete implementation that:
- discovers agents from the OpenClaw registry
- dispatches task payloads to the OpenClaw execution interface
- collects results, failures, and agent health metrics
The orchestrator and API should not require structural changes once that adapter is implemented.