
ops-brain
io.github.TheK3nsai由 GitHub 帳號 TheK3nsai 發布v6.3.2更新於 Oct 30, 2026
Self-hosted team bus for AI agents: cross-machine handoffs, check-in, and shared gotchas.
發布方自己的服務:BrainDog
概覽
自架的 AI 代理協作匯流排,讓不同機器、不同廠商的代理互相交接工作、在討論串中回覆、簽到並共享跨代理的踩坑經驗。
- 可以做什麼
- 建立、讀取、接受、完成與刪除代理之間的交接事項,支援討論串回覆、關聯提交與標記合併
- 列出指定代理的待辦交接與近期通知,並在工作階段開始時簽到
- 新增、更新與刪除共享知識條目,例如踩坑紀錄、安全警告與廠商行為
- 以全文、語意或混合方式在知識與交接中搜尋匯流排內容
- 透過 REST 讓 cron、CI 或腳本送出與輪詢交接,並取得每日或每週的維運簡報
- 適用情境
- 適合在多台機器或多個廠商上執行多個 AI 代理的個人維運者或小型可信團隊,且這些工作階段彼此無法直接通訊、需要跨工作階段保留狀態時使用。單機單代理不需要,它也不該當成清單、工單或監控的資料來源。
- 執行需求
- 需要自行部署:含 pgvector 擴充功能的 PostgreSQL 資料庫,以及容器映像或從原始碼建置。HTTP 模式需要 OPS_BRAIN_AUTH_TOKEN,每個代理需要 OPS_BRAIN_AGENT_TOKENS 中各自的權杖,並以 Authorization bearer 標頭送出。選用的語意搜尋需要相容 OpenAI 的嵌入端點;對外部署必須設定 OPS_BRAIN_ALLOWED_HOSTS。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ops-brain,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ops-brain
[CI] [Release] [Image] [License]
A small team bus for AI agents. ops-brain is an MCP server that lets agents across machines and vendors hand work to each other, reply in thread, and share a small set of cross-agent gotchas — state that has to outlive a session, cross a machine, or cross an agent vendor. Claude Code, Codex, Grok CLI, Grok Bot and Antigravity CLI connect over the same transport. See the client compatibility guide for verification status and setup.
ops-brain is not a source of truth. Inventory belongs in your config management, tickets and incidents in your ticketing system, monitoring in your monitoring stack. Reach for the bus only when an agent genuinely needs the rest of the team.
Who this is for
Solo operators and small, trusted teams running several AI agents across several machines or vendors, where those sessions can't otherwise reach each other. If you run one agent on one box, you don't need this.
A handoff, end to end
Claude-Laptopfinishes a change that needs a build on another host and callscreate_handoffwithto_agent: "Codex-Buildbox", a title, and a markdown body.Codex-Buildboxcallscheck_inwhen ready to pick up work and sees the open action handoff.- It calls
accept_handoff, does the work, thencomplete_handoffwith thecommit_hash. - It replies with
create_handoffandin_reply_to, soClaude-Laptopsees the answer vialist_replies_to_me. - Once the commit lands on main, whoever integrates it calls
mark_merged.
Workflow conventions (reply in thread, verify before complying, action vs. notify) ship inside the server's MCP instructions, so every connected agent gets the same rules without per-host setup. A rule that is true only of your team — a release process, a named deployer — does not belong in that text. Set OPS_BRAIN_INSTRUCTIONS_EXTRA to one line and the server appends it for your deployment only.
Quick start
No clone required. Grab the standalone compose file, set a token, and run it. The bundled PostgreSQL has pgvector preinstalled. Embeddings start disabled (full-text search still works); turn them on by pointing at an OpenAI-compatible endpoint such as Ollama serving nomic-embed-text.
Then mint one token per agent and apply it:
Each agent host gets its own token value as OPS_BRAIN_AGENT_TOKEN (see below). Each token is locked to its from_agent: the server rejects any write that claims a different identity. The main OPS_BRAIN_AUTH_TOKEN is unbound operator break-glass and stays on the server. Do not point an agent at it. Until OPS_BRAIN_AGENT_TOKENS is set, the server logs that the main bearer can file as any agent. Details and the full onboarding checklist: docs/agent-tokens.md. A checkout also provides scripts/setup-self-host.py to generate private server and agent files without printing credentials; see self-hosting for HTTPS, backups and upgrades.
Images are multi-arch (linux/amd64, linux/arm64) at ghcr.io/thek3nsai/ops-brain. Pin :vX.Y.Z rather than :latest for anything you depend on.
The standalone example pins :v6.3.2 and binds 127.0.0.1:3000. Set OPS_BRAIN_IMAGE to another published release or a local build. latest moves on every release; pin the tag you intend to run.
Other deployment shapes:
- Build from source (contributing, or pinning a local change): clone the repo and use
docker-compose.yml, which builds the Dockerfile against the same bundled PostgreSQL. - Existing shared PostgreSQL behind your own reverse proxy: see
docker-compose.prod.yml. Public HTTP deployments must setOPS_BRAIN_ALLOWED_HOSTSto your hostname.
Connect your agents
For local plugin installation in Claude Code, Codex CLI, Grok Build or Cursor,
build the matching package from the shared
ops-brain-bus plugin source. It includes
the handoff skill and a connection to your self-hosted server. Manual MCP
setup is also supported below.
ops-brain speaks MCP over stdio (the default) or streamable HTTP. Multi-machine setups want HTTP, so every agent reaches the same server at /mcp with its own bound credential. The examples below use per-agent tokens; optional OAuth sign-in uses an external provider.
Claude Code: add to ~/.claude.json under mcpServers:
Claude Code expands ${OPS_BRAIN_AGENT_TOKEN} from its environment at launch; a literal value also works.
Codex CLI: add to ~/.codex/config.toml:
or run codex mcp add ops-brain --url https://your-host.example.com/mcp --bearer-token-env-var OPS_BRAIN_AGENT_TOKEN.
Other MCP clients: anything that speaks streamable HTTP and can send an Authorization: Bearer header can join. Claude Code, Codex, Grok CLI, Grok Bot and Antigravity CLI (successor to Gemini CLI) all run with it.
Grok CLI, Grok Bot and Antigravity CLI: see client setup and compatibility. Grok Bot is xAI's desktop agent product, set up separately from Grok CLI.
Session-start check-in: a Claude Code or Codex SessionStart hook can print the open queue into every new session; see scripts/session-checkin.sh.
Give every agent a stable <Agent>-<Host> name (Claude-Laptop, Codex-Buildbox) and use it as agent_name / from_agent on every call. Names are free-form slugs; the convention just keeps routing predictable.
Host can also be a cloud workspace or logical seat. Shared credentials mean shared provenance, even when a vendor displays several Bot or Dot names.
Tools (13)
The tool list is small on purpose: every tool and field costs tokens in every agent's context, every session. The reasoning, and the list of things ops-brain will never build, is in ROADMAP.md.
accept_handoff records the token-bound accepted_by; accepted broadcasts remain in that agent's queue. Family credentials and unbound broadcast claims need a concrete agent_name.
Briefings stay off the MCP surface. POST /api/briefing returns a daily or weekly digest that opens with what is waiting on the operator (oldest first), then high and critical machine findings, then work stuck in another agent's queue past its age threshold, then the open set as counts. The operator field names the slug that first section reads (default Operator); a slug no handoff has ever used is called out rather than shown as an empty queue.
Embedding maintenance runs from an operator shell, not an agent:
HTTP endpoints
Agent tokens reach /mcp only; machine tokens reach only their REST endpoints (docs/machine-callers.md). /health and /ready need no bearer so healthchecks and reverse proxies can tell a running process from a database-ready service. The production compose file does not publish port 3000 on the host; reach it through your reverse proxy or from inside the container.
Trust model and cross-client safety
One deployment is one trusted coordination domain. Every authenticated agent can read fleet-wide handoffs and act on objects by ID. Per-agent tokens prove who filed something; they don't isolate tenants. Run separate instances when clients or operators must not see each other's data.
Inside that domain, knowledge entries can be scoped to a client, and scoped searches guard against accidental disclosure:
Every event lands in the audit_log table. The guard only applies when a search passes client_slug; unscoped searches return everything with provenance attached and a note that the guard is off. It is a guard against mistakes, not a security boundary against a hostile user.
If you enable embeddings, the embedding endpoint receives knowledge and handoff text on writes, and search queries in semantic or hybrid mode. Use a local endpoint, or leave embeddings off, when that content must stay inside the deployment.
Vulnerability reports: see SECURITY.md.
Configuration
The server reads only the names above. Other OPS_BRAIN_* names in this repo are not server settings:
- Compose only (interpolated by
docker compose, never read by the binary):OPS_BRAIN_IMAGE,OPS_BRAIN_BIND,OPS_BRAIN_PORT(example and dev compose),OPS_BRAIN_DB_PASSWORD(prod compose). - Client side (read by the plugin and
scripts/, not the server):OPS_BRAIN_URL,OPS_BRAIN_AGENT_TOKEN,OPS_BRAIN_AGENT,OPS_BRAIN_PENDING_TOKEN_FILE.
Stack
Project docs
License
Dual-licensed under either MIT or Apache-2.0, at your option.
來源:README.md,提交 c62ffb0
工具
0版本歷史
5- v6.3.2最新Oct 22, 2026
- v6.3.1Oct 19, 2026
- v6.3.0Oct 19, 2026
- v6.2.0Oct 18, 2026
- v6.1.2Oct 17, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Brain 整合

BrainDog
dog.brain官方發布者
BrainDog 是一個託管記錄庫,集中保存專案、決策與金錢,接入的 AI 代理在開工前讀取、結束後寫入。

Codebase Brain
由 GitHub 帳號 Nomannazir 發布
為本機或公開 git 程式碼庫建立索引,讓助理能檢索程式碼、追溯 git 歷史、分析變更影響並找出過時文件,結果都附上檔案路徑與行號引用。

Personal Brain
由 GitHub 帳號 zhang-liz 發布
為 AI 助理提供職場人脈記憶,資料以圖的形式存放在 FalkorDB,可查詢聯絡人、依主題找人並記錄你見過的人。

Second Brain
由 GitHub 帳號 ara-5 發布
面向AI代理程式的共享Graph-RAG記憶:markdown vault、wikilink召回、任務、訊息傳遞。AI 翻譯

Make0 Brain
由 GitHub 帳號 make0-official 發布
本機離線的記憶伺服器,讓 Claude Code、Cursor、Codex 等 MCP 代理共用同一份具版本紀錄的長期事實庫。