Skip to main content
Glama
BrightbeamAI

@brightbeamai/chap-coordinator-mcp

Official
by BrightbeamAI

Collaborative Human-Agent Protocol (CHAP)

人間とエージェントが実際の作業を一緒に行うためのプロトコル。

AIエージェントが何かをドラフトし、人間がそれを編集したとき、その編集はどこに残るのでしょうか? CHAPでは、それは6か月後にクエリ、リプレイ、検証できるエンベロープの中に残ります。

インストール · 90秒ツアー · 12のシナリオ · このリポジトリについて · 論文



あなたには実際の作業を行うエージェントがいます。コードレビューのドラフト、チケットのトリアージ、和解案の提案、契約書のレビュー。人間はそれぞれを承認、編集、または拒否します。今のところ、その決定はアプリケーションコード、チャットスレッド、チケットコメント、そしてあなたの頭の中にあります。6週間後に何か問題が起きたとき、何が起きたのかを再構築するのに45分かかり、その半分は推測です。

CHAPは、それらの決定を置くための1つの場所と、そこに入れるための1つの形状を提供します。エージェントのドラフトはアーティファクトです。人間の編集は、差分、理由、そしてあなたが管理するタグを備えた構造化オーバーライドです。全体はコンテンツハッシュによって連結されます。4つのUIにわたるログをgrepする代わりに、チェーンをクエリします。

チェーンは、鍵のローテーション、ログの有効期限、人の離脱を乗り越えます。1回の audit.read 呼び出しで全体が返ってきます。レビュアーがすでに行っていたオーバーライドは、そうでなければ委託して作らなければならなかったであろう監督データへと蓄積されます。承認が否認不可である必要がある場合、security-signed/1.0 は、あなたが定義する signature_meaning を備えたOIDCに紐づく署名を追加し、audit-scitt/1.0 は、自社サーバーを信頼せずに検証可能な外部透過ログにチェーンを固定します。そしてCHAPはMCPやA2Aを置き換えるのではなく、その隣に位置します。ツールにはMCP、他のエージェントにはA2A、人間との共有作業にはCHAPです。

これが提案のすべてです。

90秒ツアー

Cursorを使ってプルリクエストをレビューするソロ開発者。ボットが「warning」をフラグし、開発者はそれに同意しません。以下がそのやり取り全体です。最初から最後まで。下のクリップは、ラベル付きの6つのステップで約23秒です。対応するコードはすぐ下にあります。

そしてこれがコードの全行です。2つの言語で書かれた一続きのストーリーです。実際に使っているスタックを選んでください。

1. ワークスペースを起動する。 SQLite永続化を備えた組み込みコーディネーター、2人の参加者、ワークスペース:

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. ボットがドラフトし、あなたがオーバーライドする。 既存の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. 2か月後、自分がしてきたことを分析する。 リファレンスリポジトリには、監査チェーンを(HTTP経由またはSQLiteファイルから直接)読み取り、オーバーライドをグループ化するアナリティクススクリプトが両言語で用意されています:

# 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の次のプロンプト改訂では、推測する代わりにそのパターンを名前で引用できます。


Related MCP server: interlock-mcp

オーバーライド・エンベロープの詳細

1つの形状を詳しく読むなら、オーバーライド・エンベロープにしてください。すべてのフィールドには役割があります:

最初に読んだときにほとんどの人が見落とす2つのフィールドは、intent_preservedtags です。

intent_preserved は、refining オーバーライド(人間がエージェントの決定に同意したが、表現方法を書き直した)と substituting オーバーライド(人間が異なる決定に達した)を区別します。これらは2つの異なる障害モードであり、異なる修正が必要です。あるポリシー条項をめぐるrefining率が高い場合は、エージェントの検索がずれていることを意味します。同じ条項でのsubstituting率が高い場合は、ポリシー自体があいまいであるか、エージェントのタスクコンテキストが間違っていることを意味します。

tags は、チームが合意する管理された語彙です。小さく保ってください。そこに置いたものは、3か月後に どのプロンプトに手を入れる必要があるか?ボットが一貫して間違える経路はどれか? といった質問に答えるときに集計する次元になります。

インストール

TypeScript / Node:

npm install @brightbeamai/chap-coordinator

Python:

pip install chap-coordinator

どちらのパスでも、Core と review/1.0 プロファイル、そして実行可能なリファレンスが得られます。TypeScriptリファレンスは reference/ に、Pythonリファレンスは reference/python/ にあります。TypeScriptライブラリは packages/coordinator/ に、Pythonライブラリは packages/coordinator-py/ にあります。

5分間のハンズオンウォークスルー: examples/00-five-minute-start.md

ステータス

CHAP 0.2 は公開ドラフトです。仕様は7つのCoreメソッドと11のオプショナルプロファイル(SPECIFICATION.md)で構成され、すべてのプロファイルをカバーし、同じJSON-RPC 2.0ワイヤー上で適合性テストハーネスに合格するTypeScriptとPythonの2つのリファレンス実装があります。コーディネーターは MCP サーバーまたは A2A エージェントとして自身を提示でき、5つのフレームワークブリッジがLangGraph、Pydantic AI、AG2、LlamaIndex Workflows、Google ADKのヒューマンインザループ決定を監査チェーンに載せます。完全なインベントリ、リポジトリのレイアウト、CHAPとMCP・A2Aの関係は ABOUT.md にあります。

破壊的変更はセマンティックバージョニングに従います。プロファイルのサーフェスはCoreよりも速く動くため、厳密な安定性が必要な場合は1.0を待ってください。

次に読むもの

まず IN_PRACTICE.md から始めてください。Cursorを使うソロ開発者からGMP規制下の製造業まで、12のシナリオが収められており、次に読むものとして最も有用です。ABOUT.md には、リポジトリの内容、CHAPとMCP・A2Aの関係、再利用する標準規格、コントリビュート方法が記載されています。core/SPEC.md はプロトコル全体のサーフェスを1画面に収めています。そして arXivのテクニカルレポート は設計上の選択肢を裏付けています: アーキテクチャ、プロファイルのセマンティクス、脅威モデル、そして12のシナリオを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(コード) · ロイヤリティフリー、あらゆる言語、あらゆるデプロイメント。

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
2dResponse time
1wRelease cycle
7Releases (12mo)
Commit activity
Issues opened vs closed

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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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