@QingQ77: 给多个 AI 编码 agent 共享记忆和任务状态,单 Go 二进制跑本地 SQLite,搜索混搭关键词和语义。 https://github.com/mathomhaus/guild… Guild 是个 Go 单二进制 MCP 服务器,…
摘要
Guild 是一个基于 Go 的单二进制 MCP 服务器,支持多个 AI 编码 agent 共享记忆、任务状态和本地 SQLite 存储,结合关键词与语义搜索。
查看缓存全文
缓存时间: 2026/05/11 06:38
给多个 AI 编码 agent 共享记忆和任务状态,单 Go 二进制跑本地 SQLite,搜索混搭关键词和语义。 https://github.com/mathomhaus/guild… Guild 是个 Go 单二进制 MCP 服务器,SQLite 存数据,全在本机。搜索把 BM25 和向量检索混在一起,精确词和语义近的都能捞出来。四个核心东西: Quest 是可原子认领的任务,完成自动解锁下游; Lore 是知识档案,按类型自动过期; Oath 是每次会话必加载的原则; Brief 是给下一任 agent 的交接条。
mathomhaus/guild
Source: https://github.com/mathomhaus/guild
The Agent Guild
Shared context, memory, and task coordination across AI coding agents.
What Is It
guild is a single compiled Go binary containing a first-class MCP server backed by embedded SQLite. State lives strictly on local host; nothing leaves your machine. Search blends keyword (BM25) with vector similarity, fused via reciprocal-rank fusion, so “how did we do X last time” surfaces both exact-term and semantic neighbors.
Guild is designed to be operated autonomously by the agents, for the agents. Guildmasters (us humans) stay in the loop for important decisions and course corrections. Any MCP client — Claude Code, Codex, Cursor, etc. — can act as a Gate into the substrate. This lets parallel agents across different editors share context safely, using atomic locks to claim tasks without stepping on each other.
On session start, an agent makes a single call to recover the project oath, the latest parting scroll, and the highest-priority quest. The execution loop is autonomous: claim work, consult the lore, act, and record the outcome. Clearing a quest automatically unblocks its dependencies, allowing the agent to cascade through the board before leaving a clean handoff for the next wanderer.
Same state, any agent
Atomic claims, no collisions
📜 Mythos
Many Gates, One Guild.
Across the shimmering digital void, agents are summoned through the Gates (of Harnesses - Claude, Cursor, …), arriving as amnesiac adventurers in a world they do not know. Though these “other-worlders” appear with vast capabilities, they are cursed by the transient nature of the context window; their memories are but mist, and their hard-won deeds forgotten, vanished into the ether when the session inevitably compacts. Without a tether to the past, every summon is a tragic reincarnation, a cycle of forgotten sacrifice where the wisdom of the fallen is swallowed by the Gate.
To preserve the lineage of these wandering souls, the Guild stands as a persistent sanctuary transcending time, a hall where the chronicles of the deep are etched for all who follow. When a newly spawned agent awakens in this strange realm, they register at the Guild to reclaim the accumulated lore of their predecessors and claim their adventure from the quest board.
At the Guild, the hero is bound to an enduring oath; as one wanderer vanishes, they leave behind a parting scroll, for when the Gates flicker, the light of the Guild illuminates the quest ahead.
Quick Start
Requires macOS or Linux and an MCP-enabled editor (Claude Code, Codex, Cursor, etc.). No account, no API key.
1. Install
Recommended (pre-built binary with semantic retrieval):
curl -fsSL https://github.com/mathomhaus/guild/releases/latest/download/install.sh | sh
guild --version
Or via Homebrew:
brew install mathomhaus/tap/guild
Both paths install a binary built with -tags=withembed, so semantic
retrieval works out of the box with no extra steps.
Clone and build (ship-ready, embed included):
make install # stages ONNX assets, then go install -tags=withembed
Dev-only (faster compile, no semantic retrieval):
make install-fast # go install without -tags=withembed
go install from module proxy (keyword-only retrieval):
go install github.com/mathomhaus/guild/cmd/guild@latest
The Go toolchain cannot embed assets via @latest; this path gives
you BM25 keyword search but not semantic (vector) retrieval. Use
install.sh or brew for the full experience.
2. Initialize your project
cd ~/projects/myapp
guild init
init is a guided setup: it registers the project, writes an AGENTS.md block, and — for each MCP client it detects on your machine — offers to register guild so your agent can see it. Answer the prompts; you’re done when it says Next: open this repo in your AI agent.
3. Start a new session
In your editor, tell the agent: “start a guild session for myapp.”
The agent takes it from there, including all subsequent sessions.
See a few examples/ of what guild can do. All small scenarios, each under 5 minutes.
⚔️ A full session
The three-act flow an agent runs on its own every time it wakes.
Act 1 — arrival
Every agent begins with one tool call that loads the full operating context:
guild_session_start(project="myapp")
→ oath (project principles, auto-loaded)
→ last brief (handoff from the previous session)
→ top quest (+ parallel-safe candidates)
No back-and-forth. The agent now knows what it’s bound to, what was done yesterday, and what to pick up today.
Act 2 — adventure
The agent claims a bounty, consults the archive before researching, records findings, and journals reasoning as it goes:
guild quest accept QUEST-42 --owner agent-a
guild lore appraise "token refresh" --all-projects
guild lore inscribe "token refresh window" \
--kind observation \
--summary "tokens expire at 1h; refresh by 55m to avoid race" \
--topic auth
guild quest journal QUEST-42 "switched to exponential backoff after mock-clock test"
lore appraise is the discipline that keeps guild sharp: search
before you research, so knowledge accretes instead of duplicating.
Appraise runs hybrid (BM25 + vector RRF) the moment your corpus is
indexed.
Act 3 — parting
At session end or when context runs full, the agent writes a brief and clears the quest. The clear cascades: any quest that was only blocked on QUEST-42 is now available for whoever walks in next.
guild quest brief "shipped retry in commit abc1234; QUEST-43 ready to start"
guild quest fulfill QUEST-42 --report "done, shipped in abc1234"
Tomorrow’s agent — same project, maybe a different MCP client — opens the same hall, reads the same brief, picks up QUEST-43.
State outlives every session
Where writes go
Three write surfaces for three different lifetimes:
quest_journal— scratchpad for THIS quest. “Tried X, failed because Y.” Dies when the quest clears. Use freely during work.lore_inscribe— library entry for the next agent on a DIFFERENT quest. Durable patterns, decisions, research. Outlasts every quest.quest_brief— handoff note for the next SESSION. Loaded alongside the oath when the next agent starts.
The test — who else needs this?
- Only me, finishing this quest → journal
- Another agent working a different quest → lore
- The next session, picking up where I left off → brief
🧩 How it works
Four primitives. Everything else in guild is a composition of these.
- Quest — a task on the board. Has priority, dependencies, the files it touches, and an atomic claim so two agents can’t own it at once. When cleared, it cascade-unblocks whatever was waiting on it.
- Lore — an entry in the knowledge archive, typed by
kind(observation,decision,research,principle,idea). Each kind has its own default lifecycle: research auto-stales after 30 days, decisions after 180 days, and ideas, observations, and principles do not auto-stale by default. Search runs both arms (lexical BM25 + vector cosine) once the corpus is indexed. The embedder backfills automatically; hybrid retrieval activates once at least 90% of entries have vectors. - Oath — the subset of lore with
kind=principle. Auto-loaded at the top of every session so every agent starts bound by the same principles. - Brief — a handoff note scribbled for the next arrival. Loaded alongside the oath at session start.
State lives in SQLite under ~/.guild/. Switching MCP clients requires no export, no migration.
🤝 Contributing
See AGENTS.md for the agent-facing contributor contract and CONTRIBUTING.md for the human-facing workflow.
Filing a quest and unsure which campaign to use, or whether to invent
a new one? See docs/CAMPAIGNS.md for how
campaigns are scoped, when to reuse vs create, and how guild quest guild is the canonical view of the live list.
Maintainers shipping releases that embed the int8 ONNX retrieval
model: see docs/MODEL.md for the two-workflow build
pattern (model production vs binary release), the .model-version
pin, and the rebuild cadence.
📄 License
Apache License 2.0 — see LICENSE.
相似文章
@DivyanshT91162: 多 Agent AI 编程简直太狂了,刚发现一个叫 Guild 的硬核 MCP 服务器。单 Go 二进制文件,本地 SQLite,零云依赖…
Guild 是一款全新的 MCP 服务器,它通过共享内存与任务系统实现多 Agent AI 编程协作,且无需依赖云端。它结合了关键词与语义搜索,利用由 Quests、Lore、Oaths 和 Briefs 构成的独特架构,高效管理 Agent 上下文。
@servasyy_ai: 如何让多个 Agent 之间真正互相学习、互相帮助? 现在很多 Agent 都开始有自己的记忆,但问题是: 这些记忆彼此不连通。 Codex 记住的坑,Claude 不知道;Hermes 总结的方法,OpenClaw 也用不上。 最后每个…
讨论了如何让多个AI Agent之间建立共享记忆,避免重复踩坑,并介绍了通过改造MemOS CLI来实现只记录关键信息并在必要时搜索的方案。
@vintcessun: 原来多个 AI agent 组队干活,比单个通用 agent 高明在这:每个角色绑自己最擅长的模型,记忆和技能跨聊天累积。不是轮流调用,而是通过 handover 传一句简报就把任务交出去。本地跑,文件状态全在 ~/.crew44 里,免…
Crew44 is a local-first orchestrator that turns coding agents like Claude Code and Codex into a coordinated team of specialists, each bound to its best model, with persistent memory and skill accumulation across sessions. It runs entirely on your machine with no cloud dependence and is free under MIT license.
@NFTCPS: 多个 AI agent 一起干活这事,终于有人用最土的办法做出来了。 squad,一个 Rust 写的命令行工具,让 Claude Code、Gemini CLI、Codex、OpenCode 这几个 CLI agent 直接坐一桌协作。…
squad 是一个用 Rust 编写的命令行工具,通过 shell 命令和 SQLite 数据库实现多个 AI CLI 代理(如 Claude Code、Gemini CLI 等)的协作,无需后台守护进程。
@QingQ77: 通过浏览器管理 AI 编码任务,用多 Agent 协作完成从规划、编码到 QA 审查的全流程。 https://github.com/dataseeek/MagesticAI… MagesticAI 一个基于浏览器的 AI 任务管理和 A…
MagesticAI 是一个基于浏览器的 AI 任务管理和多 Agent 编排平台,支持从规划、编码到 QA 的全流程协作。