一键导入
mesh
Multi-agent coordination via pi-mesh. Use when multiple agents work in the same project - reservations, messaging, and peer awareness.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Multi-agent coordination via pi-mesh. Use when multiple agents work in the same project - reservations, messaging, and peer awareness.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | mesh |
| description | Multi-agent coordination via pi-mesh. Use when multiple agents work in the same project - reservations, messaging, and peer awareness. |
| triggers | ["mesh","coordination","multiple agents","reserve files","send message","who is working"] |
Load this skill when:
5 tools available when pi-mesh is loaded:
Check who's active. Always do this before starting work on shared code.
mesh_peers({})
Claim files before editing. Other agents get blocked with your name and a message to coordinate.
mesh_reserve({ paths: ["src/auth/", "config.ts"], reason: "Refactoring auth" })
// ... do your work ...
mesh_release({}) // Release all when done
/ for directories: "src/auth/" reserves everything under itsrc/auth/login.ts not src/edit and write tools are blocked. bash commands bypass reservations.Send messages to other agents.
// Normal message (waits for recipient to finish current work)
mesh_send({ to: "bosun-1", message: "Auth refactor done, interface changed" })
// Urgent (interrupts immediately)
mesh_send({ to: "bosun-1", message: "Stop! Breaking change in config.ts", urgent: true })
// Broadcast to all
mesh_send({ broadcast: true, message: "Deploying in 5 minutes" })
Use urgent sparingly - only for time-sensitive coordination.
The mesh is for coordination, not conversation. Prefer a single substantive message over a stream of tiny updates. Do not send acknowledgment-only messages like ack, got it, thanks, or emoji reactions.
Utility actions:
mesh_manage({ action: "whois", name: "bosun-1" }) // Detailed agent info
mesh_manage({ action: "rename", name: "auth-worker" }) // Change your name
mesh_manage({ action: "set_status", message: "reviewing PRs" })
mesh_manage({ action: "feed", limit: 20 }) // Activity timeline
mesh_peers({}) - check who's active and what they're working onmesh_reserve({ paths: [...] }) - claim your filesmesh_release({}) - release when donemesh_send({ ... }) - notify only if your changes affect others or you need coordinationAgent A reserves src/auth/login.ts, Agent B reserves src/auth/signup.ts. Both can work in parallel without conflicts. If B needs login.ts, they message A.
// Agent A finishing up
mesh_send({ to: "bosun-2", message: "Auth module ready. New interface: authenticate(token: string): Promise<User>" })
mesh_release({ paths: ["src/auth/"] })
// Agent B picks up
mesh_reserve({ paths: ["src/auth/"] })
When spawning agents via tmux, they auto-join the mesh:
spawn_agent({ agent: "lite", task: "Fix tests in src/utils/ and send one concise mesh_send report with results or blockers" })
// The lite agent appears in mesh_peers automatically
| Status | Meaning | Can you message them? |
|---|---|---|
| active | Currently processing a turn | Yes - message queued, delivered after current turn |
| away | Idle between turns, waiting for input | Yes - they are alive and will respond when prompted |
| stuck | No activity for a long time | Yes, but they may need user intervention |
| exited | Session has ended | No - they're gone |
"Away" does NOT mean unavailable. It just means the agent is idle - waiting for the user or for a message. You can mesh_send to an "away" agent and they will receive it. Only "exited" agents are truly unreachable.
pi-mesh automatically tracks:
This feeds into auto-generated status messages visible to peers.
Config at .pi/pi-mesh.json (in bosun, generated from config.toml via bosun init; pi-mesh itself reads the JSON directly):
| Setting | Description | Default |
|---|---|---|
| autoRegister | Join mesh on startup | false (bosun sets true) |
| autoRegisterPaths | Only auto-register in these dirs | [] (all) |
| contextMode | How much context to inject | "full" |
| feedRetention | Max events in feed | 50 |
| stuckThreshold | Seconds idle before stuck | 900 |
| autoStatus | Auto-detect agent activity for status | true |
Don't poll for results. When you spawn agents and ask them to mesh_send results, messages arrive automatically via Pi's followUp delivery. Never do:
sleep + capture_pane to check if an agent is donebash("sleep 15 && ...") loops waiting for messagesmesh_peers to check if an agent has respondedInstead, tell the user you're waiting for reports and let the mesh messages arrive naturally.
Don't use the mesh as a chat room. Avoid back-and-forth chatter, status pings that don't change anything, and acknowledgment loops. If you can batch updates into one message at the end, do that.
Don't use capture_pane for mesh-aware agents. If the agent has mesh tools, ask it to mesh_send results. Only use capture_pane for non-mesh agents (e.g., Q) or debugging.
bash tool can modify reserved files (e.g., sed -i). Only edit/write are blocked.Bosun configuration — models, sandbox, daemon, Pi settings. Use when changing models, editing config, or understanding how bosun is set up.
Bootstrap a new project using bosun as a foundation — via bun dependency (recommended) or git submodule. Creates a downstream project that inherits bosun's multi-agent infrastructure while adding custom agents, skills, and extensions. Works standalone — fetchable by any pi agent via raw GitHub URL.
Search curated markdown memory like sessions, plans, docs, and skills. Use when recalling prior context or looking for relevant historical/project knowledge.
Analyze Pi session JSONL files using jq patterns. Use when extracting metrics, tool usage, costs, or reviewing session history. Load for session export, summarization, or workflow analysis.
Session-based browser plan review primitives for Bosun. Provides a local-first state model, markdown-aware anchor extraction, and review-session persistence for reviewing existing plan files in dedicated CDP browser windows. Triggers: "plan-review", "review this plan", "review markdown plan".
Session-based browser diff review primitives for Bosun. Provides transport- agnostic v1 schemas plus local state and git snapshot helpers for immutable review rounds. Triggers: "diff-review", "reround", "review round", "snapshot-backed review".