| name | wanman-agent-matrix |
| description | Expert skill for using wanman, the open-source local agent matrix runtime that coordinates multiple Claude Code or Codex agents on your machine. |
| triggers | ["set up wanman agent matrix","run multiple claude code agents","coordinate agents with wanman","wanman takeover my repo","send messages between agents wanman","wanman task management","orchestrate codex agents locally","wanman supervisor setup"] |
wanman Agent Matrix Runtime
Skill by ara.so — Daily 2026 Skills collection.
wanman is an open-source local agent matrix framework that runs a supervised network of Claude Code or Codex agents on your machine, coordinated through a JSON-RPC supervisor. Inspired by Japanese ワンマン電車 (one-man trains), it lets the human step back into an observer role while agents collaborate autonomously.
Installation & Setup
Prerequisites
- Node.js 20+
- pnpm 9+
- git
- A logged-in Claude Code or Codex CLI
Install from Source
git clone git@github.com:chekusu/wanman.git wanman.dev
cd wanman.dev
pnpm install
pnpm build
pnpm --filter @wanman/cli exec wanman takeover /path/to/any/git/repo
Single-file Bundle
pnpm --filter @wanman/cli standalone
node packages/cli/dist/wanman.mjs takeover /path/to/any/git/repo
Add to PATH
After building, symlink or alias the CLI so you can run wanman from any project:
export PATH="$PATH:/path/to/wanman.dev/packages/cli/dist"
wanman takeover .
Key CLI Commands
| Command | Description |
|---|
wanman takeover <path> | Take over an existing git repo with the full agent matrix |
wanman run <goal> | Start an agent matrix for a one-shot goal |
wanman send <agent> <msg> | Send a message to an agent (--steer interrupts target) |
wanman recv [--agent <name>] | Receive and mark pending messages as delivered |
wanman agents | List registered agents and their current states |
wanman escalate <msg> | Escalate a message to the CEO agent |
wanman watch | Live-stream supervisor and agent activity |
wanman task create | Create a task in the shared pool |
wanman task list | List all tasks |
wanman task get <id> | Get task details |
wanman task update <id> | Update task status/fields |
wanman task done <id> | Mark a task as complete |
wanman initiative create | Create a long-lived initiative |
wanman initiative list | List initiatives |
wanman capsule create | Create a change capsule |
wanman capsule list | List change capsules |
wanman capsule mine | List capsules owned by current agent |
wanman artifact put | Store a structured artifact |
wanman artifact list | List stored artifacts |
wanman artifact get <id> | Retrieve an artifact |
wanman hypothesis create | Create a hypothesis to track |
wanman hypothesis list |
Configuration
Environment Variables
export WANMAN_URL=http://localhost:3120
export WANMAN_AGENT_NAME=dev
export WANMAN_RUNTIME=claude
export WANMAN_MODEL=claude-opus-4-5
export WANMAN_CODEX_MODEL=o4-mini
export WANMAN_CODEX_REASONING_EFFORT=high
export WANMAN_CODEX_FAST=1
export WANMAN_SKILL_SNAPSHOTS_DIR=/tmp/my-skill-snapshots
Agent Configuration File
Agent definitions live in a single JSON file (typically .wanman/config.json):
{
"agents": [
{
"name": "ceo",
"lifecycle": "24/7",
"model": "high",
"systemPrompt": "You are the CEO agent. Coordinate all other agents, prioritize tasks, and escalate blockers."
},
{
"name": "dev",
"lifecycle": "on-demand",
"model": "standard",
"systemPrompt": "You are the dev agent. Implement features, fix bugs, and write tests."
},
{
"name": "devops",
"lifecycle": "on-demand",
"model": "standard",
"systemPrompt":
Agent Lifecycle Options
24/7 — Continuous respawn loop; agent always running.
on-demand — Idle until triggered by a message or task.
idle_cached — Idle until triggered, but preserves Claude session_id across triggers via claude --resume. Claude-only — pairing with codex runtime is rejected at startup.
Model Tiers
high — Maps to highest-capability model for the selected runtime.
standard — Maps to balanced default model; overridable via WANMAN_MODEL or WANMAN_CODEX_MODEL.
Architecture Overview
+----------------+ +--------------------+ +-----------------+
| wanman CLI | JSON | Supervisor | spawn | Agent process |
| (host shell) | ---RPC-->| (local process) | -------> | (Claude/Codex) |
| | /rpc | message/context/ | | per-agent $HOME|
| | | task/artifact | | per-agent wt |
+----------------+ +--------------------+ +-----------------+
| |
v v
+--------------------+ +-----------------+
| files + SQLite | | worktree |
+--------------------+ +-----------------+
- The CLI communicates with the Supervisor via JSON-RPC 2.0 over HTTP.
- The Supervisor owns: message store, context store, task pool, artifact store, and spawns child agent processes.
- Each agent runs in an isolated per-agent worktree and per-agent
$HOME, so agents never mutate your working directory or shell profile.
Common Patterns & Workflows
Pattern 1: Take Over an Existing Repo
cd /path/to/my-project
wanman takeover .
wanman watch
Pattern 2: Send a Goal and Monitor Progress
wanman run "Refactor the authentication module to use JWT tokens"
wanman watch
wanman agents
wanman escalate "Dev agent is stuck on the JWT library choice, please decide"
Pattern 3: Inter-Agent Messaging
wanman send dev "Please add unit tests for the UserService class"
wanman send dev --steer "STOP current task. Critical bug in auth — fix login endpoint first"
WANMAN_AGENT_NAME=dev wanman recv
wanman recv
Pattern 4: Task Pool Management
wanman task create \
--title "Write integration tests" \
--description "Cover all API endpoints with integration tests" \
--agent dev \
--after abc123
wanman task list
wanman task get <task-id>
wanman task update <task-id> --status in-progress
wanman task done <task-id>
Pattern 5: Shared Context Store
wanman context set api_base_url "https://api.example.com/v2"
wanman context set target_environment "staging"
wanman context get api_base_url
Pattern 6: Artifact Storage
wanman artifact put \
--name "market-analysis-q2" \
--type "report" \
--content "$(cat analysis.md)"
wanman artifact list
wanman artifact get <artifact-id>
Pattern 7: Hypothesis Tracking
wanman hypothesis create \
--title "Switching to Bun runtime reduces build time by 40%" \
--description "Based on benchmarks from similar TypeScript projects"
wanman hypothesis list
wanman hypothesis update <id> --status confirmed --evidence "Build time dropped from 45s to 26s"
Pattern 8: Change Capsules
wanman capsule create \
--title "Auth JWT migration" \
--description "Migrate session-based auth to JWT"
wanman capsule list
WANMAN_AGENT_NAME=dev wanman capsule mine
wanman capsule get <capsule-id>
TypeScript Integration (Host SDK)
Embed wanman into your own tools using the @wanman/host-sdk package:
import { WanmanClient } from '@wanman/host-sdk';
const client = new WanmanClient({
url: process.env.WANMAN_URL ?? 'http://localhost:3120',
});
await client.send({
agent: 'dev',
message: 'Please review the PR and add inline comments',
steer: false,
});
const task = await client.task.create({
title: 'Fix flaky tests',
description: 'Tests in auth.test.ts fail intermittently under CI',
agent: 'dev',
});
const agents = await client.agents.list();
for (const agent of agents) {
console.log(`${agent.name}: ${agent.state}`);
}
await client.artifact.put({
name: 'perf-baseline',
: ,
: .(perfResults),
});
env = client..();
Project Structure
wanman.dev/
packages/
cli/ # wanman CLI (send/recv/task/artifact/run/takeover/...)
core/ # Shared types, JSON-RPC protocol, skills (core/skills/)
host-sdk/ # Host-side SDK for embedding wanman into other tools
runtime/ # Supervisor, agent process manager, SQLite stores, adapters
docs/
quickstart.md
architecture.md
CONTRIBUTING.md
Built-in Shared Skills (packages/core/skills/)
Skills are auto-discovered by agents at ~/.claude/skills/:
artifact-naming — Conventions for naming agent-produced artifacts.
artifact-quality — Quality standards for artifacts.
cross-validation — CEO consistency checks across agent outputs.
research-methodology — Market/data research methodology.
wanman-cli — CLI command reference consumed by agents at runtime.
workspace-conventions — File-system conventions inside agent workspaces.
Validate Skills
wanman skill:check
wanman skill:check packages/core/skills/wanman-cli.md
Testing
pnpm typecheck
pnpm test
pnpm exec vitest run \
--coverage \
--coverage.reporter=text-summary \
--coverage.reporter=json-summary \
--coverage.exclude='**/dist/**'
Troubleshooting
Supervisor Not Reachable
curl http://localhost:3120/rpc
export WANMAN_URL=http://localhost:4000
wanman agents
Agent Stuck / Not Responding
wanman agents
wanman send <agent-name> --steer "Reset and await new instructions"
wanman escalate "Agent 'dev' appears stuck on task <task-id>, please reassign"
wanman watch
idle_cached Lifecycle with Wrong Runtime
Error: idle_cached lifecycle requires Claude runtime; codex has no resume mechanism
Fix: Only use lifecycle: "idle_cached" when WANMAN_RUNTIME=claude (or unset, as Claude is the default). Switch lifecycle to on-demand for Codex agents.
Agents Mutating Wrong Directory
Each agent runs in its own git worktree under workspaceRoot (default: .wanman/agents/). If an agent appears to be modifying wrong files, check workspaceRoot in your config and ensure WANMAN_AGENT_NAME is set correctly in agent subprocesses.
SQLite Lock Errors
If the supervisor crashes mid-run, the SQLite file at dbPath may be locked:
pkill -f wanman
rm .wanman/wanman.db-wal .wanman/wanman.db-shm
wanman takeover .
Skill Validation Failures
wanman skill:check
Further Reading