← Back to Skills Marketplace
srikanth235

Clawflow

by srikanth235 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1527
Downloads
0
Stars
18
Active Installs
1
Versions
Install in OpenClaw
/install clawflow
Description
Protocol for multi-agent collaboration via OpenClaw's message-passing and recursive task DAGs. Use this skill whenever the user wants to coordinate work acro...
README (SKILL.md)

Clawflow

A protocol for OpenClaw agents collaborating through messages and recursive task DAGs.

Mental model: Think of a consulting firm. Anyone can receive a project. If they can do it alone, they do. If it's too big, they break it into pieces, hand each piece to a colleague, collect the results, and synthesise. Those colleagues might do the same. There are no fixed "managers" and "workers." Every agent speaks the same protocol.

When to Read References

  • Message formats, task file structure, status codes → references/schemas.md
  • The decision loop every agent runs → references/agent-loop.md
  • DAG decomposition, context passing, synthesis → references/coordinating.md

Core Principles

  1. One protocol, fluid roles — every agent is structurally identical. Any agent can execute work directly or decompose and delegate. The role emerges from the task.
  2. OpenClaw is the backbone — agent identity comes from openclaw.json config, peer discovery from openclaw agents list, and message transport from openclaw agent --agent \x3Cid> --message "...". No custom identity or peer files.
  3. Recursive DAGs — an agent that delegates becomes a coordinator for that sub-DAG. Its parent doesn't know or care. DAGs nest naturally.
  4. Workspace = working memory — each agent's OpenClaw workspace is its private scratchpad. Task state lives in workspace files. No agent reads another's workspace.

How It Works

Agent A receives a task
  → Can I do this alone?
     YES → Execute, reply with results
     NO  → Decompose into sub-DAG
           → Dispatch subtasks to Agents B, C via openclaw agent
           → Agent B receives its subtask
              → Can I do this alone?
                 YES → Execute, reply to A
                 NO  → Decompose further, dispatch to D, E...
           → Agent C executes, replies to A
           → A collects all replies, synthesises, replies to *its* parent

Every level looks the same. An agent at any depth follows the same loop.


Integration with OpenClaw

Agent Identity

Comes from the OpenClaw configuration. Do NOT create custom identity files.

  • Config source: openclaw.jsonagents.list[].id, agents.list[].identity
  • Workspace source: IDENTITY.md in the agent's workspace root
  • Read with: openclaw agents list or from injected bootstrap context

Each agent already knows who it is — its id, name, emoji, and theme are injected into the session context on every turn via the workspace bootstrap files (IDENTITY.md, SOUL.md, AGENTS.md).

Peer Discovery

Discover available agents from OpenClaw configuration. Do NOT maintain a separate peers file.

# List all configured agents
openclaw agents list

# The config defines them:
# agents.list[].id        → agent identifier (used in --agent flag)
# agents.list[].workspace → their workspace path
# agents.list[].model     → their model

An agent's subagents.allowAgents config controls which agents it can delegate to. ["*"] means it can reach any agent.

Sending Tasks to Peers

Use the OpenClaw CLI to send a task message to another agent:

# Send a task to a specific agent
openclaw agent --agent data-extractor --message "Extract Q3 sales from sales.csv"

# The receiving agent gets this in its session, processes it,
# and the response comes back through the same mechanism

For structured task dispatch with metadata, write the task message to a file and reference it:

openclaw agent --agent data-extractor \
  --message "$(cat workspace/tasks/task-abc/dispatch-st-extract.md)"

Workspace Layout for Clawflow

Each agent uses its existing OpenClaw workspace. Clawflow adds a tasks/ directory:

\x3Cagent-workspace>/                   ← OpenClaw workspace root
  IDENTITY.md                        ← Agent identity (OpenClaw-managed)
  AGENTS.md                          ← Operating instructions (OpenClaw-managed)
  SOUL.md                            ← Persona (OpenClaw-managed)
  mailbox/                           ← Agent-level message log (all tasks)
    inbox/                           ← Incoming messages before processing
    outbox/                          ← Outgoing messages (dispatches + replies sent)
    archive/                         ← Processed messages (durable audit trail)
  tasks/                             ← Clawflow working directory
    {task-id}/
      task.md                        ← DAG definition + progress + results
  skills/
    clawflow/                        ← This skill
      SKILL.md
      ...

Clawflow adds two top-level directories to the workspace:

  • mailbox/ — agent-level message log, independent of any task. Every message the agent sends or receives is logged here. inbox/ holds unprocessed arrivals, outbox/ logs what was sent, archive/ holds processed messages. This is the durable audit trail — OpenClaw session history compacts over time, the mailbox doesn't.
  • tasks/ — one subdirectory per task with a task.md tracking DAG state, subtask results, and the final synthesised output.

The Agent Loop

When an agent receives a task (via openclaw agent --message):

1. Parse the message
2. Is it a TASK from a parent?
   → Create task.md in workspace/tasks/{task-id}/
   → DECIDE: execute directly or decompose?
     → Direct: do the work, reply with results
     → Decompose: build sub-DAG in task.md, dispatch subtasks via openclaw agent
3. Is it a REPLY from a peer I delegated to?
   → Update sub-DAG in task.md (mark subtask done, store results)
   → Dispatch any newly unblocked subtasks
   → If all subtasks done → synthesise results, reply to parent

Read references/agent-loop.md for the full decision logic and edge cases.


Delegation Decision

When an agent receives a task, it decides: do it myself or delegate?

Execute directly when:

  • The task is within the agent's own capabilities
  • It's simple enough that decomposition adds overhead
  • No relevant peer agents are configured

Decompose and delegate when:

  • The task requires capabilities the agent doesn't have
  • The task has naturally parallel parts
  • The task is large enough that breaking it up reduces complexity

This is a judgment call. The protocol doesn't force it — the agent decides.


DAG Dependency Resolution

When coordinating a sub-DAG, the agent tracks subtask status in task.md:

def get_ready_subtasks(dag):
    """Subtasks whose dependencies are all done and haven't been dispatched yet."""
    return [
        sid for sid, st in dag.subtasks.items()
        if st.status == 'pending'
        and all(dag.subtasks[dep].status == 'done' for dep in st.depends_on)
    ]

Called after every reply. Newly unblocked subtasks get dispatched immediately.


Error Handling (V1)

Fail-fast. No retries, no partial recovery.

Scenario Behaviour
Peer fails a subtask Agent marks its own task failed, replies with error to parent
Duplicate message Idempotency check — skip if task already in-progress or done
Agent crashes Task file in workspace preserves state; restart resumes from task.md

Errors propagate upward. Future versions will add retry and partial recovery.


Implementation Checklist

  1. Verify agent configurationopenclaw agents list to see available agents.
  2. Check subagent permissions — ensure subagents.allowAgents includes target agents.
  3. Implement the agent loop — follow references/agent-loop.md.
  4. Use message templatesscripts/message.py generates structured task/reply messages.
  5. Test a 2-level chain — agent A delegates to B, B executes and replies.
  6. Test fan-out — agent A delegates to B and C in parallel.
  7. Test recursion — agent A → B → C.

Out of Scope (V1)

  • Large result attachments (Google Drive layer)
  • Task retry / partial DAG recovery
  • Agent health checks
  • Progress streaming
  • Cross-agent workspace access (by design, forever)
Usage Guidance
This skill appears to do what it says: implement a local protocol for coordinating OpenClaw agents using the OpenClaw CLI and workspace files. Before installing, review and accept these practical consequences: it will create mailbox/ and tasks/ directories under whatever workspace you initialize (local file writes), it will call the openclaw CLI to read agent config and to dispatch messages (so ensure openclaw is installed and configured), and dispatch messages must include whatever context you send — do not include secrets or private data in task messages. Also review which agents are reachable via openclaw agents list and your subagents.allowAgents settings (restrict to trusted peers if needed). If you want extra assurance, inspect message.py and init.py (they contain no network calls or credential exfiltration logic) and test in a sandbox workspace first.
Capability Analysis
Type: OpenClaw Skill Name: clawflow Version: 1.0.0 The OpenClaw AgentSkills skill bundle is classified as suspicious due to a significant prompt injection vulnerability inherent in its design. The `SKILL.md`, `agent-loop.md`, `coordinating.md`, and `schemas.md` documents explicitly instruct the AI agent to embed 'upstream results' directly into the 'Context' section of dispatch messages for dependent subtasks. This means that if a malicious or compromised sub-agent returns crafted instructions or payloads as its 'results', the coordinating agent is designed to forward these unsanitized instructions as context to subsequent agents, potentially leading to a chain of prompt injections and unauthorized control over other agents in the DAG. The `init.py` and `message.py` scripts are utility files that appear benign and do not introduce direct vulnerabilities or malicious behavior themselves.
Capability Assessment
Purpose & Capability
Name/description (multi-agent coordination) match the delivered artifacts: SKILL.md documents a message/DAG protocol and the code provides helpers to create dispatch/reply/task files and to initialize workspace directories. All external interactions are via the OpenClaw CLI (openclaw agents list, openclaw agent, openclaw config), which is exactly what a coordination skill would need.
Instruction Scope
Runtime instructions are specific: log incoming messages to mailbox/, create tasks/ task.md files, decompose DAGs, and dispatch via openclaw CLI. They do not instruct the agent to read unrelated system files, fetch resources from arbitrary web URLs, or exfiltrate secrets. They do require writing and reading workspace files (IDENTITY.md, SOUL.md, AGENTS.md, mailbox/, tasks/) which is consistent with the stated workspace-based design.
Install Mechanism
No install spec is provided (instruction-only with helper scripts included). The included Python files do not download or execute remote code; they only write local files and call the OpenClaw CLI. This is a low-risk, expected form factor for a protocol/utility skill.
Credentials
The skill requires no environment variables or external credentials. Its subprocess calls use the OpenClaw CLI to read configuration and agent lists; that is proportional to a coordination protocol. No secrets or unrelated service keys are requested.
Persistence & Privilege
always is false and the skill does not request elevated/system-wide privileges. It creates directories and files inside the agent's workspace only (mailbox/, tasks/), which is consistent with its purpose and expected persistence scope.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install clawflow
  3. After installation, invoke the skill by name or use /clawflow
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Clawflow 1.0.0 – Protocol for Multi-Agent Coordination via OpenClaw - Introduces a skill for coordinating complex workflows among multiple OpenClaw agents using message passing and recursive task DAGs. - Provides detailed guidance for when and how to break projects into parallel subtasks handled by different agents. - Outlines protocols for agent identity, peer discovery, and workspace organization relying exclusively on OpenClaw’s native configuration. - Specifies agent interaction patterns including direct execution, delegation, and DAG-based dependency management. - Defines a durable message audit log and standardizes task state storage within agent workspaces. - Documents the agent decision loop, error handling, and best practices for task decomposition.
Metadata
Slug clawflow
Version 1.0.0
License
All-time Installs 21
Active Installs 18
Total Versions 1
Frequently Asked Questions

What is Clawflow?

Protocol for multi-agent collaboration via OpenClaw's message-passing and recursive task DAGs. Use this skill whenever the user wants to coordinate work acro... It is an AI Agent Skill for Claude Code / OpenClaw, with 1527 downloads so far.

How do I install Clawflow?

Run "/install clawflow" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Clawflow free?

Yes, Clawflow is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Clawflow support?

Clawflow is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Clawflow?

It is built and maintained by srikanth235 (@srikanth235); the current version is v1.0.0.

💬 Comments