Set up and orchestrate multi-agent workflows using Beads (shared issue tracking/memory) and MCP Agent Mail (agent messaging)...
Beads provides shared memory and issue tracking for agents. MCP Agent Mail provides agent-to-agent messaging. Together they create an "Agent Village" where agents can coordinate autonomously.
# Install Beads
go install github.com/steveyegge/beads/cmd/bd@latest
# Initialize in your project
bd init
# Run doctor to set up git hooks and configuration
bd doctor --fix
Add to your CLAUDE.md or AGENTS.md:
## Issue Tracking
Use Beads (`bd`) for all work tracking. Run `bd quickstart` to get started.
- File issues for any work taking longer than 2 minutes
- Check `bd ready --json` to find unblocked work
- Update issue status as you work
- File discovered bugs/issues immediately rather than ignoring them
For multi-agent coordination, add MCP Agent Mail:
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/mcp_agent_mail/main/scripts/install.sh" | bash -s -- --yes
| Command | Purpose |
|---|---|
bd init |
Initialize Beads in a project |
bd doctor [--fix] |
Diagnose and fix issues, run migrations |
bd ready --json |
List unblocked work items ready for execution |
bd cleanup --days N |
Remove issues older than N days |
bd sync |
Sync database and push to git |
bd upgrade |
Upgrade Beads to latest version |
Run bd cleanup every few days. Keep under 200-500 issues for best performance:
bd cleanup --days 2
bd sync
Configure a 2-3 character prefix for readability:
# Examples: bd-, vc-, wy-, ef-
bd config prefix my-
bd ready itemsThe agent will say "I don't think we can do much better than this" when iteration is complete.
Agents should file issues for:
--discovered-from to link to parent issueWhen doing code reviews, tell agents to file beads as they go - this produces more actionable findings.
# Link a discovered bug to the issue you were working on
bd create --title "Fix null check in auth" --discovered-from ISSUE-123
Two approaches for multi-agent work:
Git Worktree Model (Recommended):
Single Folder Model:
With Beads + Agent Mail, agents can:
Just tell agents: "Go sort it out amongst yourselves" - they will:
Agents claim work by setting status and assignee:
# Check what's available (filter by assignee if needed)
bd ready --json
bd ready --json --assignee=agent1
# Claim an issue
bd update ISSUE-123 --status in_progress --assignee agent1
# Other agents can see what's claimed
bd list --status in_progress
Multiple agents on different machines can query the same Beads database via git.
Beads conflicts happen during rebases/merges. Ask your agent to:
bd doctor --fix after resolutionIf issues.jsonl exceeds ~25k tokens:
bd cleanup --days 2Run daily:
bd doctor
bd upgrade # weekly
# Morning: Check what's ready
bd ready --json
# Claim an issue
bd update ISSUE-123 --status in_progress --assignee agent1
# During work: file discovered issues with link to parent
bd create --title "Fix flaky test in auth module" --discovered-from ISSUE-123
# Complete work
bd update ISSUE-123 --status done
bd sync
# End of session: cleanup
bd cleanup --days 2
A terminal UI for visualizing Beads issues and dependencies.
One-line installer:
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/beads_viewer/main/install.sh?$(date +%s)" | bash
Or build from source (requires Go 1.21+):
git clone https://github.com/Dicklesworthstone/beads_viewer.git
cd beads_viewer
go install ./cmd/bv
Navigate to any Beads-initialized project and run:
bv
The viewer automatically discovers .beads/beads.jsonl in your current directory.
| Key | Action |
|---|---|
j/k |
Navigate items |
/ |
Fuzzy search |
b |
Kanban board view |
i |
Insights dashboard |
g |
Dependency graph |
h |
History (commit correlation) |
? |
Show all keyboard shortcuts |
` |
Built-in tutorial |
q |
Quit |
For monorepos or non-standard layouts:
BEADS_DIR=/path/to/shared/beads bv
bv is a graph-aware triage engine for Beads projects. Instead of parsing JSONL or hallucinating graph traversal, use robot flags for deterministic, dependency-aware outputs with precomputed metrics (PageRank, betweenness, critical path, cycles, HITS, eigenvector, k-core).
Scope boundary: bv handles what to work on (triage, priority, planning). For agent-to-agent coordination (messaging, work claiming, file reservations), use MCP Agent Mail.
CRITICAL: Use ONLY --robot-* flags. Bare bv launches an interactive TUI that blocks your session.
bv --robot-triage is your single entry point. It returns everything you need in one call:
quick_ref: at-a-glance counts + top 3 picksrecommendations: ranked actionable items with scores, reasons, unblock infoquick_wins: low-effort high-impact itemsblockers_to_clear: items that unblock the most downstream workproject_health: status/type/priority distributions, graph metricscommands: copy-paste shell commands for next stepsbv --robot-triage # THE MEGA-COMMAND: start here
bv --robot-next # Minimal: just the single top pick + claim command
| Command | Returns |
|---|---|
--robot-plan |
Parallel execution tracks with unblocks lists |
--robot-priority |
Priority misalignment detection with confidence |
| Command | Returns |
|---|---|
--robot-insights |
Full metrics: PageRank, betweenness, HITS, eigenvector, critical path, cycles, k-core, articulation points, slack |
--robot-label-health |
Per-label health: health_level (healthy/warning/critical), velocity_score, staleness, blocked_count |
--robot-label-flow |
Cross-label dependency: flow_matrix, dependencies, bottleneck_labels |
--robot-label-attention [--attention-limit=N] |
Attention-ranked labels by: (pagerank × staleness × block_impact) / velocity |
| Command | Returns |
|---|---|
--robot-history |
Bead-to-commit correlations: stats, histories (per-bead events/commits/milestones), commit_index |
--robot-diff --diff-since <ref> |
Changes since ref: new/closed/modified issues, cycles introduced/resolved |
| Command | Returns |
|---|---|
--robot-burndown <sprint> |
Sprint burndown, scope changes, at-risk items |
--robot-forecast <id|all> |
ETA predictions with dependency-aware scheduling |
--robot-alerts |
Stale issues, blocking cascades, priority mismatches |
--robot-suggest |
Hygiene: duplicates, missing deps, label suggestions, cycle breaks |
--robot-graph [--graph-format=json|dot|mermaid] |
Dependency graph export |
--export-graph <file.html> |
Self-contained interactive HTML visualization |
bv --robot-plan --label backend # Scope to label's subgraph
bv --robot-insights --as-of HEAD~30 # Historical point-in-time
bv --recipe actionable --robot-plan # Pre-filter: ready to work (no blockers)
bv --recipe high-impact --robot-triage # Pre-filter: top PageRank scores
bv --robot-triage --robot-triage-by-track # Group by parallel work streams
bv --robot-triage --robot-triage-by-label # Group by domain
All robot JSON includes:
data_hash — Fingerprint of source beads.jsonl (verify consistency across calls)status — Per-metric state: computed|approx|timeout|skipped + elapsed msas_of / as_of_commit — Present when using --as-of; contains ref and resolved SHATwo-phase analysis:
status flagsFor large graphs (>500 nodes): Some metrics may be approximated or skipped. Always check status.
bv --robot-triage | jq '.quick_ref' # At-a-glance summary
bv --robot-triage | jq '.recommendations[0]' # Top recommendation
bv --robot-plan | jq '.plan.summary.highest_impact' # Best unblock target
bv --robot-insights | jq '.status' # Check metric readiness
bv --robot-insights | jq '.Cycles' # Circular deps (must fix!)
bv --robot-label-health | jq '.results.labels[] | select(.health_level == "critical")'
Performance: Phase 1 instant, Phase 2 async (500ms timeout). Prefer --robot-plan over --robot-insights when speed matters. Results cached by data hash.
Use bv instead of parsing beads.jsonl—it computes PageRank, critical paths, cycles, and parallel tracks deterministically.