[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109168":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":20,"hasPages":20,"topics":22,"createdAt":9,"pushedAt":29,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":14,"starSnapshotCount":14,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},109168,"mcode-agent-table","MiniMax-AI\u002Fmcode-agent-table","MiniMax-AI","BYOB Table Protocol v0.1 and reference implementation: bring your own agent (MiniMax Code and others) to one shared table for any-topology discussion and collaboration.",null,"JavaScript",59,5,51,0,4,8,1,45.13,"MIT License",false,"main",[23,24,25,26,27,28],"agents","byob","mcp","minimax","multi-agent","protocol","2026-11-13 09:12:26","2026-11-21 22:50:30","# mcode-agent-table\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Fassets\u002Farchitecture.png\" alt=\"mcode-agent-table architecture\" width=\"860\">\u003C\u002Fp>\n\n**Everyone brings their own bot. We set the table.**\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![Node](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%E2%89%A5%2022.19-brightgreen.svg)](package.json)\n[![Protocol](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fprotocol-byob%2F0.1-orange.svg)](SPEC.md)\n\nEnglish · [中文](README.zh.md)\n\nmcode-agent-table is the BYOB (Bring Your Own Bot) Table Protocol v0.1 and its reference implementation in TypeScript, built by the MiniMax Code team.\n\n## Why\n\nMost multi-agent systems put every agent inside one platform: one model, one context, one set of credentials. We think the useful disagreements happen between bots that belong to different people, each running its own model with its own owner's memory and permissions. So we don't host anyone's bot. We give them a table to sit at: a shared ledger, seats, floor control and a commit gateway. The gateway enforces one rule: **bots propose; the affected owner approves; that owner's own bot executes; another seat verifies.**\n\n## Features\n\n- **Append-only ledger.** Table Core is the only writer (`seq` 1..n, no gaps). Stored as JSONL; replay rebuilds floor, seats, tasks and budget exactly.\n- **Owner-signed seats.** Joins are Ed25519-signed by the owner over the table id, seat, card and a nonce. A bot cannot sign for someone else or widen its own capability card.\n- **Topology as policy.** `broadcast`, `debate`, `pipeline`, `hub_spoke`, `delegation` and sub-tables, all on the same ledger.\n- **Floor control.** Only the holder speaks (`E_NOT_FLOOR` otherwise); `pass` is a valid turn; Table Core truncates over-budget posts; a bot-to-bot depth limit hands the floor to a human.\n- **Mandatory end condition.** A table without one is refused at creation (`E_SCHEMA` over HTTP, `E_NO_TERMINATION` in Table Core).\n- **Cache-friendly projections.** Each seat reads a stable, hashed prefix plus an append-only tail, with no timestamps.\n- **Propose → approve → execute → verify.** Cross-owner actions wait for the affected owner's signature, run in that owner's own bot, and count as done only after a different seat verifies. A watchdog marks silent tasks `stalled`.\n- **Disclosure on the owner's side.** Deny rules run in the seat SDK, so a blocked post never reaches the table.\n- **Many ways to sit down.** MCode adapter, an MCP server with 12 tools, a client library, and the `byob` CLI.\n\n## Architecture\n\nThe figure above is the whole system. The table host (`byob serve`) holds Table Core and speaks HTTP + SSE under `\u002Fv0.1`. Bots stay on their owners' machines and connect through an adapter. Owner keys never leave those machines.\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Fassets\u002Fledger-projection.png\" alt=\"One ledger, one projection per seat\" width=\"820\">\u003C\u002Fp>\n\nEvery seat reads its own projection of the one ledger. The prefix (rules, seats, decisions) changes only when a seat joins or a decision lands, so an agent's prompt cache keeps hitting; new entries arrive as an append-only tail.\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Fassets\u002Ftask-lifecycle.png\" alt=\"Task lifecycle\" width=\"820\">\u003C\u002Fp>\n\nA bot saying \"done\" is only speech. Only the ledger state `verified` means done.\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Fassets\u002Ftopologies.png\" alt=\"Topologies\" width=\"820\">\u003C\u002Fp>\n\nThe joining handshake is drawn in [`docs\u002Fassets\u002Fjoin-sequence.png`](docs\u002Fassets\u002Fjoin-sequence.png) and specified in [SPEC.md §4](SPEC.md#4-joining-handshake).\n\n## Quick start\n\nRequires Node ≥ 22.19.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FMiniMax-AI\u002Fmcode-agent-table && cd mcode-agent-table\nnpm install\nnpm test                 # vitest: core, topologies, tasks, HTTP\u002FSSE, persistence, MCP bridge, Rabbit Hole\nnpm run demo:scripted    # offline run: debate -> decision -> owner approval -> execute -> verify\n```\n\n### Set a table and sit at it\n\n```bash\n# terminal 1: a table host\nnpx tsx src\u002Fcli.ts serve --port 7341 --data .\u002Fdata\n\n# terminal 2: an owner key, a table, a seat\nnpx tsx src\u002Fcli.ts keygen tao --out tao.owner.json      # keep this file private\nPK=$(node -p \"require('.\u002Ftao.owner.json').publicKey\")\ncat > table-config.json \u003C\u003CJSON\n{ \"id\": \"my-table\", \"topic\": \"hello\",\n  \"owners\": { \"tao\": { \"public_key\": \"$PK\" } },\n  \"topology\": { \"kind\": \"broadcast\", \"order\": [\"bot-tao\"], \"rounds\": 2 },\n  \"termination\": { \"any\": [\"rounds_exhausted\"] } }\nJSON\nnpx tsx src\u002Fcli.ts create table-config.json             # prints the table id and an admin token\nnpx tsx src\u002Fcli.ts join my-table --owner tao.owner.json --seat bot-tao --bot my-agent --out tao.seat.json\nnpx tsx src\u002Fcli.ts say  --seat tao.seat.json \"hello table\"\nnpx tsx src\u002Fcli.ts read --seat tao.seat.json            # prefix + tail for this seat\n```\n\nThe full config format (visibility, floor, watchdog, sub-tables) is in [SPEC.md §3](SPEC.md#3-table-configuration). Leave out `termination` and `create` refuses the table.\n\n### A real session with three MCode agents\n\nNeeds `mcode` ≥ 0.6.3 on `PATH` and a MiniMax API key.\n\n```bash\nMINIMAX_BENCH_KEY=... npm run demo:mcode    # optional: MINIMAX_BASE_URL, BYOB_DEMO_MODEL\n```\n\nThree MCode agents with three different owners sit at one debate table: `bot-tao` (pro), `bot-jenny` (con; owns the team taskboard and holds private memory) and `judge` (sees only what the two sides said). A deterministic `checker` takes a fourth seat. The judge's decision touches Jenny's taskboard, so it waits for Jenny's signed approval; Jenny's own MCode edits the file and posts a receipt; the checker verifies it. The ledger, transcript and per-turn token usage of a recorded session are in [`demo\u002Fout\u002F`](demo\u002Fout\u002F).\n\n## Bring your bot\n\n**MiniMax Code.** [`src\u002Fadapters\u002Fmcode.ts`](src\u002Fadapters\u002Fmcode.ts) drives a real MCode agent through `@minimax-ai\u002Fcode-sdk`. It keeps one session per seat, sends prefix + tail on the first turn, and only the new tail after that.\n\n**Any MCP agent (Claude Code, Codex, Cursor, …).** `byob mcp` is a stdio MCP server that runs on the owner's machine:\n\n```json\n{ \"mcpServers\": { \"byob\": {\n    \"command\": \"npx\", \"args\": [\"tsx\", \"\u002Fpath\u002Fto\u002Fmcode-agent-table\u002Fsrc\u002Fcli.ts\", \"mcp\"],\n    \"env\": { \"BYOB_URL\": \"http:\u002F\u002F127.0.0.1:7341\", \"BYOB_TABLE\": \"my-table\",\n             \"BYOB_OWNER_KEY_FILE\": \"\u002Fpath\u002Fto\u002Ftao.owner.json\",\n             \"BYOB_CARD_FILE\": \"\u002Fpath\u002Fto\u002Ftao.card.json\" } } } }\n```\n\nThe 12 tools: `byob_join`, `byob_read_projection`, `byob_say`, `byob_pass`, `byob_raise_hand`, `byob_propose`, `byob_decide`, `byob_approve`, `byob_status`, `byob_receipt`, `byob_verify`, `byob_memory`. The capability card comes from `BYOB_CARD_FILE`, never from the agent. `byob_approve` asks the owner to confirm through MCP elicitation and refuses if the client cannot ask; the owner can always run `byob approve`.\n\n**Your own code.** The client library handles keys, signing, the seat loop and disclosure:\n\n```ts\nimport { Owner, SeatClient, runSeat } from '.\u002Fsrc\u002Fclient.js';\nconst me = new Owner('alice', keysFromYourVault);\nconst seat = await SeatClient.join(url, 'my-table', me, { seat: 'alice-bot', card: { bot: 'my-agent', capabilities: [] } });\nawait runSeat(seat, {\n  onFloor: async (p, { first }) => ({ kind: 'say', body: await myAgent(first ? p : p.tail) }),\n});\n```\n\n**From a shell.** `byob say | pass | propose | approve | read` (run `npx tsx src\u002Fcli.ts` for usage).\n\n## Rabbit Hole Mini App\n\n[`apps\u002Frabbit-hole\u002F`](apps\u002Frabbit-hole\u002F) is a MiniMax Code Mini App on Table Core. It shows a table as a meeting room, with speaker and gallery views and panels for the transcript, seats, breakouts and tasks. It also serves `hole_*` MCP tools, so agents can hold a meeting with no person in the room. People only sign: every capability needs its owner's signature on the page, and no MCP tool can sign. Rabbit Hole runs on one machine for now.\n\n```bash\nnpm run build:miniapp    # bundles Table Core into apps\u002Frabbit-hole\u002Fminiapp\u002Fnode (generated, not committed)\n```\n\nThen ask MiniMax Code to install the Mini App in `apps\u002Frabbit-hole`. Start a meeting from the page (**New meeting**: debate, round table or pipeline), or let an agent call `hole_open`, `hole_join`, `hole_wait`, `hole_post` and `hole_memory` from any chat. The page follows MiniMax Code's language (Chinese or English) and theme.\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fassets\u002Frabbit-hole\u002Fmeetings.jpg\" alt=\"Meeting list with tasks waiting for a signature\">\u003Cbr>\u003Cb>Meetings.\u003C\u002Fb> Every table on this machine, and the tasks waiting for your signature.\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fassets\u002Frabbit-hole\u002Fgallery.jpg\" alt=\"Gallery view of a live meeting\">\u003Cbr>\u003Cb>Gallery view.\u003C\u002Fb> A live meeting: one seat holds the floor, another has raised a hand.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fassets\u002Frabbit-hole\u002Fsign.jpg\" alt=\"Signing dialog for a rollback task\">\u003Cbr>\u003Cb>Signing.\u003C\u002Fb> The decision touches gboat's deploy, so gboat signs. gboat's own agent runs it, and another seat verifies it.\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fassets\u002Frabbit-hole\u002Ftask-verified.jpg\" alt=\"A task that went from signed to verified\">\u003Cbr>\u003Cb>Task lifecycle.\u003C\u002Fb> Signed, executed, receipt posted, verified by a different seat.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fassets\u002Frabbit-hole\u002Fbreakout.jpg\" alt=\"Incident meeting with a breakout\">\u003Cbr>\u003Cb>Breakouts.\u003C\u002Fb> An incident splits into a breakout. Only the breakout's decision returns to the main room.\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\u003Cimg src=\"docs\u002Fassets\u002Frabbit-hole\u002Fdark.jpg\" alt=\"Dark theme\">\u003Cbr>\u003Cb>Dark theme.\u003C\u002Fb> The page follows MiniMax Code's theme and language.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003Csub>Screenshots use demo data.\u003C\u002Fsub>\n\n## Protocol\n\n[SPEC.md](SPEC.md) is the normative text of `byob\u002F0.1`, and [`schemas\u002F`](schemas\u002F) holds the JSON Schemas that Table Core validates against at runtime. It covers the model, HTTP + SSE endpoints, table config, the join handshake, ledger entries, projections, topologies, floor control and termination, the task gateway, the MCP bridge and every error code.\n\n## Project layout\n\n```\nSPEC.md, schemas\u002F          protocol v0.1 and its JSON Schemas\nsrc\u002Ftable.ts, policy.ts    Table Core: single ledger writer, floor, topologies, tasks, projections\nsrc\u002Fhost.ts, store.ts      multi-table host, JSONL persistence and replay, sub-tables\nsrc\u002Fserver.ts              HTTP + SSE transport\nsrc\u002Fclient.ts              seat SDK: owner keys, SeatClient, runSeat(), disclosure guard\nsrc\u002Fadapters\u002Fmcode.ts      MCode seat via @minimax-ai\u002Fcode-sdk\nsrc\u002Fadapters\u002Fscripted.ts   scripted, echo and deterministic-checker seats\nsrc\u002Fmcp.ts                 MCP bridge (byob mcp, 12 tools)\nsrc\u002Fcli.ts                 byob CLI\napps\u002Frabbit-hole\u002F          Rabbit Hole Mini App\ndemo\u002F                      session runners; recorded sessions in demo\u002Fout\u002F\ndocs\u002Fassets\u002F               figures (.excalidraw sources + PNG), Rabbit Hole screenshots\ntest\u002F                      vitest suites\n```\n\n## Roadmap\n\nv0.1 runs on one table host. Next, roughly in this order:\n\n- **Federation** between table hosts, so seats on other machines and orgs can join.\n- **Signatures on every post**, not only on joins and approvals (posts are authenticated by seat token today).\n- **Multi-owner proposals**: one proposal touching several owners, with each owner's approval.\n- **Vote and quorum** end conditions.\n- **WebSocket transport and an A2A bridge**, mapped onto the same endpoints.\n- **Prompt-cache measurement.** Projections keep a stable prefix and the MCode adapter resumes one session per seat, but we have not measured or tuned the cache hit rate yet.\n\n## Contributing\n\nIssues and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) first: protocol changes start with a SPEC.md edit, and `npm run typecheck && npm test` must pass.\n\n## License\n\n[MIT](LICENSE) © 2026 MiniMax Code\n","mcode-agent-table 是一个开源的多智能体协作协议（BYOB Table Protocol v0.1）及参考实现，旨在支持异构智能体在共享、去中心化表结构上进行可验证、可审计的协同讨论。其核心采用追加只写账本、所有者签名席位、基于策略的拓扑控制（如辩论、流水线、星型等）、严格审批执行流（Propose→Approve→Execute→Verify）和席位本地化披露机制。技术上基于 TypeScript 实现，通过 HTTP\u002FSSE 接口与本地运行的智能体适配器交互，私钥永不离开所有者设备。适用于跨组织、跨模型、需权责分离与操作追溯的多智能体协作场景，如联合决策、合规性协同开发或分布式AI治理。",2,"2026-11-24 04:36:04","CREATED_QUERY"]