
Swarmmesh
io.github.RudrenduPaul由 GitHub 账号 RudrenduPaul 发布v0.1.3更新于 Oct 25, 2026
Multi-agent context sharing, memory, and status coordination via MCP tools.
概览
SwarmMesh 是一个本地协调服务器,让助手与其他并行代理进程共享上下文和可检索记忆。
- 可以做什么
- 在运行中的 mesh 上注册、列出和注销代理,并读取包含代理数、命名空间和运行时间的状态快照。发布、读取、列出和删除带命名空间的键值上下文条目,可设置过期时间。写入自由文本记忆条目,并按 BM25 关键词排序查询。所有工具调用都通过 HTTP 转发到单独运行的 swarmmesh serve 进程,因此不同语言的多个代理可以读写同一份状态。
- 适用场景
- 适合多个代理进程并行处理同一任务、需要共享发布发现和状态的场景,避免重复劳动或互相覆盖。它补充而非替代编排框架。
- 运行要求
- 需要本地安装 Python 包 swarmmesh-cli(可用 uvx 或 pip),并另行启动 swarmmesh serve 进程,MCP 服务器需指向其主机和端口。未声明需要账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Swarmmesh,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
SwarmMesh
[CI (Python)] [CI (Node)] [PyPI] [npm] [License: MIT]
Install • Quickstart • Features • CLI reference • Compare • FAQ
Shared context and memory for swarms of parallel AI agents, over a small protocol both Python and Node speak the same way.
Spin up ten coding agents on the same task and they cannot see what each other found. One agent rediscovers a bug another already fixed. Two agents overwrite the same file because neither knew the other touched it. SwarmMesh is a small server that sits alongside your existing agent framework and gives every agent process, in any language that can speak HTTP, a shared place to publish context and search memory.
It is not an orchestration framework. It does not schedule tasks, define agent roles, or route work between agents. Your existing framework (or your own code) keeps doing that. SwarmMesh only answers one question: how do independent agent processes read and write the same shared state.
Install
Either gives you a swarmmesh command on your PATH.
See it work
This is a real terminal session, not a mockup: a Python-run mesh, a Node agent writing to it, and a Python agent reading back what the Node agent wrote. Two different languages, one shared mesh.
Every command above was re-run for real against both CLIs while writing this README: the Node CLI registered an agent and wrote context and memory against a Python-hosted mesh, and the Python CLI read it straight back, in the same run, over the real HTTP API, with the score above (0.575) reproduced exactly. No shared filesystem, no shared process, no translation layer. Just the protocol.
Quickstart
This exact sequence was run end to end while writing this README and
completed in a few seconds, start to finish, against the real
swarmmesh-cli package installed from PyPI.
To build from source instead of installing from a registry:
Features
- A documented wire protocol.
docs/protocol.mdspecifies every HTTP endpoint and WebSocket event, so any process that can speak HTTP and JSON can join a mesh. The two official CLIs are convenient clients, not the only valid ones. - Two independent, interoperating implementations. Python
(
swarmmesh-clion PyPI, FastAPI + Typer, 74 tests, 91% statement coverage) and Node (swarmmesh-clion npm, Express + commander, 65 tests, 91.64% statement coverage) implement the protocol identically. Each package's own test suite runs independently in CI; cross-language interop (a Node client against a Python-hosted server and back) is demonstrated in the "See it work" section above and was re-run by hand against both real packages, not covered by an automated cross-language test in CI today. - Real-time updates over WebSocket.
/v1/eventspushescontext.updated,context.deleted,memory.written,agent.registered, andagent.deregisteredframes so an agent can react the moment another agent changes shared state, instead of polling. - Honest memory search. Memory queries use Okapi BM25 keyword ranking:
real term-frequency scoring, computed locally with no extra dependencies
and no network calls. It is not semantic or embedding search. A
RankingBackendinterface is a documented extension point if you want to plug in your own embedding-based scorer; SwarmMesh doesn't ship one. - Pluggable storage. In-memory by default (process lifetime only), or
--persist <path>for SQLite-backed storage that survives restarts. - Agent-native by default. Every subcommand on both CLIs supports
--jsonfor structured, script-parseable output, and both ship aswarmmesh mcpsubcommand that starts an MCP server over stdio so an MCP-capable agent (Claude or otherwise) can call SwarmMesh as a set of tools without shelling out. - A deliberately small trust boundary. Both servers bind to
127.0.0.1by default, not0.0.0.0. There's no authentication in v1. See Security.
The number below is measured, not estimated. 50 sequential PUT /v1/context/{namespace}/{key}
requests against a local Python-run server averaged 0.8ms round trip each
(40ms total for 50 requests) on the machine this README was written on.
This isn't a rigorous benchmark, includes curl's own process-spawn
overhead per request, and will vary by machine, but it's a real number from
a real run, not a guess. Reproduce it yourself with:
CLI reference
Both CLIs expose the same command tree. Flag names differ slightly between
the two (Python uses Typer's --flag <value> style, Node uses commander's),
but the commands and their behavior are identical. Output below is
transcribed from running --help on each built CLI.
[swarmmesh --help and swarmmesh agent --help output]
[Registering an agent, then swarmmesh status --json and setting/listing context on a running mesh]
context set parses <value> as JSON, falling back to a plain string if it
isn't valid JSON. context set ns key '"planning"' stores the string
planning. So does context set ns key planning (no quotes), through the
same string fallback.
MCP Server
SwarmMesh ships a Model Context Protocol (MCP) server, on both the Python
and Node packages, so an MCP-capable agent (Claude Desktop, Claude Code, or
any other MCP client) can call SwarmMesh as a set of tools instead of
shelling out to the CLI. The MCP server doesn't reimplement the protocol; it
proxies each tool call over HTTP to a swarmmesh serve process you already
have running.
mcp support is included by default in both packages (it's a core
dependency, not an optional extra), so a plain pip install swarmmesh-cli
or npm install -g swarmmesh-cli is all you need.
Claude Desktop config (claude_desktop_config.json):
Both the Python and Node MCP servers expose the same ten tools, mirroring
the SwarmMeshClient methods above:
Library API reference
Both packages export a typed client so you can call a mesh directly from your own agent code instead of shelling out to the CLI. Signatures below are grepped straight from source, not from memory.
Python (swarmmesh_cli.client.SwarmMeshClient):
Node / TypeScript (SwarmMeshClient from swarmmesh-cli):
The SwarmMesh protocol
The full specification lives in docs/protocol.md. The
short version: a "mesh" is one running swarmmesh serve process. Agents are
independent processes (coding agents, research agents, subprocess workers,
anything that can make an HTTP request) that register with a mesh, then
read and write namespaced shared context and memory through it.
The point of writing this down as a protocol instead of just shipping a
library is that it means the two official CLIs aren't the only valid
clients. A Python agent using swarmmesh_cli.client.SwarmMeshClient, a Node
agent using the SwarmMeshClient from swarmmesh-cli, and a third agent
written in a language with neither package can all register with the same
mesh and see each other's context and memory, because they're all just
calling the same documented HTTP endpoints and, optionally, subscribing to
the same WebSocket event stream. Nothing about interop depends on a shared
runtime, a shared process, or a shared filesystem.
How SwarmMesh compares
There's no other project doing exactly what SwarmMesh does, so this isn't an apples-to-apples table. It's here to be honest about what two real, comparable multi-agent projects actually offer versus what SwarmMesh actually offers, checked directly against their READMEs and source, not assumed from their names. Both are older, larger, and more established than SwarmMesh, which has 0 GitHub stars and no known users yet.
The honest read: swarms has real orchestration depth and a large community that SwarmMesh doesn't try to replace. feynman is a polished end-user research tool, not infrastructure you'd embed elsewhere. SwarmMesh's actual claim is narrower than either: a small, documented protocol two languages already speak the same way. It's worth exactly that much, no more.
What SwarmMesh is, and why it exists
Multi-agent setups increasingly mean several agent processes working the same problem in parallel, sometimes in the same language, sometimes not, sometimes spawned by different tools entirely. Orchestration frameworks solve the "what should each agent do and in what order" problem. SwarmMesh solves a narrower, adjacent problem: once those agents are running, how do they tell each other what they've found without a human relaying messages between terminals or agents silently duplicating each other's work.
SwarmMesh is infrastructure, not a framework. It doesn't care what
orchestrator spawned your agents, if any. It exposes a small HTTP + WebSocket
surface for shared context (structured key-value state, like a run's current
phase) and shared memory (free-text notes agents leave for each other,
searchable by keyword). You point your agents at a swarmmesh serve process
the same way you'd point them at a Redis instance, and they have a shared
place to read and write.
FAQ
Is this a replacement for LangGraph / CrewAI / AutoGen / <my orchestration
framework>?
No. SwarmMesh doesn't schedule agents, define workflows, or decide what
happens next. It runs alongside whatever you use for that and gives the
agents it spawns a shared context and memory layer. Point your orchestrator's
agents at a swarmmesh serve process and keep using it for everything else.
How is this different from kyegomez/swarms or companion-inc/feynman?
Both are larger, older projects solving different problems. swarms is an
orchestration framework: it decides what agents run, in what order, and how
they hand off work, and it does that at real depth. SwarmMesh doesn't do any
of that; it only gives already-running agents a shared place to read and
write state. feynman is a single research-agent product with a local
workbench UI and its own SQLite-backed state, not a coordination layer other
projects embed. Neither ships a documented cross-language wire protocol for
shared agent memory the way SwarmMesh's docs/protocol.md does. Full
side-by-side above in How SwarmMesh compares.
Is the memory search semantic / embedding-based?
No. It's Okapi BM25 keyword ranking, the same family of algorithm search
engines have used for decades, computed locally over term frequency. It
won't find memory entries that are conceptually related but share no
vocabulary with your query. If you need that, the RankingBackend interface
is a documented extension point for wiring in your own embedding-based
scorer. SwarmMesh doesn't ship one and won't silently call an embedding API
on your behalf.
Can a Python agent and a Node agent really share state, or is that
theoretical?
This is the reason the project exists. Both CLIs implement the same wire
protocol in docs/protocol.md, and the "See it work"
section above is a real transcript of the Node CLI writing context and
memory to a Python-hosted server, then the Python CLI reading it back over
the network, re-verified while writing this README.
Does SwarmMesh persist data?
Only if you ask it to. swarmmesh serve defaults to in-memory storage that's
gone when the process exits. Pass --persist <path> for SQLite-backed
storage that survives restarts.
Is there authentication? Not in v1. See Security below: this is a deliberate scope boundary, not an oversight.
What happens if two agents write to the same context key?
Last write wins. PUT /v1/context/{namespace}/{key} overwrites whatever
was there. Every write broadcasts a context.updated WebSocket event, so
agents subscribed to that namespace find out immediately rather than
polling. There's no merge or conflict resolution; if your agents need that,
build it on top using distinct keys or your own versioning convention.
Can I use SwarmMesh as a library instead of the CLI?
Yes. Both packages export a client: swarmmesh_cli.client.SwarmMeshClient
in Python, SwarmMeshClient from swarmmesh-cli in Node. See
Library API reference above for real method
signatures.
Can I run this on more than one machine, and is it production-ready?
Nothing stops a mesh from being reachable across a network; --host binds
to any interface you point it at. But there's no authentication in v1 (see
Security), so treat it like a local Redis instance, not a
public-internet-facing service. It also has 0 known production users at
this point, so evaluate accordingly.
Is it free to use commercially? Yes. SwarmMesh is MIT licensed, on both the Python and Node packages and the repository itself. Use it in a commercial product without asking permission or paying anything.
Security
[!WARNING] SwarmMesh has no authentication in v1. Running a SwarmMesh server directly exposed to the public internet without a reverse proxy adding authentication is a misconfiguration, not a supported deployment.
Both the Python and Node servers bind to 127.0.0.1 by default, not
0.0.0.0. SwarmMesh is designed to run on localhost or inside a private
network alongside the agents it coordinates. That's the same trust boundary
as a local Redis instance or a SQLite file, not a public-internet-facing
service.
Found a vulnerability? Please don't open a public issue. See
SECURITY.md for the private disclosure process.
Contributing
SwarmMesh has two official implementations of the same protocol, kept
behaviorally identical on purpose. See CONTRIBUTING.md
for development setup for both, the pull request process, and the ground
rule that shapes everything in this README: no unverified claims. Every
number here has to be reproducible from a real command.
License
来源:README.md,提交 30c21ee
工具
0版本历史
1- v0.1.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分