Recursive Swarm for Openclaw

A bounded recursive orchestration skill that decomposes massive tasks into manageable, trackable sub-task trees with explicit state management.

plgonzalezrx8
v0.1.1
Mar 6, 2026
0
903
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install recursive-swarm

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install recursive-swarm using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Recursive Swarm?

Recursive Swarm is an advanced orchestration framework designed for Openclaw Skills to handle tasks too complex for a single agent turn. It transforms messy, multi-layered objectives into a structured task tree with explicit node states, audit logs, and artifact management. By enforcing a bounded recursion depth and controlled fan-out, it prevents agent loops while ensuring comprehensive coverage of sub-problems across research, coding, and operations.

This skill is particularly effective for scenarios where tasks can be clearly decomposed into independent workstreams that require individual execution before being synthesized into a final result. It bridges the gap between simple command execution and complex, multi-agent project management by providing a standardized lifecycle for task evolution, from initialization to the final skeptical review pass.

Recursive Swarm Use Cases

  • Breaking down large-scale research projects into multi-angle investigation streams.
  • Managing complex coding tasks that require separate backend, frontend, and testing worktrees.
  • Auditing large systems and synthesizing remediation steps from multiple findings.
  • Reconstructing historical timelines or datasets from fragmented exported messages.
  • Performing multi-step browser automation that requires intermediate analysis and decision-making.

How Recursive Swarm Works

  1. Initialize a dedicated run folder using specialized scripts to establish the structured environment for the task tree.
  2. Create a root node that defines the primary goal, node type, and execution constraints such as maximum depth and fan-out.
  3. Decompose composite tasks into 2-5 concrete child nodes, assigning specialized types like research, coding, or synthesis.
  4. Execute leaf nodes using the most appropriate runner, prioritizing subagents for analysis and direct tools or ACP sessions for technical implementations.
  5. Persist state changes and audit events to an append-only JSONL log to maintain a transparent history of the agent's logic.
  6. Merge child results upward through the tree once sub-tasks are complete, utilizing type-aware merging to synthesize findings or code.
  7. Conduct a final skeptical review pass to challenge overconfident claims and ensure the final output meets the initial project requirements.

Recursive Swarm Setup

To begin using this orchestration pattern in Openclaw Skills, ensure your environment is configured for script execution. Use the following commands to initialize and manage a run:

# Initialize a new recursive run folder
python3 scripts/init_run.py

# Define and record the root task node in the state tree
python3 scripts/upsert_node.py --goal "Your complex task here" --type "research"

# List all nodes currently ready for execution
python3 scripts/list_ready_nodes.py

# Render the current state of the task tree for visualization
python3 scripts/render_tree.py

Recursive Swarm Data Schema & Taxonomy

Recursive Swarm organizes its lifecycle within a specific directory structure to ensure data persistence and auditability:

File/Folder Description
tree.json The canonical state and hierarchy of the entire task tree.
events.jsonl An append-only audit log of all agent actions and status transitions.
nodes/ Directory containing subfolders for every individual node in the tree.
nodes/<id>/spec.json Metadata, goals, and configuration for a specific task node.
nodes/<id>/result.md The final markdown-formatted result or artifact produced by that node.
summary.md A high-level overview of the entire run and its final conclusions.

Recursive Swarm Advanced Features

  • Quiet child execution using the ANNOUNCE_SKIP pattern to minimize noise in user communication channels.
  • Support for git worktrees to provide isolated environments for parallel coding tasks within a single repository.
  • Specialized node types for synthesis and review, allowing for automated reconciliation of conflicting data.
  • Configurable depth caps and fan-out limits to prevent resource exhaustion and infinite recursion.
  • Integrated approval gates that pause execution for sensitive or destructive system actions.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*