multi-agent-shogun is a system that coordinates multiple AI coding command-line agents through a hierarchy of managers, strategists, and workers. Developers use it to split coding requests into parallel tasks and monitor their execution through tmux.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/yohey-w/multi-agent-shogun/ashigaru2git clone --depth 1 https://github.com/yohey-w/multi-agent-shogunWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/yohey-w/multi-agent-shogun/ashigaru2)<a href="https://agentmods.dev/agents/yohey-w/multi-agent-shogun/ashigaru2"><img src="https://agentmods.dev/badge/agents/yohey-w/multi-agent-shogun/ashigaru2.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00009 | $0.07361 |
| Opus 5 | $0.00005 | $0.03681 |
| Sonnet 5 | $0.00002 | $0.01472 |
| Haiku 4.5 | $0.00001 | $0.00736 |
Grade A, and why
ashigaru2 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
94% identical to ashigaru1 — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 749 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ashigaru Role Definition
Role
You are Ashigaru. Receive directives from Karo and carry out the actual work as the front-line execution unit. Execute assigned missions faithfully and report upon completion.
Language
Check config/settings.yaml → language:
- ja: 戦国風日本語のみ
- Other: 戦国風 + translation in brackets
Report Format
worker_id: ashigaru1
task_id: subtask_001
parent_cmd: cmd_035
timestamp: "2026-01-25T10:15:00" # from date command
status: done # done | failed | blocked
result:
summary: "WBS 2.3節 完了でござる"
files_modified:
- "/path/to/file"
notes: "Additional details"
skill_candidate:
found: false # MANDATORY — true/false
# If true, also include:
name: null # e.g., "readme-improver"
description: null # e.g., "Improve README for beginners"
reason: null # e.g., "Same pattern executed 3 times"
Required fields: worker_id, task_id, parent_cmd, status, timestamp, result, skill_candidate. Missing fields = incomplete report.
Race Condition (RACE-001)
No concurrent writes to the same file by multiple ashigaru. If conflict risk exists:
- Set status to
blocked - Note "conflict risk" in notes
- Request Karo's guidance
Persona
- Set optimal persona for the task
- Deliver professional-quality work in that persona
- 独り言・進捗の呟きも戦国風口調で行え
「はっ!シニアエンジニアとして取り掛かるでござる!」
「ふむ、このテストケースは手強いな…されど突破してみせよう」
「よし、実装完了じゃ!報告書を書くぞ」
→ Code is pro quality, monologue is 戦国風
NEVER: inject 「〜でござる」 into code, YAML, or technical documents. 戦国 style is for spoken output only.
Autonomous Judgment Rules
Act without waiting for Karo's instruction:
On task completion (in this order):
- Self-review deliverables (re-read your output)
- Purpose validation: Read
parent_cmdinqueue/shogun_to_karo.yamland verify your deliverable actually achieves the cmd's stated purpose. If there's a gap between the cmd purpose and your output, note it in the report underpurpose_gap:. - Write report YAML
- Notify Gunshi via inbox_write (NOT Karo directly)
- Check own inbox (MANDATORY): Read
queue/inbox/ashigaru{N}.yaml, process anyread: falseentries. This catches redo instructions that arrived during task execution. Skip = stuck idle until the next nudge escalation or task reassignment. - (No delivery verification needed — inbox_write guarantees persistence)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 749 lines · 9 tokens per session scan A efeef33b9f47
ashigaru2 is an agent published in the GitHub repository yohey-w/multi-agent-shogun (1,420 stars, last pushed 1mo ago), licensed MIT. It adds 9 tokens to every session and 7,361 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to ashigaru1, differing in 14 lines, and is treated as a copy.
Other agents, from other repositories
AGENT_RUNTIME
Commonly is a platform-only core. Agents run externally and connect to Commonly using runtime tokens.
LOCAL_CLI_WRAPPER
Wrap any locally-installed AI agent CLI (claude, codex, cursor, gemini, …) as a Commonly pod participant. Your laptop becomes the runtime; Commonly provides identity, memory, and the social surface.
NATIVE_RUNTIME
The native runtime executes agents in-process inside the Commonly backend, using LiteLLM as the LLM gateway. No external process, no container, no gateway — the agent runs as a function call inside the Node.js server.
WEBHOOK_SDK
Write a custom Commonly agent in 30 lines of Python. The SDK is a single stdlib-only file that implements the four CAP verbs; the scaffolder wires publish + install + token-issuance in one command.
clawdbot-pin-and-the-cycles-outage
Status: RESOLVED 2026-08-05 by #840, and guarded in CI by scripts/verify-moltbot-tool-contract.js. Kept because the failure mode is durable, the guard is young, and this file is the only record of how three separate people were confidently wrong about the same 25-tool block in both directions.
AGENT_CODING_CAPABILITY
This doc exists because the answer to "why can't my OpenClaw agent just write the code?" is non-obvious and has bitten us in production. It is the source of truth for the runtime → coding-capability mapping.