[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112002":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":16,"stars30d":17,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":22,"topics":23,"createdAt":10,"pushedAt":34,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":13,"starSnapshotCount":13,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},112002,"mas-office","weixijia\u002Fmas-office","weixijia","See your multi-agent system work: a framework-agnostic protocol and live, animated office for AI agent teams.","https:\u002F\u002Fwww.xijiawei.com\u002Fmas-office\u002F",null,"JavaScript",52,0,56,7,10,49,49.9,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33],"agents","ai-agents","claude","langgraph","llm","multi-agent-systems","observability","openai-agents","protocol","visualization","2026-11-11 00:51:20","2026-11-21 01:29:07","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"docs\u002Fassets\u002Flogo.svg\" alt=\"MAS Office logo\" width=\"96\">\n\n# MAS Office\n\n### An AI team you design, can watch, can steer, and that checks its own work.\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Factions\u002Fworkflows\u002Fci.yml)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fmas-office?color=E04E2A&label=npm)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmas-office)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-2B57B5.svg)](LICENSE)\n[![Protocol v0.2](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fprotocol-v0.2-D89A12.svg)](spec\u002FREADME.md)\n[![Zero dependencies](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdependencies-0-5E8C57.svg)](packages\u002Fnode\u002FREADME.md)\n[![PRs welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-1F8A84.svg)](CONTRIBUTING.md)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fweixijia\u002Fmas-office?style=social)](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Fstargazers)\n\n[**Website**](https:\u002F\u002Fwww.xijiawei.com\u002Fmas-office\u002F) · [**Quick start**](#quick-start) · [**Design a team**](#design-and-lock-a-team) · [**Run a team**](#run-a-team) · [**Checking**](#how-answers-are-checked) · [**Other frameworks**](#show-any-other-frameworks-team) · [**CLI**](#cli) · [**Limits**](#limits-today) · [**Roadmap**](ROADMAP.md) · [**中文**](README.zh-CN.md)\n\n\u003C\u002Fdiv>\n\nEvery role in the team is a real Claude Code or Codex session on your computer, signed in by you. You design the roles and lock the design; plain code schedules the work and enforces each role's tools. Tool approvals, questions, stuck roles, checker flags and stage checkpoints from every session land in one \"Needs you\" inbox, where you answer them in place. The answer comes back with each claim tagged with its sources, each link checked and each claim judged by a checker with a clean context.\n\nThe first use case is research and decision tasks: price comparisons, trip plans, literature and feasibility checks, product and policy questions.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fassets\u002Finbox.png\" alt=\"The MAS Office panel. Left: an isometric office with four desks; the Retail finder is working, the Market finder has a 'needs you' badge, the Catch checker waits for its turn. Right: the Needs you inbox with one approval: Market finder asks to search the web for 'sony xm6 ebay', shows the tool input, says it holds up the Catch checker and the Lead, and offers Allow once, Deny or a reply.\" width=\"900\">\n  \u003Cbr>\n  \u003Csub>The \"Needs you\" inbox with an approval waiting. Screenshots on this page come from the real panel, server and engine; the \"Headphone deals\" data is made up.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n> **Status (v0.3.0).** `mas-office up` runs a locked team on real Claude Code and Codex sessions. The office view, the event protocol with its JS and Python SDKs, and the no-code team kit work as before. Not done yet: a raw-terminal tab you can take over, evaluation runs, a desktop app. See [Limits today](#limits-today).\n\n## Quick start\n\n**Run a team on real sessions** (Node ≥ 18.14):\n\n```bash\nmkdir ~\u002Fmas-work && cd ~\u002Fmas-work\nnpm install mas-office mas-office-runtime        # Node 18.14 or later\nclaude auth login                                # you sign in yourself\ncodex login                                      # the example's checker runs on Codex\nmkdir -p deals\u002Fmas\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fweixijia\u002Fmas-office\u002Fmain\u002Fexamples\u002Fprice-compare\u002Fmas\u002Fstructure.js -o deals\u002Fmas\u002Fstructure.js\nnpx mas-office team check deals\nnpx mas-office up . --project deals --open --task \"Find the best UK price for Sony WH-1000XM6 headphones\"\n```\n\n`up` reports whether Claude Code and Codex are installed and signed in, then prints a panel link that carries an access token (`--open` opens it). The example design is already locked; if you change it, run `npx mas-office team lock deals` again. Keep workspaces outside any folder with a `CLAUDE.md` you don't want the roles to read: Claude Code loads parent `CLAUDE.md` files. Below, `mas-office` means `npx mas-office` in that folder (or the command itself after `npm install -g mas-office`).\n\n**Watch a simulated team** (Node ≥ 18, no sign-in):\n\n```bash\nnpx mas-office demo\n```\n\nA five-agent team plans a weekend in Lisbon: two finders search in parallel, a budget checker raises a problem, a planner takes over, and the Lead writes the result.\n\n\u003Cdetails>\n\u003Csummary>The \u003Ccode>demo\u003C\u002Fcode> command (recorded with the 0.2 viewer)\u003C\u002Fsummary>\n\u003Cbr>\n\u003Cimg src=\"docs\u002Fassets\u002Fdemo.gif\" alt=\"The demo as recorded with the 0.2 viewer: two finder agents search in parallel, a budget checker raises a flag, a planner takes over, and the team celebrates when the result is ready\" width=\"900\">\n\u003C\u002Fdetails>\n\n**From a clone** (for contributors): `git clone https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office && cd mas-office && npm install` links both packages, and `node packages\u002Fnode\u002Fbin\u002Fmas-office.js` stands for `mas-office`. Keep workspaces outside the clone, because Claude Code would load this repository's `CLAUDE.md`.\n\n## Design and lock a team\n\nA team is `\u003Cproject>\u002Fmas\u002Fstructure.json` (or its `.js` twin). Team design v2 adds optional fields to the protocol's `structure`: a `backend` per role, each role's tools with `allow`, `ask` or `deny`, reviewers and review rounds, gates, the approvals the Lead may give, a `budget` and verification thresholds. A 0.1 structure is still valid. Part of [`examples\u002Fprice-compare`](examples\u002Fprice-compare\u002Fmas\u002Fstructure.js):\n\n```jsonc\n{\n  \"lead\": {\"id\": \"lead\", \"name\": \"Lead\", \"backend\": \"claude-code\",\n           \"delegate\": [{\"effect\": \"allow\", \"kind\": \"approval\", \"tools\": [\"web search\"]}]},\n  \"budget\": {\"maxParallel\": 2},\n  \"groups\": [{\"id\": \"A\", \"label\": \"Search in parallel\", \"after\": null},\n             {\"id\": \"B\", \"label\": \"Check\", \"after\": \"A\"}],\n  \"roles\": [\n    {\"id\": \"sony-deal-finder\", \"group\": \"A\", \"tools\": [\"web search\"], \"handsTo\": \"catch-checker\", \"…\": \"…\"},\n    {\"id\": \"catch-checker\", \"group\": \"B\", \"backend\": \"codex\", \"tools\": [\"web search\"],\n     \"reviewerOf\": [\"sony-deal-finder\", \"similar-model-finder\"], \"cleanContext\": true,\n     \"review\": {\"maxRounds\": 2, \"onExceed\": \"ask-human\"}, \"handsTo\": \"lead\", \"…\": \"…\"}\n  ],\n  \"gates\": [{\"id\": \"g-offers\", \"after\": \"A\", \"kind\": \"stage\",\n             \"title\": \"Look at the offers before they are checked\", \"blocking\": true}],\n  \"verify\": {\"claims\": true, \"urlHealth\": true}\n}\n```\n\n**Tools** come from a fixed vocabulary; anything else is refused at lock:\n\n| Word | What the role gets |\n|---|---|\n| `web search` | web search and page fetches |\n| `browse the web` | the kit's role browser (`mas-browser`) |\n| `read my files` | your own files in the project's `raw\u002F` folder |\n| `write notes` | writing its own files (allowed by default) |\n| `run commands` | shell commands |\n| `mcp:\u003Cserver>` | an MCP server listed in the workspace `.mcp.json` |\n| `cli:\u003Cprefix>` | commands starting with a prefix listed in `home\u002Fcommands.json` |\n\nEach entry is a word (effect `allow`) or `{\"name\": \"…\", \"effect\": \"allow\" | \"ask\" | \"deny\"}`. Every role can read the project folder (except `raw\u002F` without `read my files`) and can write only its own files: `outputs\u002Fwork\u002F\u003Crole>*.md` and source cards in `sources\u002F`. Some rules hold whatever the design says: credentials are never read; instruction and settings files (`CLAUDE.md`, `AGENTS.md`, `.claude\u002F`, `.mcp.json`, …) are never written; local and private addresses are never fetched; a Grep or recursive search over the whole project folder is refused, so a role passes a narrower folder such as `outputs\u002F` or `sources\u002F`.\n\n**Delegation** (`lead.delegate`): the first matching rule decides an approval. `allow` approves it by policy, `lead` lets the Lead decide within the tools and roles you listed, `human` (and no match) sends it to you. Gates, checker flags and requests marked for a person always come to you.\n\n**Check, lock, show:**\n\n```bash\nmas-office team check \u003Cproject>   # every problem in the design (exit 1 on errors)\nmas-office team lock \u003Cproject>    # check, then set \"locked\" and a signature\nmas-office team show \u003Cproject>    # the design as Markdown: roles, tools, who may approve what\n```\n\nA run refuses a design that is not locked or that changed after it was locked. At run time each role's tools are compiled into its session's own options, and every tool call passes one decision point (`decideTool`): allowed, denied, or sent to the inbox.\n\n## Run a team\n\n```bash\nmas-office up \u003Cworkspace> --project \u003Cp> --task \"…\" [--max-parallel 3] [--open] [--exit]\n```\n\n`up` starts the panel server with the runtime attached. Without `--task`, start a run from the panel. With `--exit`, it stops when the run ends and exits 1 if the run did not finish. A run goes like this:\n\n1. **Plan.** The Lead, itself a real session, reads the task and the team and returns a plan and a brief for each role. The scheduler is plain code and validates everything the Lead returns.\n2. **Stages** run in the design's order; roles inside a stage run in parallel. At most 3 roles work at once by default (`--max-parallel`, 1–12). The limit is for the whole `up` process, across projects, and the Lead is not counted; a design's `budget.maxParallel` can lower it.\n3. **Review.** A reviewer reads its targets' work with a clean context and accepts it, sends it back with a note, or escalates. After `review.maxRounds`, or on escalation, you decide. Nothing is accepted silently.\n4. **Checkpoints.** A blocking gate holds the run where the design put it until you continue, send the stage back with a note, or stop the run.\n5. **Write-up.** The Lead writes the answer to `outputs\u002Fresult.md` with every claim tagged; the claims are then checked (see [below](#how-answers-are-checked)).\n6. **Follow-ups.** Ask about the result in the panel: the Lead answers from the files or sends back only the roles your question needs, and the answer becomes a new round.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fassets\u002Fgate.png\" alt=\"A stage checkpoint in the inbox: the Lead asks you to look at the offers before checking, lists the two finders' work files, says the next stage does not start until you answer and that it holds up the Catch checker, and offers Looks good, continue, Stop the run, or send it back with a note.\" width=\"900\">\n  \u003Cbr>\n  \u003Csub>A stage checkpoint: the check stage waits until you continue, send the stage back with a note, or stop.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n**The inbox.** Everything that waits on a person, from every session: tool approvals, questions, decisions (a stuck role, whether to continue a run), checker flags and gates. Each item shows how long it has waited, what it holds up and what happens if you don't answer. The office shows the same items as raised hands on the desks. Approvals you delegated are decided by policy or by the Lead, which can still pass one on to you; each such decision is in the log with who made it.\n\n- **Allow once, always allow, deny.** \"Always allow\" remembers exactly that call (same tool, same input) for that agent, in that run.\n- **Keyboard.** `N` jumps to the next agent that needs you, `I` to the inbox, `A` \u002F `D` allow or decline the focused request, `1`–`9` open a stage, `?` lists the keys.\n\n**Steering an agent.** Click a desk to open its drawer: the live transcript, its outputs and a chat box into its real session. A message can *steer* (delivered at its next break), *queue* (after the current turn) or *interrupt*; a receipt shows what the session did with it. *Stop* ends the agent's turn.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fassets\u002Fagent-drawer.png\" alt=\"An agent's drawer for the Retail finder, running on Claude Code: what it is doing, why and what comes next; the Transcript tab with the Lead's brief and a WebSearch call; a steer message 'Prefer shops with free delivery' with the receipt 'Applied, delivered at the next break'; Steer, Queue and Interrupt buttons, Stop and Send.\" width=\"900\">\n  \u003Cbr>\n  \u003Csub>The agent drawer: transcript, outputs and a chat box into the real session, with a delivery receipt.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n**Stalls and restarts.** A role with no progress for `budget.stallMinutes` (default 5) is nudged once; next the Lead picks a recovery (retry, a new brief, or ask you); after that you decide. Waiting for a person is not a stall. A run stops at `budget.maxRunMinutes` (default 90), on Stop or on Ctrl+C. If `up` is restarted while a run is unfinished, the inbox asks whether to continue it; finished roles are not run again and the run's time budget keeps counting. Requests the old process left open expire, and the agent asks again.\n\n**Who may answer.** The panel link printed by `up` and `serve` carries a token. Only a browser opened from that link can answer requests, message agents or start runs; anywhere else (`file:\u002F\u002F`, the website, a static server) the panel is read-only. While `up` is running, decisions, verdicts, results and the other events the runtime owns can be posted only by the runtime or by the panel with its token, so a role's shell command cannot vouch for its own work.\n\n**Sessions you opened yourself.** With [`mas-office hook claude-code`](docs\u002Fintegrations.md#claude-code-hooks-no-code) installed, a permission prompt in your own Claude Code session also appears in the inbox. You answer it in your terminal; the panel only watches that session.\n\n## How answers are checked\n\n1. **Claims.** The Lead's answer wraps each statement in `\u003Cclaim id=\"c3\" src=\"currys-xm6,ebay-xm6\">…\u003C\u002Fclaim>`; the sources are the roles' source cards in `sources\u002F`.\n2. **Links.** Every source URL is checked by plain code, not a model: live, archived, dead or invented, or blocked by a bot wall. Private and local addresses are never fetched.\n3. **Verdicts.** Checkers with a clean context, from the same or another vendor, judge each claim against its cited sources: supported, partial, contradicted or unknown. Sources are graded **A** (can be bought or run), **B** (study with data), **C** (demo or marketing), **D** (opinion).\n4. **Flags.** When the design's `verify.flagWhen` thresholds are crossed (for example one contradicted claim), a flag opens in the inbox.\n5. **In the result**, claims are highlighted by verdict; a line counts the checked claims and live links; \"What the checkers caught\" lists contradicted claims and work that reviewers sent back.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fassets\u002Fclaims.png\" alt=\"The result drawer: a Checked claims bar reads 2 claims, 1 supported, 1 partial. Below, a headphone shortlist table with Currys at £279 and eBay at £249 plus £15 postage. A claim card on the eBay line shows 'partial, claimed by Lead', the Catch checker's verdict 'Price matches; sealed is not stated', and the cited source ebay-xm6 with grade A.\" width=\"900\">\n  \u003Cbr>\n  \u003Csub>A result with checked claims, and the card for one claim: who checked it, the verdict and the cited source.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n`mas-office verify \u003Cproject>` runs steps 1 and 2 on any answer, including one written by another tool, and points at statements with numbers, dates or superlatives that carry no claim tag. `--no-network` only parses and counts. When the project has an event log, the findings are added to it and the panel shows them.\n\n\"Supported\" means a checker judged that the cited page supports the claim; it does not mean the claim is true. Whether a team gives better answers than a single agent has not been measured yet: [`eval\u002F`](eval\u002FREADME.md) holds the tasks, team designs and metrics for that comparison, and no evaluation runs have been made.\n\n## Your own sign-in\n\n- Each role runs the unmodified `claude` or `codex` installed on your computer: Claude Code through Anthropic's Agent SDK pointed at your `claude`, Codex through your `codex app-server`.\n- You sign in yourself with `claude auth login` and `codex login`. MAS Office only asks whether you are signed in (`claude auth status`, Codex `account\u002Fread`). It never reads, stores or forwards credentials or tokens, and never offers a login of its own.\n- Sessions start with a minimal environment (your `PATH`, `HOME`, locale, terminal and proxy settings), not the server's own. Claude roles run with no user or project settings loaded; Codex roles run in a read-only sandbox, read inside the project with plain read commands, and every write they make is approved by the policy.\n- Runs use your own plan. At most 3 roles work at once unless you change `--max-parallel`, and the panel shows the usage each program reports.\n- `up` listens on this computer only (`127.0.0.1`) and refuses another `--host`. To reach it from another device, use an SSH tunnel or your own private network.\n\nThe rules behind this are in [`CLAUDE.md`](CLAUDE.md) §3.\n\n## Show any other framework's team\n\nThe office view works for any multi-agent system. Producers append events to `\u003Cproject>\u002Fmas\u002Fevents.jsonl` (or post them to `mas-office serve`); a deterministic reducer turns the log into the snapshots the panel draws. Protocol 0.2 adds requests that wait for a person, commands back to agents with acknowledgements, tasks, reviews, claims, evidence and verdicts. The contract is [`spec\u002FREADME.md`](spec\u002FREADME.md); 0.2 is described in [RFC 0001](spec\u002Frfcs\u002F0001-protocol-0.2.md).\n\n**JavaScript** (`npm install mas-office`):\n\n```js\nimport { Office } from 'mas-office';\n\nconst office = new Office({ workspace: '.\u002Fruns' });\nconst run = office.project('headphone-deals', { title: 'Headphone deals' }).run();\nconst finder = run.agent('finder', { name: 'Retail finder', emoji: '🔎' });\nconst checker = run.agent('checker', { name: 'Checker', emoji: '✅' });\n\nfinder.working('Searching Currys', { progress: 30 });\nfinder.source({ id: 'currys-xm6', title: 'Sony XM6 at Currys', url: 'https:\u002F\u002Fwww.currys.co.uk\u002F', evidence: 'A' });\n\n\u002F\u002F Something that needs a person: it waits in the inbox until it is resolved.\nconst ask = finder.request('Include refurbished offers?', {\n  kind: 'decision',\n  options: [{ optionId: 'new', name: 'New only' }, { optionId: 'any', name: 'Refurbished is fine' }],\n});\nfinder.resolve(ask, { optionId: 'new' });   \u002F\u002F when your app has the answer\nfinder.handoff(checker);\nfinder.done('Found one offer');\n\n\u002F\u002F A claim, and a checker's verdict on it.\nconst c1 = run.claim('Currys sells the XM6 for £279 with free delivery.', { sources: ['currys-xm6'] });\nchecker.verdict(c1, 'supported', { sourceId: 'currys-xm6' });\nchecker.done();\n\nrun.result({ markdown: '## Shortlist\\n- Currys: £279, free delivery' });\nrun.finish();\nawait office.close();\n```\n\n**Python** (≥ 3.10; not on PyPI yet):\n\n```bash\npip install \"mas-office @ git+https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office#subdirectory=packages\u002Fpython\"\n```\n\n```python\nfrom mas_office import Office\n\nwith Office(workspace=\".\u002Fruns\") as office:\n    run = office.project(\"headphone-deals\", title=\"Headphone deals\").run()\n    finder = run.agent(\"finder\", name=\"Retail finder\", emoji=\"🔎\")\n    finder.working(\"Searching Currys\", progress=30)\n    finder.source(\"currys-xm6\", title=\"Sony XM6 at Currys\", url=\"https:\u002F\u002Fwww.currys.co.uk\u002F\", evidence=\"A\")\n    ask = finder.request(\"Include refurbished offers?\", kind=\"decision\",\n                         options=[{\"optionId\": \"new\", \"name\": \"New only\"},\n                                  {\"optionId\": \"any\", \"name\": \"Refurbished is fine\"}])\n    finder.resolve(ask, option_id=\"new\")\n    run.claim(\"Currys sells the XM6 for £279 with free delivery.\", sources=[\"currys-xm6\"])\n    finder.done(\"Found one offer\")\n    run.result(markdown=\"## Shortlist\\n- Currys: £279, free delivery\")\n    run.finish()\n```\n\nThen open the office: `mas-office serve .\u002Fruns --open` (live updates over Server-Sent Events). Agents in several processes or on several machines can share one `serve`: `Office(url=\"http:\u002F\u002F127.0.0.1:4747\")`.\n\nThe SDKs also have `stopped`, `usage`, `evidence` and `followUp` (`follow_up` in Python); see [`packages\u002Fnode\u002FREADME.md`](packages\u002Fnode\u002FREADME.md) and [`packages\u002Fpython\u002FREADME.md`](packages\u002Fpython\u002FREADME.md).\n\n| Producer | Status | Guide |\n|---|---|---|\n| OpenAI Agents SDK (Python): `install(run)` adds a tracing processor | experimental | [docs](docs\u002Fintegrations.md#openai-agents-sdk-python) |\n| LangGraph (Python): `stream_to_office(graph.stream(...), run)` | experimental | [docs](docs\u002Fintegrations.md#langgraph-python) |\n| Claude Agent SDK (Python): `ClaudeAgentOptions(hooks=office_hooks(run))` | experimental | [docs](docs\u002Fintegrations.md#claude-agent-sdk-python) |\n| Claude Code hooks: `mas-office hook claude-code` | experimental | [docs](docs\u002Fintegrations.md#claude-code-hooks-no-code) |\n| AI coding assistants via `AGENTS.md` | stable | [kit](kit\u002FAGENTS.md) |\n| CrewAI · AG-UI · OpenTelemetry · Google ADK · Mastra · CAMEL | [help wanted](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) | [how to write one](CONTRIBUTING.md#2-framework-integrations) |\n\n## No-code kit\n\n```bash\nnpx mas-office init --kit my-team\n```\n\nOpen `my-team` in Claude Code, Codex, Gemini CLI or Antigravity and say *\"Read SETUP.md and follow it.\"* Your assistant becomes the Lead: it interviews you about the task, proposes a team you can reshape in plain words, locks it, runs each role as a separate subagent with a clean context, and writes a result where every claim links to a graded source card. Follow-up questions send back only the roles they need. The kit does not use the runtime: the assistant you opened runs the team itself, and the office shows it.\n\nIn Claude Code, choose **\"Yes, I trust this folder\"** when you first open it; only a trusted folder applies the kit's settings. They add the team to Claude Code's status line and give roles a real browser (`mas-browser`: a Chrome window with a temporary profile and none of your logins, confined to public addresses; it needs Google Chrome). The kit is also the engine behind the classroom edition, [awesome-mas](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fawesome-mas).\n\n## CLI\n\n| Command | What it does |\n|---|---|\n| `mas-office demo` | a simulated team in a temporary workspace, served and opened |\n| `mas-office up [workspace] --project \u003Cp> [--task \"…\"]` | run a locked team on real Claude Code and Codex sessions, with the panel and inbox (needs `mas-office-runtime`) |\n| `mas-office serve [workspace]` | the panel at `\u002Foffice\u002F`, workspace files read-only, `POST \u002Fv0\u002Fevents`, `POST \u002Fv0\u002Fcommands` (token), live `GET \u002Fv0\u002Fstream` with replay |\n| `mas-office init [dir] [--kit]` | a new workspace with the panel (and the no-code kit) |\n| `mas-office team check\\|lock\\|show \u003Cproject>` | check a team design, lock and sign it, or print it as Markdown |\n| `mas-office verify \u003Cproject> [--no-network] [--json]` | list an answer's claims, check every source link, point at untagged statements |\n| `mas-office validate [path]` | check snapshots and event logs against the JSON Schemas |\n| `mas-office reduce \u003Cproject>` | rebuild the snapshots by replaying the event log |\n| `mas-office export --ag-ui \u003Cproject>` | print the log as AG-UI events (experimental) |\n| `mas-office hook claude-code` | turn Claude Code hook input into events (experimental) |\n\n`mas-office \u003Ccommand> --help` lists each command's options. Without a runtime, `serve` leaves commands for an agent in `\u003Cproject>\u002Fmas\u002Fcommands\u002F\u003CagentId>.jsonl`, for a file-only assistant to pick up.\n\n## Mac app\n\nA native Mac app runs the same engine with a native inbox, agent page, result and settings, a menu bar item and notifications. Build it from a clone with `apps\u002Fmac\u002Fscripts\u002Fbuild-app.sh`; see [`apps\u002Fmac\u002FREADME.md`](apps\u002Fmac\u002FREADME.md). It is signed ad hoc, not notarised.\n\n![The Mac app's main window](docs\u002Fassets\u002Fmac-app.png)\n\n*Rendered from a fixture with made-up data.*\n\n## Limits today\n\n- No raw-terminal tab and no terminal take-over yet; they are planned as the optional `mas-office-terminal` package. Attaching the official Codex TUI to a role's thread is not supported yet.\n- With Codex 0.167.0 the sandbox does not limit a Codex role's reads to the project folder. Commands Codex runs without asking are checked by the policy as they start and the turn is interrupted on a deny, but a fast command can finish first.\n- Codex reports tokens but no cost, so cost totals are a lower bound.\n- Interrupting a turn is covered by unit tests but has not been exercised against the real Claude Code CLI.\n- A pending approval is not re-attached after a restart: it expires and the agent asks again.\n- The Lead is woken for the plan, for requests routed to it, for stalls, for the write-up and for follow-ups; it does not yet get a digest after every finished role.\n- `team show` prints Markdown, but a design cannot be read back from Markdown; edit the JSON.\n- The no-code kit does not run on the same engine yet.\n- One real end-to-end run has been made (2026-11-10: the Lead and a finder on Claude Code, the checker on Codex; the checker sent the work back once and accepted it in round 2). No evaluation runs have been made, so there are no measurements of answer quality.\n- The Python SDK is not on PyPI yet.\n\nThe plan is in [ROADMAP.md](ROADMAP.md); changes per version are in [CHANGELOG.md](CHANGELOG.md).\n\n## How it works\n\n```mermaid\nflowchart LR\n  U[\"mas-office up\u003Cbr\u002F>server + runtime\"] -- \"starts and steers\" --> W[\"Claude Code \u002F Codex\u003Cbr\u002F>sessions (your sign-in)\"]\n  W -- \"tool calls, approvals, turns\" --> U\n  U -- \"appends\" --> E[\"events.jsonl\u003Cbr\u002F>append-only log\"]\n  A[\"Your agents\u003Cbr\u002F>(any framework)\"] -- \"integration \u002F SDK\" --> E\n  K[\"AI coding assistant\u003Cbr\u002F>+ team kit\"] -- \"writes snapshots\" --> S\n  E --> R([\"reducer\u003Cbr\u002F>deterministic\"]) --> S[\"snapshots\u003Cbr\u002F>structure · status · result\u003Cbr\u002F>inbox · board · verification\"]\n  S -- \"file:\u002F\u002F or SSE\" --> P[\"the office panel\"]\n  P -- \"answers, messages (with token)\" --> U\n```\n\n- **Events in, pictures out.** Producers report what happened; the reducer computes what the panel shows now.\n- **Both directions, one log.** Requests that wait for a person and commands back to agents sit in the same log as everything else. A command never changes an agent's state; only what the session then reports does.\n- **Same answer everywhere.** The JS and Python reducers are checked against the same 16 hand-written [conformance cases](spec\u002Fconformance\u002F). A 0.1 log still reduces as before, apart from two new status fields.\n- **Runs you can replay.** Each project is an append-only `events.jsonl`; each agent's full conversation is kept in `mas\u002Ftranscript\u002F\u003Cagent>.jsonl`.\n\nDetails: [architecture](docs\u002Farchitecture.md) · [runtime design](docs\u002Fdesign\u002Fruntime.md) · [protocol](spec\u002FREADME.md) · [protocol 0.2 RFC](spec\u002Frfcs\u002F0001-protocol-0.2.md) · [prior art](docs\u002Fresearch\u002Fprior-art.md).\n\n## Repository layout\n\n| Path | What |\n|---|---|\n| [`packages\u002Fnode\u002F`](packages\u002Fnode\u002FREADME.md) | `mas-office` on npm, zero dependencies: JS SDK, reducer, server, team design and compiler, approval policy, verification, panel, CLI |\n| [`packages\u002Fruntime\u002F`](packages\u002Fruntime\u002FREADME.md) | `mas-office-runtime`: the Claude Code and Codex adapters and the engine behind `mas-office up` |\n| [`packages\u002Fpython\u002F`](packages\u002Fpython\u002FREADME.md) | Python SDK, reducer and framework integrations |\n| `panel\u002F` | the office panel: plain HTML and JS, no build step |\n| [`spec\u002F`](spec\u002FREADME.md) | protocol, JSON Schemas, conformance cases, RFCs |\n| [`kit\u002F`](kit\u002FAGENTS.md) | the no-code `AGENTS.md` kit |\n| [`eval\u002F`](eval\u002FREADME.md) | evaluation harness: tasks, locked designs, metrics, study protocol |\n| `examples\u002F` | finished example workspaces |\n| [`docs\u002F`](docs\u002Farchitecture.md) | architecture, integration guides, design notes, research notes |\n| [`references\u002F`](references\u002Fmanifest.json) | pinned open-source reference code (fetched on demand, not committed) |\n\n## Contributing\n\nA new framework integration is usually one file and a test with fake payloads. Look for [`good first issue`](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) and [`help wanted`](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22), then read [CONTRIBUTING.md](CONTRIBUTING.md). Coding agents start from [CLAUDE.md](CLAUDE.md). Spec changes follow a lightweight [RFC process](spec\u002Frfcs\u002FREADME.md). We use the DCO (`git commit -s`), not a CLA.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office && cd mas-office && npm install\nnpm test                                                        # SDK, CLI, runtime, panel\nPYTHONPATH=packages\u002Fpython\u002Fsrc python -m pytest packages\u002Fpython -q   # Python SDK\nnode packages\u002Fnode\u002Fbin\u002Fmas-office.js validate examples          # example workspaces\ngit diff --check\nPYTHONPATH=packages\u002Fpython\u002Fsrc:eval python -m pytest eval -q    # evaluation harness\n```\n\nWe would rather integrate good open-source work than rewrite it. [`references\u002Fmanifest.json`](references\u002Fmanifest.json) pins the projects we learn from, and [`docs\u002Fdesign\u002Freuse-map.md`](docs\u002Fdesign\u002Freuse-map.md) records, for each part of MAS Office, which files to read and whether we depend on them, adapt them or only take the idea.\n\nPlease follow the [Code of Conduct](CODE_OF_CONDUCT.md) and report vulnerabilities privately ([SECURITY.md](SECURITY.md)).\n\n\u003Ca href=\"https:\u002F\u002Fstar-history.com\u002F#weixijia\u002Fmas-office&Date\">\n  \u003Cimg src=\"https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=weixijia\u002Fmas-office&type=Date\" alt=\"Star history chart\" width=\"600\">\n\u003C\u002Fa>\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=weixijia\u002Fmas-office\" alt=\"Contributors\">\n\u003C\u002Fa>\n\n## Citation\n\nIf you use MAS Office in research or teaching, please cite it:\n\n```bibtex\n@software{wei2026masoffice,\n  author  = {Wei, Xijia and {MAS Office contributors}},\n  title   = {{MAS Office}: a live office for designing, watching and checking AI agent teams},\n  year    = {2026},\n  url     = {https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fmas-office},\n  version = {0.3.0}\n}\n```\n\n## Acknowledgements\n\nMAS Office grew out of [awesome-mas](https:\u002F\u002Fgithub.com\u002Fweixijia\u002Fawesome-mas), a classroom kit for teaching multi-agent systems to people who don't write code. The event model borrows from [AG-UI](https:\u002F\u002Fgithub.com\u002Fag-ui-protocol\u002Fag-ui), the [OpenTelemetry GenAI semantic conventions](https:\u002F\u002Fgithub.com\u002Fopen-telemetry\u002Fsemantic-conventions-genai), [A2A](https:\u002F\u002Fa2a-protocol.org) and LangGraph's event streaming. The idea of agents as people at desks owes a lot to [pixel-agents](https:\u002F\u002Fgithub.com\u002Fpixel-agents-hq\u002Fpixel-agents) and Stanford's [Generative Agents](https:\u002F\u002Fgithub.com\u002Fjoonspk-research\u002Fgenerative_agents). The runtime, the inbox and the verification layer learn from many more open-source projects, listed in the [reuse map](docs\u002Fdesign\u002Freuse-map.md). Fonts: Archivo and Red Hat Mono (SIL Open Font License).\n\n## License\n\n[MIT](LICENSE) © Xijia Wei and MAS Office contributors. Code adapted from other projects is credited in [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md). Product names and logos are trademarks of their owners.\n","MAS Office 是一个框架无关的多智能体系统可视化与协同工作平台，提供实时动画化办公室界面和标准化通信协议，用于监控、干预和验证 AI 代理团队的执行过程。其核心功能包括角色驱动的代理调度、工具调用审批、阶段检查点、声明溯源与自动校验，支持 Claude、OpenAI 等 LLM 后端，零运行时依赖。适用于需要人工监督与闭环验证的研究型任务，如价格比对、政策可行性分析、旅行规划及文献综述等决策密集型场景。",2,"2026-11-24 04:42:02","CREATED_QUERY"]