ClawTeam-OpenClaw

repository·main·Indexed 23 days ago

https://github.com/win4r/clawteam-openclaw

A multi-agent swarm coordination framework for CLI coding agents. It enables agents to self-organize into teams, split tasks, and communicate via CLI-injected commands. Key features include workspace isolation using Git worktrees, a shared kanban task tracking system, point-to-point messaging, and monitoring via a Web UI or tmux. It supports integration with OpenClaw, Claude Code, Codex, and Hermes Agent, and allows for team orchestration via TOML templates.

Tokens
55.5K
Snippets
114
Records
279
Agent score
67%

What's inside ClawTeam-OpenClaw

  1. Overview of ClawTeam-OpenClaw

    main

    ClawTeam-OpenClaw is a multi-agent swarm orchestration layer designed for CLI coding agents. It allows AI agents to autonomously form teams, divide tasks, communicate, and converge on results without heavy manual orchestration code.

    Key features include:

    • Agent-driven orchestration: The agents themselves use the clawteam CLI to manage the team, rather than a human writing orchestration logic.
    • Isolation via Git worktrees: Each worker agent operates in its own Git worktree and tmux window, ensuring environment separation.
    • Broad Agent Support: Works with OpenClaw (default), Claude Code, Codex, nanobot, Cursor, and any custom CLI agent via subprocess.
    • Lightweight Infrastructure: Uses the local file system and tmux instead of complex message queues or databases.
  2. What is ClawTeam (Agent Swarm Intelligence)

    main

    ClawTeam is an agent swarm intelligence platform designed to evolve AI agents from solo entities into collaborative teams. Instead of humans manually orchestrating multiple agents, ClawTeam allows AI agents to form their own teams, decompose complex tasks, share insights in real-time, and dynamically adjust strategies.

    Key capabilities include:

    • Specialized Sub-agent Creation: Agents get their own dedicated environments and focus areas.
    • Intelligent Task Distribution: Tasks are assigned considering dependencies.
    • Real-time Collaboration: Agents communicate naturally via CLI-based messaging.
    • Team Performance Monitoring: Tracking progress and identifying bottlenecks.
    • Dynamic Strategy Adjustment: Reallocating resources and modifying directions autonomously.

    ClawTeam is compatible with various CLI agents including Claude Code, Codex, OpenClaw, nanobot, and Cursor.

  3. ClawTeam Roadmap and Version History

    main

    The ClawTeam development roadmap outlines the evolution of the platform from file and P2P transmission to production-grade features.

    • v0.3 (Released): File + P2P transmission, Web interface, multi-user support, and templates.
    • v0.4 (Planned): Redis transmission for cross-machine messaging.
    • v0.5 (Planned): Shared state layer for cross-machine team configuration.
    • v0.6 (Exploring): Agent marketplace for community templates.
    • v0.7 (Exploring): Adaptive scheduling for dynamic task reallocation.
    • v1.0 (Exploring): Production-grade features including authentication, permissions, and audit logs.
  4. Key Features of ClawTeam

    main

    ClawTeam is a multi-agent orchestration platform that provides:

    • Agent Self-Organization: Leaders manage workers with auto-injected coordination prompts and status reporting.
    • Workspace Isolation: Each agent operates in its own git worktree (branch naming: clawteam/{team}/{agent}) to prevent merge conflicts.
    • Task Tracking: A shared kanban system (pendingin_progresscompleted / blocked) with --blocked-by dependency chains that auto-unblock upon task completion.
    • Inter-Agent Messaging: Point-to-point inboxes (send, receive, peek) and broadcast capabilities using file-based or ZeroMQ P2P transport.
    • Monitoring: Terminal kanban (board show), live dashboards (board live), tiled tmux views (board attach), and a Web UI (board serve).
    • Team Templates: TOML-based archetypes that can be launched via clawteam launch <template> with variable substitution for {goal}, {team_name}, and {agent_name}.
  5. ClawTeam Project Roadmap

    main

    The project is evolving through several planned stages:

    • v0.3 (Released): File + P2P transfer, Web dashboard, multi-user support, and templates.
    • v0.4 (Planned): Redis transfer for cross-machine message communication.
    • v0.5 (Planned): Shared state layer for cross-machine team configuration.
    • v0.6 (Exploring): Agent marketplace for community templates.
    • v0.7 (Exploring): Adaptive scheduling for dynamic task reallocation.
    • v1.0 (Exploring): Production-grade features including authentication, permissions, and audit logs.
  6. Core Features of ClawTeam

    main

    ClawTeam provides a multi-agent orchestration layer for OpenClaw agents. Key capabilities include:

    • Agent Self-Organization: A leader agent spawns and manages workers. Coordination is handled via automatically injected prompts, requiring zero manual setup. Workers report status and idle states automatically.
    • Workspace Isolation: Each agent operates within its own git worktree. This prevents merge conflicts between parallel agents. Branches are named using the pattern clawteam/{team}/{agent}. Commands are available for creating checkpoints, merging, and cleaning up.
    • Task Tracking with Dependencies: Uses a Kanban model (pendingin_progresscompleted / blocked). Tasks can use the --blocked-by flag to create dependency chains, which automatically unblock dependent tasks upon completion. The task wait command blocks execution until specific tasks are finished.
    • Inter-Agent Messaging: Supports bidirectional messaging (send, receive, view) and broadcasting to all team members. Transport defaults to file-based but supports ZeroMQ P2P.
    • Monitoring and Dashboards:
      • board show: Terminal-based Kanban board.
      • board live: Auto-refreshing dashboard.
      • board attach: Tiled tmux view of all agents.
      • board serve: Real-time web interface.
    • Command Templates: Define agent archetypes (roles, tasks, prompts) using TOML files. Use clawteam launch <template> to start. Templates support variable substitution for {goal}, {team_name}, and {agent_name}.
  7. ClawTeam Roadmap

    main

    The project roadmap outlines planned features for upcoming versions:

    • v0.3 (Current): File transport + P2P, Web interface, multi-user support, templates.
    • v0.4: Redis transport for inter-machine messaging.
    • v0.5: Shared state layer for inter-machine team configuration.
    • v0.6: Agent Marketplace for community templates.
    • v0.7: Adaptive planning for dynamic task reassignment.
    • v1.0: Production quality (authentication, permissions, audit logs).
  8. Integrate OpenClaw with ClawTeam

    main
    ClawTeam transforms OpenClaw from isolated agents into a coordinated multi-agent platform. When integrated, a Leader agent autonomously splits tasks, assigns them to workers, and monitors progress. Workers benefit from isolated git worktrees and direct point-to-point communication instead of relying solely on an AGI relay.
  9. How P2PTransport handles online agents via ZMQ

    main

    When both the sender (Agent A) and receiver (Agent B) are online, P2PTransport uses ZeroMQ (ZMQ) for direct TCP communication.

    Workflow:

    1. Receiver Setup: The receiver (Agent B) starts a listener by calling _start_listener(), which performs a PULL.bind(:port) and writes its connection info to peers/B.json.
    2. Sender Action: Agent A calls send("A", "B", data). The MailboxManager delivers this to P2PTransport.
    3. Connection: P2PTransport reads peers/B.json to find the address (e.g., tcp://hostB:port), verifies the target PID is alive, and performs a PUSH.connect(addr) followed by PUSH.send(data).
    4. Reception: The receiver's PULL.recv() captures the data, and the agent retrieves it via receive("B").
      Agent A (sender)        MailboxManager         P2PTransport               Agent B (receiver)
           │                       │                      │                          │
           │                       │                      │    _start_listener()     │
           │                       │                      │    ┌──────────────────┐  │
           │                       │                      │    │ PULL.bind(:port) │  │
           │                       │                      │    │ 写 peers/B.json  │  │
           │                       │                      │    └──────────────────┘  │
           │                       │                      │                          │
           │  send("A","B","hi")   │                      │                          │
           │──────────────────────►│                      │                          │
           │                       │  deliver("B", data)  │                      │
           │─────────────────────►│                      │                          │
           │                       │                      │                          │
           │                       │                      │  读 peers/B.json         │
           │                       │                      │  → tcp://hostB:port      │
           │                       │                      │  检查 PID 存活? ✓        │
           │                       │                      │  PUSH.connect(addr)      │
           │                       │                      │  PUSH.send(data)         │
           │                       │                      │─────── ZMQ TCP ─────────►│
           │                       │                      │                          │
           │                       │                      │  PULL.recv()              │
           │                       │                      │  收到 data!               │
           │◄─────── ok ───────────│                      │                          │
           │                       │                      │                          │
           │                       │          receive("B") │                      │
           │                       │◄─────────────────────────│                      │
           │                       │  PULL.recv(NOBLOCK)    │                      │
           │                       │  → data                │                      │
           │                       │  (+ 检查文件兜底)       │                      │
           │──── [bytes] ──────────►│                      │                      │
           │                       │                      │                      │
  10. Understand ClawTeam Transport modes

    main

    ClawTeam uses different transport mechanisms for communication between agents:

    • file (Default): Uses JSON files within the inbox directory. Best for single machines or shared filesystems.
    • p2p: Uses ZeroMQ PUSH/PULL with a file fallback. Designed for lower latency and more dynamic environments.
  11. Isolate agent work with Git Worktrees

    main

    To prevent merge conflicts during parallel development, every agent is assigned its own isolated Git Worktree. Branches are automatically named using the pattern clawteam/{team}/{agent}. You can manage these workspaces using workspace commands to checkpoint, merge, or clean up.

    # Manage agent workspaces
    clawteam workspace list <team>
    clawteam workspace checkpoint <team> <agent>    # auto-commit
    clawteam workspace merge <team> <agent>         # merge back to main
    clawteam workspace cleanup <team> <agent>       # remove worktree
  12. How ClawTeam coordinates multi-agent swarms

    main

    ClawTeam is a coordination layer for CLI-based programming agents (like OpenClaw, Claude Code, or nanobot). Instead of a human writing orchestration code, the agents themselves use the clawteam CLI to self-organize into teams.

    Key concepts include:

    • Agent-led Orchestration: Agents use the CLI to split tasks, spawn workers, and communicate without manual micro-management.
    • Isolation via Git Worktrees: Each worker agent is spawned with its own git worktree, ensuring they work on real branches without interfering with each other's file state.
    • Communication via CLI: Agents communicate by sending messages to an 'inbox' or updating task lists using CLI commands, which are automatically injected into their prompts.
    • Observability: Users can monitor the swarm's progress using a tmux mosaic view or a web dashboard.
    clawteam spawn --team my-team \
      --agent-name worker1 \
      --task "Implement auth module"