经 AI Skill Hub 精选评估,multi-agent-shogun Agent工作流 获评「强烈推荐」。已获得 1.3k 颗 GitHub Star,这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
基于Claude的开源多智能体编排系统,采用武士风格架构设计,支持并行任务协调。适合需要构建复杂AI工作流、自动化多步骤任务的开发者和企业用户。
multi-agent-shogun Agent工作流 是一款基于 Shell 开发的开源工具,专注于 多智能体、工作流编排、Claude 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
基于Claude的开源多智能体编排系统,采用武士风格架构设计,支持并行任务协调。适合需要构建复杂AI工作流、自动化多步骤任务的开发者和企业用户。
multi-agent-shogun Agent工作流 是一款基于 Shell 开发的开源工具,专注于 多智能体、工作流编排、Claude 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/yohey-w/multi-agent-shogun cd multi-agent-shogun # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 multi-agent-shogun --help # 基本运行 multi-agent-shogun [options] <input> # 详细使用说明请查阅文档 # https://github.com/yohey-w/multi-agent-shogun
# multi-agent-shogun 配置说明 # 查看配置选项 multi-agent-shogun --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export MULTI_AGENT_SHOGUN_CONFIG="/path/to/config.yml"
WSL2 (Windows Subsystem for Linux) lets you run Linux inside Windows. This system uses tmux (a Linux tool) to manage multiple AI agents, so WSL2 is required on Windows.
Tasks can declare dependencies on other tasks using blockedBy:
```yaml
```bash
./first_setup.sh ```
first_setup.sh)Whichever option you chose, 10 AI agents are automatically launched:
| Agent | Role | Count |
|---|---|---|
| 🏯 Shogun | Supreme commander — receives your orders | 1 |
| 📋 Karo | Manager — distributes tasks, quality checks | 1 |
| ⚔️ Ashigaru | Workers — execute implementation tasks in parallel | 7 |
| 🧠 Gunshi | Strategist — handles analysis, evaluation, and design | 1 |
Two tmux sessions are created: - shogun — connect here to give commands - multiagent — Karo, Ashigaru, and Gunshi running in the background
---
git init --bare ~/.shogun-private.git alias privategit='git --git-dir=$HOME/.shogun-private.git --work-tree=/path/to/multi-agent-shogun' privategit remote add origin https://github.com/YOU/shogun-private.git
MCP (Model Context Protocol) servers extend Claude's capabilities. Here's how to set them up:
Add MCP servers with these commands:
```bash
Requirements: tmux, bash 4+, at least one of: Claude Code / Codex / Copilot / Kimi / OpenCode / Antigravity
git clone https://github.com/yohey-w/multi-agent-shogun
cd multi-agent-shogun
bash first_setup.sh # one-time setup: config, dependencies, MCP
source ~/.bashrc # reload PATH
claude --dangerously-skip-permissions # first run only: OAuth + accept Bypass Permissions → /exit
bash shutsujin_departure.sh # launch all agents
For full install steps (incl. Windows) and the first-30-minutes walkthrough, see 🚀 Quick Start and the basic usage section below.
Type a command in the Shogun pane:
"Build a REST API for user authentication"
Shogun delegates → Karo breaks it down → 7 Ashigaru execute in parallel. You watch the dashboard. That's it.
Want to go deeper? The rest of this README covers architecture, configuration, memory design, and multi-CLI setup.
---
id: example name: "Sample Project" working_directory: /path/to/repo north_star: "The ultimate goal for this project" notes: | Project-specific notes, stakeholders, special rules
The Shogun and Karo reference this file and inject project context when issuing cmds.
Detailed project knowledge (requirements, design, past feedback) lives in `context/{name}.md`. When the Shogun issues a cmd related to the project, it automatically references this file.
#### 3. Customizing the agent formation
The agent formation (which CLI each agent uses) lives in `config/settings.yaml`:
yaml cli: agents: ashigaru1: type: codex # codex / claude / copilot / kimi / opencode / antigravity model: gpt-5.5 ashigaru2: type: claude model: claude-sonnet-4-6 # Same for ashigaru3-7, gunshi, karo
OpenCode uses provider-qualified model IDs:
yaml cli: agents: ashigaru3: type: opencode model: openrouter/openai/gpt-4o-mini variant: high # optional provider-specific reasoning variant
OpenRouter setup has two separate pieces:
1. **Model routing** goes in `config/settings.yaml` as shown above (`type: opencode`, `model: openrouter/...`).
2. **Provider authentication** is configured in OpenCode, not in `settings.yaml`. Run OpenCode once as the same OS user that will launch Shogun, then use `/connect` → `OpenRouter` and paste the API key. OpenCode stores provider credentials in its own user data under that OS user (for example under `~/.local/share/opencode/`; the exact file/database is OpenCode-internal). For headless deployments that use environment-based provider credentials, make sure the shell that runs `shutsujin_departure.sh` has `OPENROUTER_API_KEY` loaded.
Do not put API keys in `config/settings.yaml`, `config/opencode-tui.json`, or `.opencode/agents/*.md`. Those files only describe routing, tmux-safe keybindings, and generated agent definitions.
When OpenCode is selected, `lib/cli_adapter.sh` launches it with `--agent <agent_id>` and the repository-pinned `OPENCODE_TUI_CONFIG=config/opencode-tui.json`. The TUI command does not accept `--variant`; if `variant:` is configured, `scripts/build_instructions.sh` and `scripts/switch_cli.sh` synchronize `model:` / `variant:` into a git-ignored `.opencode/agents/<agent_id>-runtime.md`, which OpenCode loads via `--agent <agent_id>-runtime`.
To switch on the fly, use `scripts/switch_cli.sh`:
bash bash scripts/switch_cli.sh ashigaru3 --type claude --model claude-sonnet-4-6 bash scripts/switch_cli.sh ashigaru3 --type opencode --model openrouter/openai/gpt-4o-mini bash scripts/switch_cli.sh ashigaru3 --type opencode --model openrouter/minimax/minimax-m2.5 --variant xhigh ```
There is no explicit "close project" command. Issuing the next project's cmd automatically switches context.
queue/ as history, and the Shogun restores state when resumedprojects/{name}.yaml, or add an archived: true flagproject: field in cmds to keep concurrent projects distinctWhat carries forward to future projects:
| What carries forward | Stored in | Referenced when |
|---|---|---|
| Lord's preferences and lessons | Memory MCP (persistent) | All agents at Session Start |
| Project-specific knowledge | context/{name}.md | When running the project's cmds |
| Past cmd history | queue/shogun_to_karo.yaml | When the Shogun needs it |
| Custom skills | ~/.claude/skills/, skills/ | When matching triggers fire |
| Agent formation | config/settings.yaml | At shutsujin startup |
Memory MCP is the heart of "experience." When you tell the Shogun "don't do X next time" or "remember Y," the Shogun records it in Memory MCP, and all future projects see it.
screenshot: path: "/mnt/c/Users/YourName/Pictures/Screenshots"
| Agent | Default Model | Thinking | Role |
|---|---|---|---|
| Shogun | Opus | **Enabled (high)** | Strategic advisor to the Lord. Use --shogun-no-thinking for relay-only mode |
| Karo | Sonnet | Enabled | Task distribution, simple QC, dashboard management |
| Gunshi | Opus | Enabled | Deep analysis, design review, architecture evaluation |
| Ashigaru 1–7 | Sonnet 4.6 | Enabled | Implementation: code, research, file operations |
Thinking control: Set thinking: true/false per agent in config/settings.yaml. When thinking: false, the agent starts with MAX_THINKING_TOKENS=0 to disable Extended Thinking. Pane borders show +T suffix when Thinking is enabled (e.g., Sonnet+T, Opus+T).
Live model switching: Use /shogun-model-switch to change any agent's CLI type, model, or Thinking setting without restarting the entire system. See the Skills section for details.
The system routes work by cognitive complexity at two levels: Agent routing (Ashigaru for L1–L3, Gunshi for L4–L6) and Model routing within Ashigaru via capability_tiers (see Dynamic Model Routing below).
Most AI coding tools charge per token. Running 8 Opus-grade agents through the API costs $100+/hour. CLI subscriptions flip this:
| API (Per-Token) | CLI (Flat-Rate) | |
|---|---|---|
| **8 agents × Opus** | ~$100+/hour | ~$200/month |
| **Cost predictability** | Unpredictable spikes | Fixed monthly bill |
| **Usage anxiety** | Every token counts | Unlimited |
| **Experimentation budget** | Constrained | Deploy freely |
"Use AI recklessly" — With flat-rate CLI subscriptions, deploy 8 agents without hesitation. The cost is the same whether they work 1 hour or 24 hours. No more choosing between "good enough" and "thorough" — just run more agents.
Shogun isn't locked to one vendor. The system supports 7 CLI tools, each with unique strengths:
| CLI | Key Strength | Default Model |
|---|---|---|
| **Claude Code** | Battle-tested tmux integration, Memory MCP, dedicated file tools (Read/Write/Edit/Glob/Grep) | Claude Sonnet 4.6 |
| **OpenAI Codex** | Sandbox execution, JSONL structured output, codex exec headless mode, **per-model --model flag** | gpt-5.3-codex / **gpt-5.3-codex-spark** |
| **GitHub Copilot** | Built-in GitHub MCP, 4 specialized agents (Explore/Task/Plan/Code-review), /delegate to coding agent | Claude Sonnet 4.6 |
| **Kimi Code** | Free tier available, strong multilingual support | Kimi k2 |
| **OpenCode** | Shared AGENTS.md instructions, agent-specific definitions via --agent, /new context reset, restart-only model changes, deterministic interactive TUI launch, provider-qualified --model routing | provider/model |
| **Cursor** | Auto-loads CLAUDE.md/AGENTS.md/.cursor/rules/, built-in web search, inbox-write skill via .cursor/skills/, /model live switching, --yolo auto-run | Varies |
| **Antigravity CLI** | Google Antigravity CLI integration via agy, host-managed auth, YOLO-style launch, gemini/agy legacy aliases | host default / last-used |
OpenCode sessions load the agent-specific .opencode/agents/<agent_id>.md definition via --agent and keep automation resets on /new; model changes require a relaunch. Automation uses the repository-provided config/opencode-tui.json via OPENCODE_TUI_CONFIG, which disables app_exit and pins session_interrupt/input_clear to known bindings. Role boundaries are embedded in the generated agent frontmatter: Shogun can read queue/reports/* for oversight but cannot write them, Karo is limited to coordination files plus report aggregation, Ashigaru only touch their own task/report pair, and Gunshi reads ashigaru reports but only writes gunshi_report.yaml.
Antigravity sessions launch with agy --dangerously-skip-permissions. Shogun treats type: antigravity, type: agy, and legacy type: gemini as Antigravity. Authentication and default model selection stay in the host user's Antigravity CLI setup; settings.yaml may optionally pass a concrete model, but auto uses the host default or last-used model.
A unified instruction build system generates CLI-specific instruction files from shared templates:
instructions/
├── common/ # Shared rules (all CLIs)
├── cli_specific/ # CLI-specific tool descriptions
│ ├── claude_tools.md # Claude Code tools & features
│ ├── copilot_tools.md # GitHub Copilot CLI tools & features
│ ├── opencode_tools.md # OpenCode tools, agent frontmatter, and permission model
│ └── cursor_tools.md # Cursor Agent tools, skills, and session rules
└── roles/ # Role definitions (shogun, karo, ashigaru)
↓ build
CLAUDE.md / AGENTS.md / .github/copilot-instructions.md / .opencode/agents/*.md / .cursor/rules/*.md
← Generated per CLI
One source of truth, zero sync drift. Change a rule once, all CLIs get it.
---
The Shogun delegates instantly and returns control to you:
You: Command → Shogun: Delegates → You: Give next command immediately
↓
Workers: Execute in background
↓
Dashboard: Shows results
No waiting for long tasks to finish.
VSCode's Claude Code extension lets you paste screenshots to explain issues. This CLI system provides the same capability:
```yaml
Shogun has two complementary task systems:
| Capability | SayTask (Voice Layer) | cmd Pipeline (AI Execution) |
|---|---|---|
| Voice input → task creation | ✅ | — |
| Morning notification digest | ✅ | — |
| Eat the Frog 🐸 selection | ✅ | — |
| Streak tracking | ✅ | ✅ |
| AI-executed tasks (multi-step) | — | ✅ |
| 8-agent parallel execution | — | ✅ |
SayTask handles personal productivity (capture → schedule → remind). The cmd pipeline handles complex work (research, code, multi-step tasks). Both share streak tracking — completing either type of task counts toward your daily streak.
---
Q: How is this different from other task apps? A: You never open an app. Just speak. Zero friction. Most task apps fail because people stop opening them. SayTask removes that step entirely.
Q: Can I use SayTask without the full Shogun system? A: SayTask is a feature of Shogun. Shogun also works as a standalone multi-agent development platform — you get both capabilities in one system.
Q: What's the Frog 🐸? A: Every morning, AI picks your hardest task — the one you'd rather avoid. Tackle it first (the "Eat the Frog" method) or ignore it. Your call.
Q: Is it free? A: Everything is free and open-source. ntfy is free too. No account, no server, no subscription.
Q: Where is my data stored? A: Local YAML files on your machine. Nothing is sent to the cloud. Your tasks never leave your device.
Q: What if I say something vague like "that thing for work"? A: AI does its best to categorize and schedule it. You can always refine later — but the point is capturing the thought before it disappears.
multi-agent-shogun 是一个基于 WSL2 环境构建的多智能体协作系统。该系统利用 Linux 的 tmux 工具来高效管理多个 AI Agents,通过模拟指挥官模式实现复杂的任务调度。由于其核心逻辑运行在 Linux 环境中,Windows 用户需要通过 WSL2 来运行此系统,以确保 tmux 等工具的完美兼容。
本项目集成了强大的多智能体协作能力,支持通过不同的 CLI 工具驱动多个角色(如 Shogun、Karo、Gunshi)协同工作。系统具备非阻塞式工作流,允许用户在智能体执行后台任务时继续下达指令,并通过 Dashboard 实时监控任务进度,实现极高的开发效率与交互体验。
在使用本项目前,请确保您的环境已安装 WSL2 以及 Ubuntu 分发版。此外,系统依赖 bash 4+ 和 tmux 环境。在模型接入方面,您需要准备好 Claude Code、Codex、Copilot、Kimi 或 OpenCode 中的至少一种工具,以驱动底层的 AI 能力。
首次安装请在 Windows 环境下运行 `install.bat`,它会自动检测并引导您安装 WSL2 和 Ubuntu。安装完成后,进入项目目录执行 `./first_setup.sh` 进行初始化配置。该脚本会自动处理依赖项与 MCP 配置,确保环境符合运行要求。请注意,首次运行 Claude Code 时需通过 OAuth 认证并选择 'Bypass Permissions' 以获得完整权限。
项目通过 YAML 文件管理任务上下文。您只需在 `projects/` 目录下创建对应的配置文件,并在其中定义 `north_star`(项目终极目标)和相关规则。Shogun 与 Karo 会自动读取这些上下文进行指令注入。当您需要执行任务时,直接通过命令行交互即可,无需频繁切换应用,实现‘即说即做’的无缝体验。
系统配置主要通过 `config/settings.yaml` 进行管理,例如您可以设置截图保存路径。针对不同角色的模型能力,系统内置了不同的模型策略:Shogun 负责战略决策,Karo 负责任务分发与质量控制,Gunshi 则专注于深度分析与架构评审。您可以根据需求调整各 Agent 的 Thinking 模式或切换模型。
与传统的按 Token 计费的 API 模式不同,本项目优先采用 CLI 订阅模式。这种方式在运行多个高阶模型(如 Opus 级别)时具有极高的成本优势:相比于 API 每小时可能高达 $100+ 的开销,使用 CLI 订阅可以实现每月固定费用的成本预测,避免了因任务量激增导致的费用失控。
本项目采用非阻塞式工作流(Non-Blocking Workflow),确保用户体验流畅。当您下达指令后,Shogun 会立即将任务委派给 Worker 并在后台���行,同时将控制权交还给用户,您可以立即输入下一条指令。同时,系统集成了截图功能,支持通过 VSCode 的 Claude Code 插件粘贴截图来辅助解释问题,实现视觉与文本的双重理解。
常见问题解答:本项目与传统任务管理应用的区别在于其‘零摩擦’的交互方式,用户无需手动打开 App,通过命令行即可完成任务调度。此外,本项目不仅是一个任务系统,更是一个完整的智能体工作流,通过集成多种 CLI 工具(如 Claude Code),实现了强大的文件读写、搜索及 Memory MCP 能力。
架构创新的多智能体框架,Claude集成深度好,并行编排高效。文档完善度和扩展性表现优秀,适合专业级应用。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:multi-agent-shogun Agent工作流 的核心功能完整,质量优秀。对于AI爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | multi-agent-shogun |
| 原始描述 | 开源AI工作流:Samurai-inspired multi-agent system for Claude Code. Orchestrate parallel AI tas。⭐1.3k · Shell |
| Topics | 多智能体工作流编排Claude自动化并行处理 |
| GitHub | https://github.com/yohey-w/multi-agent-shogun |
| License | MIT |
| 语言 | Shell |
收录时间:2026-05-19 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。