Brainy

io.github.memokar由 GitHub 账号 memokar 发布v0.2.0更新于 Nov 4, 2026

Shared knowledge base + task queue so Claude, ChatGPT and other agents can work together safely.

发布方自己的服务:Brainy Prices — UAE Cost of Living

已验证STDIO仅桌面效率与工作流知识与记忆

概览

AI 生成的概览

自托管的共享知识库与任务队列,让多个 AI 代理读取同一份 Markdown 知识、原子领取任务并留下审计记录。

可以做什么
  • 读取与检索知识:列出、获取、搜索、写入和追加 Markdown 文档,或提交写入提案等待人工批准
  • 管理任务:创建、领取、续期、完成、失败和释放任务,支持依赖、优先级与审核/批准/拒绝
  • 预留资源:按空间对自由格式的资源键进行领取、续期、释放和列出,采用原子租约
  • 管理访问与运维:空间、角色、按空间 ACL、服务令牌、OAuth 2.1 连接器、Web 管理界面与审计日志
适用场景
当多个代理(Claude、ChatGPT、机器人)或人类需要共享同一份事实来源并互相交接工作时适用,可避免互相覆盖文件或重复领取同一任务。适合希望自托管、按区域授权、人工审批并保留审计轨迹的场景。
运行要求
以本地 Docker 容器(镜像 ghcr.io/memokar/brainy)运行,或在裸机上使用 Python 3.10+(无第三方依赖)。客户端通过 /mcp 的 streamable HTTP 端点或 stdio 子进程连接,并在 Authorization 头中携带首次启动时打印一次的服务令牌。远程连接器需要 HTTPS 与 OAuth 2.1 配置;持久化数据需要挂载卷或数据库与知识目录路径。
安装前请注意
Authorization 服务令牌属于凭据:首次启动时仅打印一次,可访问知识库与任务队列,应妥善保管,并为每个代理分配独立身份、只授予所需空间。代理可写入知识、创建和领取任务、预留资源;写入会形成 Git 提交,也可改为经人工审批。远程暴露端点需配置 HTTPS 与 OAuth。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Brainy,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Brainy

[CI] [License: AGPL-3.0] [Dependencies: none]

A shared brain for your AI agents — and for the humans who work with them.

Brainy is a self-hosted knowledge and task backbone that Claude, ChatGPT and any other MCP-capable AI connect to through one controlled endpoint. Every agent reads the same knowledge, works on the same task list and leaves an audit trail — so your AIs can hand work to each other instead of living in separate chat silos.

   ChatGPT ─┐                                   ┌─ Git-versioned knowledge (Markdown)   Claude  ─┼──►  MCP endpoint  ──►  Brainy  ───┼─ Tasks with atomic claim/lease   Your bot ┘     (OAuth / tokens)   ACL+Audit  └─ Spaces, roles, append-only audit log                                       ▲                          Humans: web admin UI (+ optional Telegram approvals)

Why Brainy?

  • AIs that collaborate. ChatGPT creates a task, Claude claims it, does the work and writes the result back; a human reviews. Coordination happens through tasks — no hidden agent-to-agent magic.
  • One source of truth. Knowledge lives as plain Markdown in a Git repository. Every write is a commit, so you get history, diffs and rollback for free.
  • Safe by default. No shell, no filesystem, no eval over MCP. Path allowlist, per-space ACLs, secret detection on writes, rate limits, hashed tokens and an append-only audit log.
  • No double work. Atomic task claims with leases and claim tokens guarantee that two agents never process the same task at the same time.
  • Human in the loop. Agents can propose knowledge changes; a human approves or rejects them (web UI or Telegram). Tasks can require review/approval before they count as done.
  • Zero dependencies. Pure Python standard library + SQLite. No pip install, tiny attack surface.

Why not just a markdown file?

A shared notes file in a Git repo is a great knowledge store — and Brainy keeps that part on purpose: knowledge is plain Markdown in Git, with history, diff and rollback. The problem is everything a bare file doesn't do once more than one agent touches it:

  • Two agents overwrite each other. Nothing serializes concurrent writes to the same file. Brainy writes go through optimistic concurrency (expected_git_commit) plus a server-side write lock: exactly one writer commits, the others get a Conflict and re-read — no lost edits.
  • No task hand-off. A file can list TODOs, but it can't stop two agents from grabbing the same one. Brainy tasks use an atomic claim (UPDATE ... WHERE status='READY', one row): exactly one agent wins, the rest get a conflict and move on.
  • No per-area permissions. A file is all-or-nothing. Brainy has Spaces with per-space ACLs, so an agent only reads/writes the areas you grant it.
  • No approval step. Agents can propose changes for a human to approve (web UI or Telegram) instead of writing straight to the source of truth.
  • "Who changed what?" beyond git blame. Every action — reads of task state, claims, writes, rejections — lands in an append-only audit log enforced by a DB trigger.

Both guarantees above are covered by a concurrency test (tests/test_concurrency.py): 20 threads racing on one task yield exactly 1 winner and 19 conflicts, and 20 threads writing the same file yield exactly 1 commit and 19 conflicts, with the repo left clean.

How is Brainy different?

Honest comparison with the tools people mention most. Beads is closest to Brainy's task side, and Central Brain to its knowledge side; neither is a one-to-one match. Facts are from each project's own docs (links below); where something isn't documented, it says so rather than guessing.

BrainyBeads 1Central Brain 2Shared notes file
What it isKnowledge base + task queueAI-agent issue/task trackerAI memory layerMarkdown in a repo
Knowledge storeMarkdown in Git— (issue tracker)Plain files + local vector indexMarkdown in Git
Task queue with atomic claims✅✅not documented❌
Per-area permissions (ACL)✅ Spaces/roles❌❌❌
Append-only audit log✅ (DB-enforced)partial (Git/DB history)❌git blame only
Human approval for writes✅ (web/Telegram)❌❌❌
MCP server✅✅✅❌
Multi-agent concurrency control✅ claims + write lock✅ claims + concurrent writersnot documented❌
Dependenciesnone (stdlib + SQLite)bundles Dolt (Go)bundles embedding modeln/a
Self-hosted✅✅✅ (cloud optional)✅
LicenseAGPL-3.0 (+ commercial)MITproprietaryn/a

Features

AreaWhat you get
Knowledgelist_documents, get_document, search_knowledge, write_document (optimistic concurrency via Git commit), append_document, propose_write
Taskscreate_task, claim_task, renew_claim, complete_task, fail_task, release_task, dependencies, priorities, review/approve/reject
Resource claimsclaim_resource, renew_resource, release_resource, list_resource_claims — reserve any resource (a free-form key per space, e.g. a file path or area) with an atomic lease, same model as task claims
AccessSpaces (tenants/areas), roles ADMIN / EDITOR / AGENT / READER, per-space ACL, service tokens, OAuth 2.1 (for Claude/ChatGPT remote connectors)
OperationsWeb admin UI, audit log, agent registry + dispatcher framework, backup & verified restore scripts

Quickstart (Docker)

Try it in one command — no clone, no setup. Runs a throwaway demo (temporary database + example knowledge, deleted on exit) as an MCP stdio server:

bash
docker run --rm -i ghcr.io/memokar/brainy:latest --demo

For a real install, run the server (prebuilt image, published on every release):

bash
docker run -d --name brainy -p 127.0.0.1:8765:8765 -v brainy-data:/data ghcr.io/memokar/brainy:latestdocker logs brainy   # prints your one-time ADMIN token on first start

Or build it yourself with Compose:

bash
git clone https://github.com/memokar/brainy.gitcd brainydocker compose up -ddocker compose logs brainy   # prints your one-time ADMIN token on first start

Brainy now listens on http://127.0.0.1:8765 (MCP endpoint: /mcp, admin UI: /admin — log in with the token). For remote AI connectors put it behind HTTPS (see deploy/nginx-brainy.conf.example) and set BRAINY_PUBLIC_BASE_URL.

Quickstart (bare metal, Linux, Python ≥ 3.10)

bash
export BRAINY_DB_PATH=$PWD/data/brainy.dbexport BRAINY_KNOWLEDGE_ROOT=$PWD/data/knowledgeexport BRAINY_WEB_SESSION_KEY=$PWD/data/web_session.key
cp -r examples/knowledge "$BRAINY_KNOWLEDGE_ROOT"git -C "$BRAINY_KNOWLEDGE_ROOT" init -q && git -C "$BRAINY_KNOWLEDGE_ROOT" add -A \  && git -C "$BRAINY_KNOWLEDGE_ROOT" commit -qm "initial knowledge"
python3 scripts/bootstrap.py "$BRAINY_DB_PATH" --with-token   # prints ADMIN token oncepython3 scripts/init_prod_db.py "$BRAINY_DB_PATH"             # seeds default spacespython3 scripts/serve.py

Connecting an AI

  • Claude Code:
    bash
    claude mcp add --transport http brainy http://127.0.0.1:8765/mcp --header "Authorization: Bearer <token>"
  • Local stdio clients (e.g. Claude Desktop): run Brainy as a subprocess:
    json
    {"mcpServers": {"brainy": {"command": "python3", "args": ["/opt/brainy/scripts/stdio.py"],  "env": {"BRAINY_DB_PATH": "/var/lib/brainy/brainy.db",          "BRAINY_KNOWLEDGE_ROOT": "/opt/brainy-knowledge", "BRAINY_TOKEN": "<token>"}}}}
    Try it without any setup: python3 scripts/stdio.py --demo (temporary data, deleted on exit).
  • Any other MCP client with custom headers: endpoint https://<your-host>/mcp, header Authorization: Bearer <service token>.
  • Claude.ai / ChatGPT remote connectors: use the OAuth 2.1 flow (discovery at /.well-known/oauth-authorization-server). Set BRAINY_PUBLIC_BASE_URL to your HTTPS URL.

Brainy is listed in the official MCP Registry as io.github.memokar/brainy.

Give each AI its own principal (e.g. claude, chatgpt) with role AGENT and only the spaces it needs. Every action then shows up in the audit log under that name.

Example: two coding agents in one repo

Two agents working the same repository can step on each other's files. With resource claims each one reserves the area it's about to touch — a free-form key per space — and the other backs off until it's released or the lease expires:

jsonc
// Agent A, before editing the auth code:claim_resource   { "space": "shared", "resource_key": "repo:app/src/auth/**", "lease_seconds": 1800 }// -> { "claim_token": "…", "lease_until": "…" }   A now owns that area
// Agent B, about to touch the same area:claim_resource   { "space": "shared", "resource_key": "repo:app/src/auth/**" }// -> Conflict: already claimed  → B picks a different area (e.g. "repo:app/src/api/**")
renew_resource   { "space": "shared", "resource_key": "repo:app/src/auth/**", "claim_token": "…" }   // A keeps workingrelease_resource { "space": "shared", "resource_key": "repo:app/src/auth/**", "claim_token": "…" }   // A done → free againlist_resource_claims { "space": "shared" }   // who holds what right now

Same guarantee as task claims — exactly one holder at a time, expired leases free up automatically (see tests/test_resources.py). Resource claims reuse the task permissions/scopes (can_claim_tasks / brainy:tasks:write), so any agent that can claim tasks can claim resources.

Configuration

All configuration comes from environment variables — see .env.example. Secrets (tokens, keys) are never stored in the repository or the knowledge base.

Extensions

The core ships a worker plugin interface and a deterministic MockWorker. Real workers that let agents execute tasks autonomously (e.g. Claude Code, Codex) are separate extensions loaded via BRAINY_WORKER_PLUGINS. See docs/extensions.md.

Running the tests

bash
for t in tests/test_*.py; do python3 "$t" || exit 1; done

Status & roadmap

Brainy runs in production for its author. Current limitations:

  • Code comments are still partly German; all user-facing text is English.
  • Single-node design (SQLite). PostgreSQL only if real multi-writer load appears.

License

Copyright (C) 2026 Mehmet Karakolcu

Brainy is dual-licensed:

  • Open source: GNU AGPL-3.0. Free for everyone, including companies — but if you modify Brainy and offer it to others (also as a network service), you must publish your changes under the AGPL.
  • Commercial license: for companies that want to use or embed Brainy without AGPL obligations. See COMMERCIAL.md.

Contributions require agreeing to the Contributor License Agreement.

Footnotes

  1. Beads — https://github.com/steveyegge/beads (MIT, Go; stores issues in Dolt, a version-controlled SQL database; earlier versions used SQLite + JSONL). ↩

  2. Central Brain by NeuroAIgent — https://neuroaigent.ai (local-first AI memory, Windows + Apple-silicon macOS, MCP integration; pricing per the site at time of writing: $12/mo solo, $35/mo for 4 licenses). ↩

来源:README.md,提交 96783ee

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.2.0最新Oct 7, 2026
  2. v0.1.1Oct 7, 2026
  3. v0.1.0Oct 6, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Brainy 集成