Skip to content
/

Beads (Yegge)

beads-yegge · steveyegge/beads · ★ 24k · last commit 2026-05-25

Primitive shape 3 total
Hooks 2 MCP tools 1
00

Summary

Beads (Yegge) — Summary

Beads (bd) is a distributed graph issue tracker for AI agents powered by Dolt (version-controlled SQL database). With 24,000+ GitHub stars, it reframes "memory" as a task-graph: instead of storing facts or decisions in flat files or vector indexes, it stores issues with dependency edges, hierarchical IDs (bd-a3f8, bd-a3f8.1, bd-a3f8.1.1), typed relationships (relates_to, duplicates, supersedes, replies_to), and compaction semantics. The bd prime command outputs AI-optimized workflow context (including persistent memories stored via bd remember) that agents inject at session start. Compaction is explicit: bd compact --analyze exports candidates, bd compact --apply accepts agent-generated summaries — "graceful decay" that reduces old closed issues to semantic summaries. The system is a Go binary distributed via brew, npm, and install script; it integrates with Claude Code, Codex, Cursor, Factory.ai, and other agents via bd setup <agent>. Compared to seeds, Beads is unique in this corpus — it is neither a memory layer over a coding session nor a methodology doc, but a persistent external issue-tracking database that survives across agents, machines, and compaction events.

01

Overview

Beads (Yegge) — Overview

Origin

Created by steveyegge (Steve Yegge, author of the "Stevey's Blog Rants" essays, previously at Google and Grab). Published under the gastownhall GitHub organization. Active development with significant community adoption (24K stars, 1600 forks).

Philosophy

The README captures the core claim: "Beads provides a persistent, structured memory for coding agents. It replaces messy markdown plans with a dependency-aware graph, allowing agents to handle long-horizon tasks without losing context."

The key insight is that markdown task lists fail for multi-session, multi-agent work because they have no structure — no dependencies, no atomic claiming, no conflict-free merging. Beads replaces them with Dolt (git-for-data), making the task graph version-controlled, branchable, and mergeable.

Dolt as the Core

Beads uses Dolt as its primary storage engine:

  • Version-controlled SQL with cell-level merge
  • Native branching on data
  • Built-in sync via Dolt remotes (bd dolt push / bd dolt pull)
  • Hash-based issue IDs prevent merge collisions (bd-a1b2 format)

Compaction Philosophy

Compaction reduces database size by summarizing closed issues that are no longer
actively referenced. This is permanent graceful decay — original content is discarded.

Tiers:
  - Tier 1: Semantic compression (30 days closed, 70% reduction)
  - Tier 2: Ultra compression (90 days closed, 95% reduction)

Memory vs Issue Tracking

Beads has two memory primitives:

  1. Issues — tasks with dependencies, assignees, priorities, statuses
  2. Memories — persistent free-text insights stored via bd remember "insight", injected at bd prime time

The bd prime command is the key session-start injection mechanism: it outputs AI-optimized workflow context including both issue workflow guidance and all stored memories.

Multi-Agent Design

Zero Conflict: Hash-based IDs (bd-a1b2) prevent merge collisions in
multi-agent/multi-branch workflows.

The system is explicitly designed for multi-agent, multi-branch, multi-machine use with a real distributed database as the coordination layer.

02

Architecture

Beads (Yegge) — Architecture

Distribution

Go binary (bd). Multiple install methods.

Install

brew install beads                       # macOS / Linux (recommended)
npm install -g @beads/bd                 # Node.js users
curl -fsSL <install-script> | bash       # All platforms
go install github.com/steveyegge/beads/cmd/bd@latest  # From source

Project Setup

cd your-project
bd init                                   # Init Beads in project
bd setup claude                          # Install Claude Code hooks
bd setup codex                           # Install Codex AGENTS.md
bd setup factory                         # Factory.ai AGENTS.md
bd prime                                  # Print workflow context for agent injection

Directory Structure

.beads/
├── embeddeddolt/   # Embedded Dolt database (default mode)
│   └── (Dolt SQL files)
├── issues.jsonl    # Export for viewers/interchange (NOT source of truth)
└── config          # Beads config

(optional, server mode):
.beads/dolt/        # External Dolt server connection

Storage Modes

Mode Command Use Case
Embedded (default) bd init Single-writer, recommended
Server bd init --server Multiple concurrent writers
Stealth bd init --stealth Personal use, no git commits
Contributor bd init --contributor Fork repo, route to ~/.beads-planning

Claude Code Integration

bd setup claude installs:

  • .claude/settings.json hooks (PreToolUse matchers for blocking interactive commands)
  • CLAUDE.md or AGENTS.md with bd workflow instructions

Required Runtime

Go 1.26+ (at build time). Binary has no runtime dependencies.

Platform Support

macOS, Linux, Windows, FreeBSD.

03

Components

Beads (Yegge) — Components

CLI Commands (extensive — ~80+ command files in cmd/bd/)

Core Issue Operations

Command Purpose
bd ready List tasks with no open blockers
bd create "Title" -p 0 Create issue (P0=critical, P4=lowest)
bd update <id> --claim Atomically claim a task (sets assignee + in_progress)
bd close <id> Close an issue
bd show <id> View task details and audit trail
bd list List issues (multiple format options)
bd dep add <child> <parent> Link tasks (blocks, related, parent-child)

Memory & Context

Command Purpose
bd prime Output AI-optimized workflow context + memories
bd remember "insight" Store persistent memory
bd context Context output (MCP mode-aware)

Database Operations

Command Purpose
bd compact Compact old closed issues (graceful decay)
bd compact --analyze Export candidates for agent review
bd compact --apply --id bd-42 --summary file.txt Apply agent-provided summary
bd dolt push/pull Sync Dolt database
bd backup init/sync/restore Backup operations
bd export Export issues to JSONL

Project Setup

Command Purpose
bd init Initialize Beads in project
bd setup <agent> Configure agent integration (claude/codex/cursor/factory/etc.)
bd onboard Print snippet for manual agent file setup
bd hooks install Install git commit integration hooks

Diagnostics

Command Purpose
bd doctor Check for orphaned issues, convention violations, pollution
bd audit Full audit trail

Multi-agent / Federation

Command Purpose
bd batch Batch operations
bd swarm Multi-agent coordination
bd federation Cross-repository federation

Claude Code Hooks (2)

From .claude/settings.json:

Hook Event Matcher Action
PreToolUse Bash Block gh watch (interactive)
PreToolUse Bash Block other interactive commands

These are safety hooks for the Beads development repo itself, not part of the general user setup.

Issue Data Model

type BeadIssue struct {
    id           string        // "bd-a1b2" or "bd-a1b2.1" (hierarchical)
    title        string
    description  string
    status       BeadStatus    // open|in_progress|blocked|deferred|closed|pinned|hooked
    priority     int           // 0-4
    issue_type   string        // bug|feature|task|epic|chore
    labels       []string
    assignee     string
    dependencies []Dependency  // relates_to|duplicates|supersedes|replies_to
    // ...
}

Memory Data Model

Memories are stored as key-value entries in the Dolt database, with the slugify key generated from the first ~8 words. Injected at bd prime time.

05

Prompts

Beads (Yegge) — Prompts

bd prime output (verbatim excerpt from source)

The bd prime command outputs AI-optimized workflow context. From cmd/bd/prime.go:

// primeCmd outputs AI-optimized workflow context
Short: "Output AI-optimized workflow context",
Long: `Output essential Beads workflow context in AI-optimized markdown format.

Automatically detects if MCP server is active and adapts output:
- MCP mode: Brief workflow reminders (~50 tokens)
- CLI mode: Full command reference (~1-2k tokens)

Designed for Claude Code, Gemini CLI, and Codex SessionStart hooks to prevent
agents from forgetting bd workflow after context compaction.

The output includes:

  1. Workflow context (from PRIME.md if present, or built-in)
  2. All stored memories (from bd remember calls)

bd remember + prime pattern (verbatim from README)

- Use `bd remember "insight"` for persistent project memory; do not create MEMORY.md files.

Example usage from AGENTS.md:

bd remember "always run tests with -race flag"
bd remember "Dolt phantom DBs hide in three places" --key dolt-phantoms
bd remember "auth module uses JWT not sessions" --key auth-jwt

These are injected by bd prime at every session start.

Landing the Plane Iron Law (verbatim from AGENT_INSTRUCTIONS.md)

## Landing the Plane

**When the user says "let's land the plane"**, you MUST complete ALL steps below.
The plane is NOT landed until `git push` succeeds. NEVER stop before pushing.
NEVER say "ready to push when you are!" - that is a FAILURE.

**CRITICAL RULES:**
- The plane has NOT landed until `git push` completes successfully
- NEVER stop before `git push` - that leaves work stranded locally
- NEVER say "ready to push when you are!" - YOU must push, not the user

Prompting technique: Absolute iron law with explicit failure condition. The phrase "that is a FAILURE" is a strong directive that prevents the common agent behavior of stopping just before the final push.

Minimal AGENTS.md Snippet (verbatim from README)

This project uses bd (beads) for issue tracking.

- Run `bd prime` for workflow context and command guidance.
- Use `bd ready`, `bd show <id>`, `bd update <id> --claim`, and `bd close <id>`.
- Use `bd remember "insight"` for persistent project memory; do not create MEMORY.md files.
- Do not use markdown TODO lists for task tracking.

Prompting technique: Explicit anti-pattern prohibition ("do not create MEMORY.md files", "do not use markdown TODO lists"). Negative instructions are as important as positive ones for preventing agent drift.

09

Uniqueness

Beads (Yegge) — Uniqueness

Differs From Seeds

Beads has no close analog in the 11 seeds. The closest is taskmaster-ai (seed), which also uses a structured task store (JSON) with dependency tracking. But Beads goes much further: Dolt (version-controlled SQL with cell-level merge and remote sync) vs taskmaster's flat JSON file; hierarchical IDs with dependency graphs vs taskmaster's numeric ID + flat dependencies; multi-agent atomic claiming (bd update --claim) vs taskmaster's sequential single-agent model; explicit compaction with graceful decay vs taskmaster's unlimited growth. Beads also resembles ccmemory (seed) in storing memories in a persistent external store accessible across sessions, but ccmemory focuses on episodic memory (decisions, corrections) while Beads focuses on work-to-do (task graph).

Distinctive Features

  1. Dolt as storage engine: The only framework in this corpus that uses a version-controlled SQL database as the state store. This enables branching, merging, and distributed sync for issue state.
  2. Task graph with hierarchical IDs: bd-a3f8.1.2 format supports epic/task/subtask without a separate concept; dependency edges are first-class.
  3. Graceful decay compaction: Explicit tiered compaction (30 days/70%, 90 days/95%) with agent-driven or AI-driven summarization. Issues permanently reduced — not archived.
  4. Multi-agent atomic claiming: bd update --claim is an atomic operation preventing race conditions in multi-agent scenarios.
  5. bd prime + bd remember: The combination of workflow context injection and free-text memory storage is the simplest possible session-handoff mechanism — one command, no hooks required.
  6. "Landing the plane" protocol: The explicit "the plane is not landed until git push succeeds" iron law in AGENT_INSTRUCTIONS.md is one of the most detailed agent workflow contracts in this batch.
  7. Cross-tool by design: bd setup supports Claude Code, Codex, Cursor, Factory.ai, Warp, Mux, and more — widest agent integration surface outside claude-mem.

Observable Failure Modes

  1. Dolt binary dependency: Beads embeds Dolt; first-run or updates require downloading the Dolt binary, which may fail in restricted environments.
  2. issues.jsonl confusion: Many users mistake .beads/issues.jsonl for a backup; it is only an export and does not capture full Dolt state.
  3. No automatic session injection: Unlike claude-mem or ccmemory, there is no SessionStart hook that automatically runs bd prime. The agent must be instructed to run it.
  4. Complex setup for contributors: bd init --contributor mode routes to ~/.beads-planning — multi-repo setup can confuse agents.
  5. Compaction is permanent: "Graceful decay" cannot be reversed — if summaries are poor quality, original content is gone.
04

Workflow

Beads (Yegge) — Workflow

Agent Workflow (from AGENTS.md / README)

# 1. Check for ready work
bd ready --json

# 2. Claim an issue
bd update bd-42 --claim --json

# 3. Do work...

# 4. Update status / close
bd update bd-42 --status in_progress --json
bd close bd-42 "Completed" --json

# 5. End of session: Land the plane
git pull --rebase
git push
# MANDATORY — work is not complete until git push

Task Graph Model

Issues have hierarchical IDs:

  • bd-a3f8 (Epic)
  • bd-a3f8.1 (Task)
  • bd-a3f8.1.1 (Sub-task)

Dependency edges:

  • relates_to — general relationship
  • duplicates — duplicate of another issue
  • supersedes — replaces another issue
  • replies_to — thread reply (Message type)

Compaction Workflow

# Agent-driven (recommended):
bd compact --analyze --json           # Get candidates with full content
bd compact --apply --id bd-42 --summary summary.txt  # Apply summary

# Legacy AI-powered:
bd compact --auto --all               # Compact all eligible
bd compact --stats                    # Show statistics

Tier 1: 30 days old, 70% reduction Tier 2: 90 days old, 95% reduction This is permanent — original content is discarded.

Landing the Plane Protocol (verbatim from AGENT_INSTRUCTIONS.md)

When the user says "let's land the plane", you MUST complete ALL steps below.
The plane is NOT landed until git push succeeds. NEVER stop before pushing.
NEVER say "ready to push when you are!" - that is a FAILURE.

1. File beads issues for any remaining work
2. Ensure all quality gates pass
3. Update beads issues - close finished work
4. PUSH TO REMOTE - NON-NEGOTIABLE
5. Clean up git state
6. Verify clean state
7. Choose a follow-up issue for next session

Phase + Artifacts

Phase Artifact
Session start bd prime output injected to agent context
Work discovery bd ready --json → available tasks
Issue creation Issue rows in Dolt DB
Session end Closed issues + git push + optional bd compact
Memory creation bd remember "insight" → kv entry in Dolt
06

Memory Context

Beads (Yegge) — Memory & Context

Memory Type

hybrid — Dolt (version-controlled SQL, which is effectively SQLite-compatible) for both issues and memories. Two memory primitives:

  1. Issues: task graph with dependency edges, hierarchical IDs, status history
  2. Memories: free-text KV entries stored via bd remember, slugified key, injected at bd prime

Persistence Scope

project.beads/ directory in project root. Cross-machine via Dolt remotes.

State Files

Path Content Source of Truth
.beads/embeddeddolt/ Embedded Dolt database (issues, memories) Yes
.beads/issues.jsonl Export for viewers/interchange No (not backup)
~/.config/beads/PRIME.md Custom bd prime output override Optional

Critical: .beads/issues.jsonl is NOT a full backup. It is only an export. Use bd backup for actual backup.

Search Mechanism

full-text + graph — Dolt provides SQL query capabilities. bd list, bd search, graph traversal via bd dep and bd show for dependency exploration.

Compaction Strategy

Explicit and principled — "graceful decay":

Tier 1: 30 days closed, 70% semantic compression
Tier 2: 90 days closed, 95% ultra compression

Agent-driven workflow:

  1. bd compact --analyze --json — export candidates with full content
  2. Agent generates summary
  3. bd compact --apply --id bd-42 --summary file.txt — apply summary

This is the most explicit and deliberate compaction strategy in this batch. It requires active participation (either by agent or by AI API call in legacy mode).

Cross-Session Handoffs

Yes — via two mechanisms:

  1. bd prime at session start injects workflow context + memories
  2. The Dolt database itself persists all issue state

Designed for cross-machine, cross-developer, cross-agent handoffs via Dolt remotes.

Memory Injection Mechanism

From prime.go: bd prime outputs AI-optimized markdown. For MCP mode (~50 tokens), CLI mode (~1-2k tokens). Adapts to context by detecting if MCP server is active. Memories from bd remember are included in all prime outputs.

Linear / ADO / Jira Integration

Beads can sync with Linear, Azure DevOps, Jira as "upstream" sources. These become read-through views into the Dolt store.

07

Orchestration

Beads (Yegge) — Orchestration

Multi-Agent

Yes — explicitly designed for multi-agent use. bd update --claim is an atomic claim operation that prevents multiple agents from taking the same task.

Orchestration Pattern

task-decomposition-tree — issues have hierarchical IDs (epic → task → sub-task) and dependency edges (blocks, relates_to, supersedes). Agents query bd ready --json for work with no open blockers.

Isolation

git-branch — each contributor/agent can work on separate branches; Dolt's cell-level merge resolves conflicts. Hash-based IDs (bd-a1b2) prevent collision even across branches.

Multi-Model

No explicit model routing.

Execution Mode

interactive-loop — agents call bd commands via Bash. The bd setup claude installs Claude Code hooks primarily for safety (blocking interactive commands), not lifecycle management.

Stealth Mode

bd init --stealth disables git operations — useful for personal tracking on shared projects without affecting the repo.

Contributor Mode

bd init --contributor routes planning issues to a separate repo (~/.beads-planning) to keep experimental work out of PRs.

Federation

Cross-repository federation is supported for large organizations (see cmd/bd/federation.go).

Consensus Mechanism

none formal protocol. Coordination happens through Dolt's version control primitives (branching, merging, cell-level conflict resolution) rather than consensus algorithms.

08

Ui Cli Surface

Beads (Yegge) — UI & CLI Surface

Dedicated CLI Binary

bd — the primary interface. ~80+ command files (Go), installed via brew/npm/install script.

Key subcommands: init, setup, prime, ready, create, update, close, show, list, dep, compact, remember, dolt, backup, export, doctor, audit, hooks, onboard, search, batch, swarm, federation, and many more.

Not a thin wrapper: bd is its own complete application, not a wrapper over any AI CLI.

Local Web Dashboard

Not in the core beads repo. Community tools exist (BeadsViewer, see next framework).

IDE Integration

bd setup <agent> installs agent-specific integration files:

  • bd setup claude.claude/settings.json hooks + CLAUDE.md
  • bd setup codex → AGENTS.md update
  • bd setup cursor → Cursor rules
  • bd setup factory → AGENTS.md for Factory.ai Droid
  • bd setup mux → mux integration
  • Use bd setup --list to see all supported integrations

Observability

  • bd audit — full audit trail
  • bd doctor — health check (orphaned issues, convention violations, pollution detection)
  • bd show <id> — issue detail with full audit trail
  • .beads/issues.jsonl — human-readable export for external tools

MCP Server

Beads ships a MCP server mode. When detected in bd prime, it adapts to brief output (~50 tokens vs ~1-2k for CLI mode). Claude Code can integrate via the MCP protocol.

Community Tools (BeadsViewer)

The gastownhall/beadsviewer GitHub organization hosts community tools. jeremyconkin/BeadsViewer is a local Next.js web app (port 3000) that reads issues via bd CLI (bd list --json, bd show, bd update) and renders a kanban + tree view.

Related frameworks

same archetype · same primary tool · same memory type

MemPalace ★ 53k

Verbatim local-first AI memory with 96.6% R@5 retrieval on LongMemEval using zero API calls — structured into a palace hierarchy…

deepagents (LangChain) ★ 23k

Opinionated Python agent harness on top of LangGraph with sub-agents, filesystem, memory, and context compaction bundled in

agentmemory ★ 18k

Persistent, searchable memory for AI coding agents that captures every tool interaction, compresses it via LLM, and injects…

Open Multi-Agent ★ 6.3k

Give a natural-language goal to a coordinator agent and get a dynamically decomposed, parallelized task DAG executed by…

Basic Memory ★ 3.1k

Gives AI agents a persistent, human-readable knowledge graph of project decisions, observations, and relations stored as plain…

Claude-Supermemory ★ 2.6k

Gives Claude Code team-level persistent memory via a cloud API, sharing project knowledge across developers and sessions without…