经 AI Skill Hub 精选评估,opencode-swarm MCP工具 获评「强烈推荐」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
基于MCP协议的开源多智能体编程工具,采用中心辐射型架构支持分布式任务编排。面向AI驱动的代码生成和自动化开发,适合需要构建复杂智能体工作流的开发者和研究者。
opencode-swarm MCP工具 是一款基于 TypeScript 开发的开源工具,专注于 多智能体编排、MCP协议、代码自动化 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
基于MCP协议的开源多智能体编程工具,采用中心辐射型架构支持分布式任务编排。面向AI驱动的代码生成和自动化开发,适合需要构建复杂智能体工作流的开发者和研究者。
opencode-swarm MCP工具 是一款基于 TypeScript 开发的开源工具,专注于 多智能体编排、MCP协议、代码自动化 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g opencode-swarm # 方式二:npx 直接运行(无需安装) npx opencode-swarm --help # 方式三:项目依赖安装 npm install opencode-swarm # 方式四:从源码运行 git clone https://github.com/zaxbysauce/opencode-swarm cd opencode-swarm npm install npm start
# 命令行使用
opencode-swarm --help
# 基本用法
opencode-swarm [options] <input>
# Node.js 代码中使用
const opencode_swarm = require('opencode-swarm');
const result = await opencode_swarm.run(options);
console.log(result);
# opencode-swarm 配置说明 # 查看配置选项 opencode-swarm --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export OPENCODE_SWARM_CONFIG="/path/to/config.yml"
| Surface | Entry point |
|---|---|
swarm-implement.yml gated GitHub Action | swarm:implement issue label or workflow_dispatch — runs the implementation pipeline and opens an evidence PR |
/swarm agents for the live roster — that is the source of truth, not this list.external_skills.curation_enabled: true in config). Includes 7 tools: external_skill_discover, external_skill_list, external_skill_inspect, external_skill_promote, external_skill_reject, external_skill_delete, external_skill_revoke. Candidates pass through a 3-gate validation pipeline before evaluation: prompt injection scan (12 regex patterns), unsafe instruction scan (25 patterns), and provenance integrity check (SHA-256, timestamp, URL, publisher, and hash verification)./swarm skill-opt plan|run|status|diff|approve|reject|rollback|history) that drives one allowlisted SKILL.md candidate at a time through deterministic draft → smoke → evaluation-substrate validation → manual approval → atomic activation/rollback. Bounded, restartable, reversible, and unable to mutate source/harness/security surfaces. Disabled by default (skill_opt.enabled: false); see docs/skill-optimizer.md./swarm epic close squash-lands as staged changes. Per-task QA always runs, and a phase reviewer + critic gate (epic_phase_review) runs before phase_complete. Epic learns per-file write risk across epics, suggests plan restructurings with a predicted speedup, and reports a scorecard (/swarm epic report). Enable with epic.mode.enabled: true; see docs/modes.md..swarm/; pick up any project any dayhttps://<gitlab-host>/owner/repo/-/merge_requests/N, /-/issues/N) are accepted by /swarm pr-review, pr-feedback, pr subscribe/unsubscribe, ci-monitor, publication recording, and issue ingestion, with self-hosted instance hosts derived from the remote or forge.base_url (config forge: { provider, base_url }, default auto; ambiguous remotes fail closed). Every URL-security control (HTTPS-only, private/localhost rejection, IDN protection, credential stripping) applies identically to GitLab. The glab binary resolves through the same hardened resolver contract as gh (OPENCODE_SWARM_GLAB_BINARY env override). Honest capability reporting: GitLab does not synthesize GitHub's statusCheckRollup/reviewDecision/mergeStateStatus — those surface an explicit unavailable result instead of a fabricated value, and glab-backed live MR polling is tracked as follow-up issue #2882.gh CLI; delivers real-time CI, review, and merge status updates via the AutomationEventBus (FR-001, opt-in via pr_monitor.enabled: true). Subscribe with /swarm pr subscribe <pr-url|owner/repo#N|N>; unsubscribe with /swarm pr unsubscribe <pr-url|owner/repo#N|N>; check status with /swarm pr status. With auto_pr_feedback: true, CI failures and merge conflicts mechanically activate PR_FEEDBACK only when no other workflow owns the session; otherwise they are durably queued for a later round..tsx / .c aliases) — extending: see docs/adding-a-language.mdfiles[], paths[], targetFiles[]) to prevent scope bypass via multi-file tool calls.The Swarm architect coordinates all internal agents automatically. You never manually switch between internal roles. If the active OpenCode agent is not a Swarm architect, the plugin workflow is bypassed.
---
bash-parser AST for accurate detection of:>, >>, >|, <<, <<-)cp, mv, install, ln, truncate, dd)sed -i, perl -i, awk -i)python -c, node -e, bun -e, ruby -e, php -r)curl -o, wget -O, scp)tar -x, unzip, gunzip)git clean -fd, git reset --hard)Out-File, Set-Content, Add-Content, Copy-Item, Move-Itemcopy, move, ren, del, rd, md>, >>)watch, screen, tmux new-sessionStart-Process.swarm/scopes/scope-{taskId}.json with:rm -rf, rmdir /s, del /s, Remove-Item -Recurse, rsync --delete) are blocked unless ALL target paths are within the declared scope (coder agents only)bunx opencode-swarm install
→ For a complete first-run walkthrough, see Getting Started.
The 15-minute guide covers: - Installation (bunx opencode-swarm install) - First-run auto-configuration (architect selected automatically) - Running your first task - Troubleshooting common issues
The installer automatically: - Adds opencode-swarm to the OpenCode plugin list - Disables the native explore and general agents to reduce routing conflicts
It does not create a project config. .opencode/opencode-swarm.json is opt-in — create it yourself only if you want project-level overrides of the global config.
---
Swarm works with any provider supported by OpenCode.
Minimal (disable):
{
"context_budget": {
"enabled": false
}
}
Default (reference):
{
"context_budget": {
"enabled": true,
"max_injection_tokens": 4000,
"warn_threshold": 0.7,
"critical_threshold": 0.9,
"enforce": true,
"prune_target": 0.7,
"preserve_last_n_turns": 4,
"recent_window": 10,
"tracked_agents": ["architect"],
"enforce_on_agent_switch": true,
"model_limits": { "default": 128000 },
"tool_output_mask_threshold": 2000,
"scoring": {
"enabled": false,
"max_candidates": 100,
"decision_decay": { "mode": "exponential", "half_life_hours": 24 }
}
}
}
(Omitted keys — weights above — take the schema defaults listed in the table; only the eight documented weight keys are read.)
Aggressive (for long-running sessions):
{
"context_budget": {
"enabled": true,
"max_injection_tokens": 2000,
"warn_threshold": 0.5,
"critical_threshold": 0.75,
"enforce": true,
"prune_target": 0.6,
"preserve_last_n_turns": 2,
"recent_window": 5,
"tracked_agents": ["architect"],
"enforce_on_agent_switch": true,
"model_limits": { "default": 128000 },
"tool_output_mask_threshold": 1500,
"scoring": {
"enabled": true,
"max_candidates": 50,
"weights": { "phase": 1.5, "current_task": 3.0, "recent_failure": 3.0, "recent_success": 0.3, "decision_recency": 2.0 },
"decision_decay": { "mode": "linear", "half_life_hours": 12 }
}
}
}
Note onscoring.token_ratios: the key is still accepted by the config schema for backward compatibility, but it is deprecated and inert — no runtime code reads it, and per-content token ratios are deliberately not used. Token costs for both normal and scoring accounting always come from the one canonical estimator (estimateTokensinsrc/hooks/utils.ts, flat ~0.33 tokens/char); when the provider reports token usage, that figure stays authoritative.
No animated GIF is shipped in the repo — instead, here is the exact terminal session you can record yourself with asciinema rec demo.cast (or any screen recorder). Every command below is real and runs against this repo as published.
Recording script (copy/paste-able, ~30 seconds):
```bash
| Key | Type | Default | Description |
|---|---|---|---|
context_budget.enabled | boolean | true | Enable or disable the context budget guard entirely |
context_budget.max_injection_tokens | number | 4000 | Separate per-turn cap on system-enhancer injection. It is NOT the guard's budget — the guard measures total conversation tokens against model_limits, not this value |
context_budget.warn_threshold | number | 0.7 | Ratio (0.0-1.0) of the model context window at which total conversation tokens trigger a warning advisory |
context_budget.critical_threshold | number | 0.9 | Ratio (0.0-1.0) of the model context window at which total conversation tokens trigger a critical alert with handoff recommendation |
context_budget.enforce | boolean | true | When true (default), crossing the critical threshold masks large completed tool outputs and prunes lower-priority messages in the **outgoing request** toward prune_target. Execution is never blocked or aborted |
context_budget.prune_target | number | 0.7 | Ratio (0.0-1.0) of the context window the outgoing request is pruned toward when enforcement runs |
context_budget.preserve_last_n_turns | number | 4 | Number of recent turns protected from pruning |
context_budget.recent_window | number | 10 | Age (in turns) beyond which a completed tool output becomes eligible for masking during enforcement; the latest preserve_last_n_turns turns are always protected |
context_budget.tracked_agents | string[] | ['architect'] | Agents to track for context budget warnings |
context_budget.enforce_on_agent_switch | boolean | true | Enforce budget limits when switching agents |
context_budget.model_limits | record | {} | Per-model token limit **overrides**, keyed by "<provider>/<model>", "<model>", or "default". Empty by default so the live model's own context window is used; set an entry only to impose a smaller working budget |
context_budget.unified_injection_tokens | number | undefined | Opt-in unified ceiling (tokens) for combined system-enhancer + knowledge-injector injection per turn. When set, both hooks share this budget with proportional split |
context_budget.tool_output_mask_threshold | number | 2000 | Character threshold (chars, not tokens): during enforcement, a completed tool output in a non-protected turn is masked when it is **older than recent_window turns OR longer than this many characters** (either condition) |
skills.enabled | boolean | false | Gates the 7 skill-management tools (skill_generate, skill_list, skill_apply, skill_inspect, skill_regenerate, skill_retire, skill_improve) behind an opt-in flag. When false (default), these tools are host-denied for every agent except skill_improver — genuinely unreachable at request time (issue #2528). |
skill_opt.enabled | boolean | false | Master opt-in for the governed skill optimizer (/swarm skill-opt). run also requires --confirm; plan/status/diff/history are always available. See docs/skill-optimizer.md. |
skill_opt.deadband | number | 0 | Promotion policy deadband forwarded to the evaluation substrate. |
skill_opt.max_rounds | number | 5 | Hard cap on draft/smoke retries before a validation (held-out test set is single-use). |
skill_opt.max_transient_retries | number | 5 | Max transient-infra retries before an infra failure becomes inconclusive. |
epic.mode.enabled | boolean | false | Master opt-in for Epic Mode (/swarm epic, epic_next_wave, epic_phase_review). The legacy turbo.epic.* path is still accepted and migrated with a warning. See [docs/modes.md](docs/modes.md#epic-mode-preview) |
epic.mode.activation_threshold | number | 0.3 | Intra-component density above which a conflict component runs one task per wave |
epic.cochange.enabled | boolean | false | Adds the git co-change conflict signal to Epic planning and /swarm coupling (otherwise declared-path conflicts only) |
epic.cochange.threshold / min_co_changes | number | 0.6 / 5 | NPMI floor and minimum co-change count for a file pair to count as coupled |
epic.sizing.* | object | min_tasks: 6, min_scope_coverage: 0.8, min_effective_speedup: 1.25, coder_fraction: 0.6 | /swarm epic start refuses plans below these (--force overrides and is recorded) |
epic.learning.* | object | enabled: true, decay_per_epic: 0.7, half_life_days: 60, hot_excess: 0.25 | Per-file risk and co-write learning across waves and epics |
epic.commit_policy | string | epic-branch | epic-branch (work on swarm/epic/<key>, landed at close) or current-branch |
epic.retain_refs | boolean | false | Keep refs/swarm/epics/<key>/* after close |
context_budget.scoring.enabled | boolean | false | Enable context scoring/ranking |
context_budget.scoring.max_candidates | number | 100 | Maximum items to score (10-500) |
context_budget.scoring.weights | object | { phase: 1.0, current_task: 2.0, blocked_task: 1.5, recent_failure: 2.5, recent_success: 0.5, evidence_presence: 1.0, decision_recency: 1.5, dependency_proximity: 1.0 } | Per-signal priority weights (each 0-5). Only these eight keys are read |
context_budget.scoring.decision_decay | object | { mode: 'exponential', half_life_hours: 24 } | Decision relevance decay (mode: linear or exponential; half_life_hours 1-168) |
context_budget.scoring.token_ratios | object | { prose: 0.25, code: 0.4, markdown: 0.3, json: 0.35 } | Accepted for backward compatibility only; deprecated and inert at runtime — never read. Token costs always use the canonical flat estimator (estimateTokens, ~0.33 tokens/char), never per-content ratios |
Both projects compared here have since been renamed: oh-my-opencode is now OmO and get-shit-done is now GSD Core. The table reflects them as they were when it was written (April 2026, v6.81.0) and has not been re-checked against their current releases.
| Feature | Swarm | oh-my-opencode (now OmO) | get-shit-done (now GSD Core) |
|---|---|---|---|
| Multiple specialized agents | ✅ Core + optional + conditional roster (/swarm agents) | ❌ | ❌ |
| Plan reviewed before coding | ✅ | ❌ | ❌ |
| Every task reviewed + tested | ✅ | ❌ | ❌ |
| Different model for review vs. code | ✅ | ❌ | ❌ |
| Shell write detection (POSIX/PowerShell/cmd) | ✅ | ❌ | ❌ |
| Scope enforcement with cross-process persistence | ✅ | ❌ | ❌ |
| Interactive session detection and blocking | ✅ | ❌ | ❌ |
| Resumable sessions | ✅ | ❌ | ❌ |
| Built-in security scanning | ✅ | ❌ | ❌ |
| Learns from mistakes | ✅ | ❌ | ❌ |
| Parallel tasks refused at dispatch unless their scopes are conflict-free (Epic Mode) | ✅ | ❌ | ⚠️ overlap check only falls back to sequential |
| Conflict prediction from git co-change history (Epic Mode) | ✅ | ❌ | ❌ |
| Learns per-file risk of undeclared writes across runs (Epic Mode) | ✅ | ❌ | ❌ |
| Plan-restructuring suggestions with predicted speedup (Epic Mode) | ✅ | ❌ | ❌ |
| Per-epic scorecard: conflicts, rework, gate first-pass rates (Epic Mode) | ✅ | ❌ | ❌ |
---
aiskill88点评:高成熟度的多智能体编程框架,MCP标准支持完善,架构设计先进。文档待完善,但代码质量优秀,324星评价认可度良好。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:opencode-swarm MCP工具 的核心功能完整,质量优秀。对于AI爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | opencode-swarm |
| 原始描述 | 开源MCP工具: Architect-centric agentic swarm plugin for OpenCode. Hub-and-spoke orchestrati。⭐324 · TypeScript |
| Topics | 多智能体编排MCP协议代码自动化分布式框架TypeScript |
| GitHub | https://github.com/zaxbysauce/opencode-swarm |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。