@brightbeamai/chap-coordinator-mcp
OfficialCollaborative Human-Agent Protocol (CHAP)
让人类与智能体共同完成真实工作的协议。
当 AI 智能体起草了某份内容,而人类对其进行了编辑,这份编辑最终保存在哪里? 在 CHAP 中,它保存在一个信封里,六个月后你依然可以查询、重放和验证。
安装 · 90 秒概览 · 十二个场景 · 关于本仓库 · 论文
你手下的智能体正在做真实的工作:起草代码评审、分类工单、建议和解方案、审查合同。人类会对每一项进行批准、编辑或拒绝。而目前,这些决定散落在你的应用代码、聊天记录、工单评论和你的脑海里。六周后出了问题,要还原当时发生了什么,需要花四十五分钟,而且一半靠猜。
CHAP 为这些决定提供了一个统一的存放位置和统一的形态。智能体的草稿是一个 artefact。人类的编辑是一个结构化的 override,包含 diff、rationale 以及由你控制的 tags。整个链条通过内容哈希串联在一起。你查询这条链,而不是在四个 UI 里翻日志。
这条链能经受住密钥轮换、日志过期和人员离职;一次 audit.read 调用就能取回全部内容。你的评审者原本就会做出的 override 会积累成监督数据,否则你还得专门去采集。当批准必须不可否认时,security-signed/1.0 会添加与 OIDC 绑定的签名,并带有你定义的 signature_meaning;audit-scitt/1.0 则将链条锚定在外部透明日志中,无需信任你的服务器即可验证。CHAP 与 MCP 和 A2A 并排存在,而不是取代它们:MCP 负责工具,A2A 负责其他智能体,CHAP 负责与人类共享的工作。
以上就是全部要点。
90 秒概览
一位独立开发者使用 Cursor 来评审拉取请求。机器人标记了一个开发者不同意的“警告”。下面是完整的交互过程,从头到尾。下面的片段大约 23 秒,包含六个带标签的步骤;对应的代码就在下方。
下面是代码,每一行都在这里。一个连续的故事,用两种语言呈现;选择你实际使用的技术栈即可。
1. 启动一个工作区。 一个内嵌的协调器,使用 SQLite 持久化,两个参与者,一个工作区:
import { Coordinator } from "@brightbeamai/chap-coordinator";
import { SqliteStore } from
"@brightbeamai/chap-coordinator/storage/sqlite";
const coord = new Coordinator({
store: new SqliteStore("./chap.db"),
});
coord.api.workspace.create({
workspace: "wsp_pr_reviews",
profiles: ["core/1.0", "review/1.0"],
});
coord.api.participant.join({
workspace: "wsp_pr_reviews",
from: "human:me@local",
type: "human",
});
coord.api.participant.join({
workspace: "wsp_pr_reviews",
from: "agent:cursor#v1",
type: "agent",
});from chap_coordinator import Coordinator
from chap_coordinator.storage.sqlite \
import SqliteStore
coord = Coordinator(store=SqliteStore("./chap.db"))
def send(method, params):
return coord.dispatch({
"jsonrpc": "2.0", "id": method,
"method": method, "params": params,
})
send("workspace.create", {
"workspace": "wsp_pr_reviews",
"profiles": ["core/1.0", "review/1.0"],
})
send("participant.join", {
"workspace": "wsp_pr_reviews",
"from": "human:me@local",
"type": "human",
})
send("participant.join", {
"workspace": "wsp_pr_reviews",
"from": "agent:cursor#v1",
"type": "agent",
})2. 机器人起草,你来 override。 将你现有的 Cursor 集成接入,使其生成信封:
// The bot's review is the output of a task.
const { task_id } = coord.api.task.create({
workspace: "wsp_pr_reviews",
from: "agent:cursor#v1",
assignee: "agent:cursor#v1",
kind: "code_review",
input: { pr_id: "PR-482" },
});
coord.api.task.complete({
workspace: "wsp_pr_reviews",
from: "agent:cursor#v1",
task_id,
output: cursorReview,
});
coord.api.review.request({
workspace: "wsp_pr_reviews",
from: "agent:cursor#v1",
task_id,
artefact: cursorReview,
to: "human:me@local",
});
// You disagree with one comment. Override it.
coord.api.decide.override({
workspace: "wsp_pr_reviews",
from: "human:me@local",
task_id,
intent_preserved: true,
diff: [{ op: "replace",
path: "/comments/0/severity",
value: "info" }],
rationale: "False positive. Framework " +
"convention, not a bug.",
tags: ["false-positive",
"framework-pattern-misread"],
});# The bot's review is the output of a task.
r = send("task.create", {
"workspace": "wsp_pr_reviews",
"from": "agent:cursor#v1",
"assignee": "agent:cursor#v1",
"kind": "code_review",
"input": {"pr_id": "PR-482"},
})
task_id = r["result"]["task_id"]
send("task.complete", {
"workspace": "wsp_pr_reviews",
"from": "agent:cursor#v1",
"task_id": task_id,
"output": cursor_review,
})
send("review.request", {
"workspace": "wsp_pr_reviews",
"from": "agent:cursor#v1",
"task_id": task_id,
"artefact": cursor_review,
"to": "human:me@local",
})
# You disagree with one comment. Override it.
send("decide.override", {
"workspace": "wsp_pr_reviews",
"from": "human:me@local",
"task_id": task_id,
"intent_preserved": True,
"diff": [{"op": "replace",
"path": "/comments/0/severity",
"value": "info"}],
"rationale": "False positive. Framework "
"convention, not a bug.",
"tags": ["false-positive",
"framework-pattern-misread"],
})关于接口形态。 TypeScript 提供了一个类型化门面(
coord.api.*),因此每个方法都能获得完整的自动补全和编译时检查。Python 在接口层保持 JSON-RPC 信封形状(coord.dispatch({...})),由调用方按需包装;send()辅助函数是 Python 测试使用的惯用方式。两条路径产生完全相同的线上字节;无论哪个客户端发起调用,审计链都逐字节一致。
3. 两个月后,分析你一直在做的事情。 参考仓库附带一个用两种语言编写的分析脚本,它读取审计链(通过 HTTP 或直接读取你的 SQLite 文件)并对 override 进行分组:
# TypeScript reference, against the SqliteStore from step 1:
$ npm --prefix reference/core-plus-review run analyze -- --db ./chap.db wsp_pr_reviews
# Python reference, same idea:
$ python3 reference/python/analyze_overrides.py --db ./chap.db wsp_pr_reviews
Override Learning Report
========================
Total overrides: 47
By tag:
false-positive ████████████████ 31 (66%)
framework-pattern-misread ███████████ 22 (47%)
cosmetic-pref ████ 8 (17%)
Top file paths:
src/handlers/ 18 overrides
src/components/ 9 overrides你为 Cursor 准备的下一版 prompt 修订会按名称引用该模式,而不是靠猜。
Related MCP server: interlock-mcp
override 信封详解
如果你要仔细阅读一种结构,那就是 override 信封。每个字段都有其职责:
大多数人在第一次阅读时会忽略的两个字段是 intent_preserved 和 tags。
intent_preserved 区分了 细化型 override(人类同意智能体的决定,但重写了表达方式)和 替代型 override(人类得出了不同的决定)。这是两种不同的失败模式,需要不同的修复方式。某个策略条款周围的细化率较高,说明智能体的检索有问题;同一条款的替代率较高,则说明策略本身含糊不清,或者智能体的任务上下文有误。
tags 是你们团队约定好的受控词汇表。保持精简。你放在那里的内容,就是三个月后你会用来聚合分析的维度,届时你要回答的问题包括:哪些 prompt 需要改进? 或 机器人在哪些路径上持续出错?
安装
TypeScript / Node:
npm install @brightbeamai/chap-coordinatorPython:
pip install chap-coordinator无论选择哪条路径,你都会获得 Core、review/1.0 配置文件以及一个可运行的参考实现。TypeScript 参考实现位于 reference/;Python 参考实现位于 reference/python/。TypeScript 库位于 packages/coordinator/;Python 库位于 packages/coordinator-py/。
五分钟动手演练:examples/00-five-minute-start.md。
状态
CHAP 0.2 是一份公开草案。规范包含七个 Core 方法和十一个可选配置文件(SPECIFICATION.md),并有两个参考实现(TypeScript 和 Python),它们覆盖了每个配置文件,并在相同的 JSON-RPC 2.0 线上协议上通过了符合性测试。协调器可以将自己呈现为 MCP 服务器或 A2A 智能体;五个框架桥接将 LangGraph、Pydantic AI、AG2、LlamaIndex Workflows 和 Google ADK 的人机协同决策接入审计链。完整的清单、仓库布局以及 CHAP 与 MCP、A2A 的关系,请参阅 ABOUT.md。
破坏性变更遵循语义化版本。配置文件的接口演进速度快于 Core,因此如果你需要严格的稳定性,请等待 1.0。
接下来读什么
从 IN_PRACTICE.md 开始,其中包含十二个场景,从使用 Cursor 的独立开发者到受 GMP 监管的制造业;这是接下来最有用的阅读材料。ABOUT.md 涵盖了仓库内容、CHAP 与 MCP 和 A2A 的关系、它复用的标准,以及如何贡献。core/SPEC.md 将整个协议接口浓缩在一屏之内。而 arXiv 上的技术报告 为设计选择提供了依据:架构、配置文件语义、威胁模型,以及十二个场景在详细附录中的 JSON 轨迹。
引用
如果你在学术或技术工作中引用 CHAP,请引用技术报告:
@techreport{chap2026,
author = {Shahid, Arsalan and Suttie, Gordon and Black, Philip},
title = {Collaborative Human-Agent Protocol (CHAP): An open protocol for auditable, structured multi-human and multi-agent collaboration},
institution = {Brightbeam AI},
year = {2026},
type = {Technical Report},
number = {arXiv:2606.09751},
url = {https://arxiv.org/abs/2606.09751}
}CC-BY 4.0(规范) · Apache 2.0(代码) · 免版税,任何语言,任何部署。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceThe Control Plane for Autonomous AI Enforce policy before execution, require human approvals where risk demands it, and keep a full audit trail — from first action to final result.495
- AlicenseNot gradedqualityBmaintenanceA human-in-the-loop governance interlock for AI agents. Agents propose changes, a human countersigns the exact plan, and then it executes stage by stage with precondition checks, verification, and auditing.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceGoverned, self-hosted memory for AI agents: writes queue until an authorized approver signs off.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to log, evaluate, and ground consequential decisions against an organization's authority graph, creating a traceable audit trail for governance.MIT
Related MCP Connectors
Runtime AI governance: decision gates, human approval, hash-chained audit, compliance mapping.
Runtime permission, approval, and audit layer for AI agent tool execution.
Bitcoin-anchored, tamper-evident audit log for AI agents — record, disclose and verify actions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BrightbeamAI/chap'
If you have feedback or need assistance with the MCP directory API, please join our Discord server