
Hivemind
io.github.Leonhestv0.1.1更新于 Oct 4, 2026
A shared, live plan for teams of coding agents, synced through your git remote.
概览
通过团队现有的 git 远程仓库,让多个编码代理共享并实时同步同一份计划。
- 功能
- Hivemind 把目标、契约、决策、任务和待解决问题存放在每位成员各自的隐藏 git ref 上,在会话开始时向代理展示完整计划,之后只展示自上次工具调用以来的变更。代理可通过 contract_publish、decision_log、task_add、task_claim 等 MCP 工具发布内容,后台提取器会读取新的对话片段,记录契约、决策和任务进展。plan_review 工具会检查整份计划是否存在矛盾,本地仪表盘和命令行工具可用于添加或查看条目。
- 适用场景
- 适合多人的编码代理同时在同一仓库上工作、容易各自跑偏的场景,例如黑客松或多代理冲刺期间模式、接口和决策在任务中途发生变化。它面向已经共用 git 远程仓库、希望变更自动出现在各代理上下文中的团队。
- 运行要求
- 需要 macOS 或 Linux、Node 20+、git,以及一个可推送的带 origin 远程仓库的代码库;没有推送权限时只能接收更新,无法分享自己的内容。每台机器运行一次 npx hivemind-agents install 或安装 Claude Code 插件即可,会配置受支持的代理(Claude Code、Codex CLI、Cursor)。提取在本机使用你自己的代理登录运行(claude -p 配 Haiku,或 codex exec),可用 HIVEMIND_EXTRACTOR_BACKEND=none 关闭。
安装
在 SourceWeft 中
- 打开 控制台中的 Hivemind,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
hivemind
A shared, live plan for teams of coding agents.
You split the work, everyone's agents go off and build, and an hour later the plan in each agent's
head is stale: someone changed the User schema, someone else switched auth libraries, two agents are
building the same endpoint. hivemind keeps one plan in sync across every agent on the team and puts
teammates' changes into each agent's context at its next tool call.
Run it once per machine. No server, no account, no room codes: the team is the git repo.
What your agent sees
Teammate's agent changes an API while yours is mid-task. A few seconds later, after its next command, your agent sees:
At session start it gets the whole plan: goals, contracts (API shapes, schemas, shared types), decisions, who's doing what, and open questions.
Starting a plan
Just ask your agent, e.g. "We're 3 people building X this weekend. Make a plan for the team." It
records goals, contracts, decisions and tasks in hivemind (tasks unassigned, with dependencies), and
each teammate's agent can claim one by key. You can also add things yourself with hivemind add or
in the dashboard (hivemind open).
When the plan changes direction
Plans change mid-hackathon. hivemind makes sure the old direction doesn't linger next to the new one:
- New goals must say how they relate to existing ones: they replace them, or are a competing proposal. Competing goals are flagged to every agent ("the team hasn't picked one yet, ask the user") until someone resolves them.
- Decisions and contracts can replace earlier ones, and agents are shown existing entries when they add new ones so they can spot contradictions. The background extractor removes entries that the work clearly abandoned.
hivemind review(or theplan_reviewtool) has the model check the whole plan for contradictions and suggest fixes (~15 s).
How it works
- Sync through git. Each person's plan entries live on their own hidden ref
(
refs/hivemind/<member>) on your existing remote. Nobody ever writes to someone else's ref, so there are no merge conflicts. Branches, PRs and your working tree are never touched. - Updates arrive by themselves. Hooks add the full plan at session start, then only what changed since the agent last looked, with the most important items first.
- The plan updates itself. When an agent finishes a turn, a background extractor reads only the
new part of its transcript and pulls out the things teammates need: contracts, decisions and task
progress, each with a quote as evidence. Agents can also publish explicitly through MCP tools
(
contract_publish,decision_log,task_add,task_claim, …), and they're told to for anything urgent. - Work doesn't go unrecorded. Before an agent's first file edit, if it has no task in progress it's asked to claim one (and shown the unclaimed tasks). After a turn that changed files, if neither the agent nor the extractor recorded anything, it's reminded to update its task.
- Updates arrive in seconds. Typically 2–5 s from one agent's change to the other machine, then shown at that agent's next tool call.
Supported agents
install detects which of these you have and configures each one (--only=claude,codex to choose).
Claude Code plugin (alternative)
Same hooks and MCP tools, no npm needed. Use either the plugin or npx … install, not both.
Commands
install puts a hivemind command on your PATH (or use npx hivemind-agents <command>).
Privacy and cost
- Your plan data never leaves your git host. There's no hivemind server. Anyone with read access to the repo can read its plan refs, the same people who can read the code.
- Public repo = public plan. hivemind detects public GitHub repos and tells your agent (and
hivemind status) so nobody is surprised. Don't want that?hivemind disableturns it off for that clone;hivemind enableturns it back on. - Secrets are scrubbed. Every plan entry is checked for keys, tokens, passwords and connection-string credentials before it's written, and the extractor is instructed to leave out credentials, personal details, customer names and unfixed security issues.
- Extraction runs on your machine with your own agent login. It calls
claude -pwith Haiku (orcodex execif you only have Codex) using your existing subscription or API key: about $0.005 per extraction on API pricing, or a small slice of your subscription usage. SetHIVEMIND_EXTRACTOR_BACKEND=noneto turn it off and rely on the MCP tools only. - Only new parts of transcripts with real work in them (a request or a code change) get extracted. Read-only exploration is skipped.
Requirements and limits
- macOS or Linux, Node 20+, git, and a repo with an
originremote you can push to (without push access you still receive updates, but can't share yours). - Tested with GitHub. Other hosts that accept custom refs should work; GitLab hasn't been tested yet.
- Not inside a git repo, or no
origin? hivemind stays out of the way.
Troubleshooting
Run hivemind doctor. Logs are in .git/hivemind/ in each repo (hivemind.log, daemon.log, extract.log).
License
MIT
来源:README.md,提交 8228d71
工具
0版本历史
1- v0.1.1最新Oct 4, 2026

