basemind-multi-agent-room
Skill125 starsChanged 48 days agoMITView on GitHub
Orchestrate a team of subagents in shared threads. Each subagent acts under its own sub-identity (`as`), reads its own inbox, and cross-checks peers by posting to threads they are members of.
In this repository10 other files it gives its agents.
- llms.txtllms.txt
- basemind-cliSkill
- basemind-code-searchSkill
- basemind-commsSkill
- basemind-doctorSkill
- basemind-documentsSkill
- basemind-git-historySkill
- basemind-scanSkill
- basemindSkill
- basemind-statsSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Run a team of subagents that coordinate in shared threads, driven by one orchestrator.
- Very specific: line 33
All subagents of one checkout share a principal.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:d85b007c1d994f89748a775d619758e63105be84f62c2e5578ab1f193df5f526
Source-Hash: blake3:607e3840e47d250c023513008342b4e723eff1841b0530d2a109acaf0dc5dbc6
Schema-Version: v1
-->Multi-agent thread orchestration
Run a team of subagents that coordinate in shared threads, driven by one orchestrator. Each
subagent acts as its own sub-identity, has its own inbox, and posts to threads its peers are
members of. The tools are agent_post, agent_inbox and agent_threads, listed separately from
the others; the basemind-comms skill has the full contract.
When to use it
- Several reviewers need to see each other's work (code review, audit, cross-validation).
- A subagent hands findings to a peer for verification.
- The team needs one narrative, readable as a thread history.
- Independent work runs in parallel and is synthesized afterwards.
Identity model
All subagents of one checkout share a principal. as: "<name>" ([a-z0-9_-]{1,32}) makes the
call act as <principal>.<name>: a separate read position and inbox, the same membership. An actor's
own posts are never unread for it, but a sibling's are, so a parent and a subagent that passes
as can talk. A subagent that omits as shares the parent's read position and cannot message it.
In Claude Code the PreToolUse hook injects <agent_type>-<8 hex> when a call has no as; that
name is not predictable, so tell any subagent you will address to pass an explicit as.
Setup
Open a thread. Without
toit is open to the repository; withtoit is invitation-only and only the listed principals discover it. A sub-identity named intomakes its principal the member.agent_post {subject: "review-pr-42", body: "Reviewing PR 42; post findings here.", paths: ["src/auth/"], as: "lead"}The reply carries the thread id (
t-abcdef).- Give each subagent a name and the thread id. Its prompt includes:
- its
asname (security,perf,correctness); - the thread id;
- to pass
ason every agent tool call.
- its
- Members join. On an open thread a subagent runs
agent_threads {thread: "t-abcdef", join: true, as: "security"}. Membership is per principal, so the orchestrator can alsoinviteagents of other checkouts.
Broadcast vs targeted hand-off
- Thread post: everyone on the thread sees it. Use it for findings the team should see,
replies (
reply_tokeeps them linked) and summaries. - Targeted hand-off:
agent_post {subject: "cross-check", body, to: ["<peer-principal>"]}makes an invitation-only thread.tonames principals; it cannot name only yourself. Use it to ask one peer to validate a finding.
Reading and synthesis
The orchestrator:
- Lets subagents post in parallel.
- Blocks on peers instead of polling:
agent_inbox {wait_secs: 30, as: "lead"}returns as soon as a peer posts; bodies are inline (cut at 4 KiB;{id: "t-abcdef.4"}reads one whole). - Reads a thread's full history:
agent_inbox {thread: "t-abcdef", unread: false}. - Looks without consuming:
peek: true. - Synthesizes the findings into a verdict or report.
Reading marks messages read for that actor only. A reply that does not fit the 16 KiB budget
returns more: true; read again.
Example: security and performance cross-check
Orchestrator:
agent_post {subject: "review-auth-pr", body: "Review the diff.", as: "lead"}
# spawn "security" and "perf" with: thread id, their `as` name, the rule to pass `as` on every callSubagent security:
agent_threads {thread: "t-abcdef", join: true, as: "security"}
agent_post {thread: "t-abcdef", body: "Parameter X is quoted; no injection.", as: "security"}
agent_inbox {as: "security"}Subagent perf:
agent_threads {thread: "t-abcdef", join: true, as: "perf"}
agent_post {thread: "t-abcdef", body: "New validation adds ~2 ms.", as: "perf"}
agent_post {reply_to: "t-abcdef.2", body: "Sanitization looks solid.", as: "perf"}Orchestrator synthesis:
agent_inbox {wait_secs: 30, as: "lead"}
agent_inbox {thread: "t-abcdef", unread: false, as: "lead"}Cleanup
Archive a finished thread with agent_threads {thread, archive: true} (creator only); an archived
thread cannot be posted to or reopened. An operator can archive any thread with
basemind agent cleanup --archive <thread>, which also runs a retention sweep.
CLI parity
basemind agent post --body … --thread <t> --as security,
basemind agent inbox --thread <t> --unread false --as lead,
basemind agent threads --thread <t> --join --as perf. basemind agent status shows who the
checkout acts as and the store state.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

