Agent work queue
A dependency-aware issue queue for coding agents, in the style of beads: file work, link what waits on what, claim what is ready, close it.
- Graph ID
- beads
- Sample data
- Larkspur, a fictional note-taking app · 26 nodes, 22 edges
- Schema
- 3 node types · 8 edge types
- Stored queries
- 35 reads · 26 writes
- Updated
- Nov 17, 2026
[Ontology]
Drag types to rearrange · pinch or ⌘-scroll to zoom
All 3 types as a list
Issue22 in sample
A unit of work (a bead). Identity is the slug, e.g. ob-k3x9qa.
slug · title · description · design · acceptance · notes · kind · status · priority · labels · assignee · created_by · created_at · updated_at · started_at · closed_at · close_reason · defer_until · due_at · lease_expires_at · external_ref · metadata · embedding
BlockedBy → Issue · ChildOf → Issue · RelatesTo → Issue · DiscoveredFrom → Issue · Duplicates → Issue · Supersedes → Issue
Comment2 in sample
A comment on one issue.
slug · body · author · created_at
CommentOn → Issue
Memory2 in sample
A durable project insight that `ob prime` gives every new agent session.
slug · body · created_by · updated_at · embedding
MemoryAbout → Issue
[Questions it answers]
Each one is a stored query in the cookbook, written once and run by name from the CLI, the SDKs or an agent.
ready
What can an agent claim now?
Claimable work, highest priority first: open, not deferred, and no open blocker on the issue or any ancestor.
Show the query +Hide the query −
// Readiness is derived, never stored, with beads' rules: an issue is ready
// when it is open, not deferred into the future, no open issue blocks it, and
// no ancestor passes a block down. An ancestor passes one down when it is not
// closed, no closed issue sits between it and the issue, and at least one of
// its open blockers lies outside its own subtree (an epic waiting on its own
// child must not block that child). The parent and the deeper ancestors are
// separate blocks so that only the deeper ones pay for the closed-in-between
// check; the meaning is the single rule over childOf{1,8}.
query ready() @description("Claimable work, highest priority first: open, not deferred, and no open blocker on the issue or any ancestor.") {
match {
$i: Issue { status: "open" }
$i.defer_until is null or $i.defer_until <= now()
not { $i blockedBy $b $b.status != "closed" }
not { $i childOf $a $a.status != "closed" $a blockedBy $c $c.status != "closed"
not { $c childOf{1,8} $a } }
not { $i childOf $p $p.status != "closed" $p childOf{1,7} $a $a.status != "closed"
$a blockedBy $c $c.status != "closed"
not { $c childOf{1,8} $a }
not { $p childOf{1,7} $x $x.status = "closed" $x childOf{1,7} $a } }
}
return { $i.slug, $i.title, $i.kind, $i.priority, $i.assignee, $i.labels, $i.created_at }
order { $i.priority asc, $i.created_at asc, $i.slug asc }
limit 500
}blocked
What is blocked, and by what?
Unfinished issues with an open direct blocker, one row per blocker.
Show the query +Hide the query −
query blocked() @description("Unfinished issues with an open direct blocker, one row per blocker.") {
match {
$i: Issue
$i.status != "closed"
$i blockedBy $b
$b.status != "closed"
}
return { $i.slug, $i.title, $i.status, $i.priority, $b.slug as blocker, $b.status as blocker_status }
order { $i.priority asc, $i.slug asc, $b.slug asc }
limit 10000
}ancestor_blockers
Which blocks does an issue inherit from its parents?
Blocks an issue inherits from its ancestors.
Show the query +Hide the query −
query ancestor_blockers($id: String) @description("Blocks an issue inherits from its ancestors.") {
match {
$i: Issue { slug: $id }
$i childOf{1,8} $a
$a.status != "closed"
$a blockedBy $b
$b.status != "closed"
not { $b childOf{1,8} $a }
not { $i childOf{1,8} $x $x.status = "closed" $x childOf{1,8} $a }
}
return { $a.slug as ancestor, $b.slug as blocker, $b.title, $b.status }
order { $b.slug asc }
limit 500
}downstream
What depends on this issue, directly or not?
What transitively waits on an issue, up to 32 links away.
Show the query +Hide the query −
query downstream($id: String) @description("What transitively waits on an issue, up to 32 links away.") {
match {
$i: Issue { slug: $id }
$d blockedBy{1,32} $i
}
return { $d.slug, $d.title, $d.status, $d.priority }
order { $d.slug asc }
limit 2000
}[61 stored queries]
Reads answer questions; writes are the typed mutations agents and people use to change the graph, each one commit.
queries/issues.gq35 queries+
- readyClaimable work, highest priority first: open, not deferred, and no open blocker on the issue or any ancestor.
- ready_countHow many issues are ready; `ready` itself returns at most 500.
- unblocked_open_countOpen issues with no open blocker on themselves or an ancestor; the rest of the open issues are blocked.
- ready_labeledReady work carrying one label.
- ready_filteredReady work of the given kinds and priorities, optionally with one label and an assignee (or none).
- blockedUnfinished issues with an open direct blocker, one row per blocker.
- blocked_by_ancestorUnfinished issues blocked because an ancestor passes a block down.
- ancestor_blockersBlocks an issue inherits from its ancestors.
- showOne issue with every property except its embedding.
- out_linksEdges leaving an issue: what it depends on, its parent, and annotations.
- in_linksEdges arriving at an issue: what it blocks, its children, and annotations.
- commentsComments on an issue, oldest first.
- listIssues in the given statuses, highest priority first.
- assignedIssues claimed by one actor that are still in progress.
- expired_leasesIn-progress issues whose claim lease has run out.
- childrenDirect children of an issue.
- upstreamWhat an issue transitively waits on, up to 32 links away.
- downstreamWhat transitively waits on an issue, up to 32 links away.
- reachesWhether a BlockedBy path of at most 32 links leads from any of the given issues to another; adding the reverse edge would form a cycle.
- waits_frontierIssues exactly 32 BlockedBy links beyond the given issues.
- waited_frontierIssues exactly 32 BlockedBy links before the given issues.
- searchFull-text search over titles and descriptions.
- similarIssues whose title is semantically closest to the text. Needs embeddings.
- statsIssue counts by status.
- memoriesEvery memory, most recently updated first.
- recallMemories ranked by full-text relevance.
- recall_semanticMemories ranked by meaning. Needs embeddings.
- memories_aboutMemories linked to one issue.
- export_issuesIssues after a slug, in slug order, 1,000 at a time.
- links_fromEvery link leaving the given issues, for export.
- open_blockers_ofOpen blockers of the given issues.
- open_children_ofUnfinished children of the given issues.
- lineageAn issue's ancestors, up to eight levels.
- subtreeAn issue's descendants, up to eight levels, each with its parent.
- waits_amongWhich of the given issues wait directly on any of the targets.
queries/mutations.gq26 queries+
- claimwriteAtomically claim an open issue for an actor. Affects 0 nodes when someone else holds it.
- renewwriteExtend the lease on an issue the actor holds.
- releasewriteGive back an issue the actor holds; it becomes open and unassigned.
- reclaim_expiredwriteReopen every in-progress issue whose lease has run out.
- closewriteClose issues in one commit. Their dependents become ready.
- reopenwriteReopen closed issues, unassigned, so anyone can claim them.
- deferwritePut issues on ice, optionally until a time; a claim on them ends.
- undeferwriteBring deferred issues back to open.
- link_blockswriteThe first issue cannot start until the second is closed.
- link_parentwriteMake the second issue the parent of the first.
- link_relatedwrite
- link_discovered_fromwrite
- link_duplicateswrite
- link_supersedeswrite
- unlink_blockswrite
- unlink_parentwrite
- unlink_relatedwrite
- unlink_discovered_fromwrite
- unlink_duplicateswrite
- unlink_supersedeswrite
- commentwriteAdd a comment to an issue.
- rememberwriteStore or replace a memory under a key.
- remember_aboutwriteStore or replace a memory and link it to an issue.
- forgetwriteDelete a memory.
- editwriteReplace an issue's editable fields if it is unchanged since it was read.
- edit_embeddedwriteAs edit, also replacing the title embedding.
[Run it with your agent]
Paste this into a coding agent. It installs Omnigraph if it has to, creates the graph from this cookbook, loads the sample data and runs the queries above.
- Claude Code
- Codex
- Antigravity
Read https://www.omnigraph.dev/
[More use cases]
[Engineering]
Development graph
Issues, epics, specs, decisions, pull requests, releases and incidents as one graph, with the Git host still the record for code.
22 node types · 92 edge types · 57 queries
[Company]
Company brain
A company's people, projects, claims, decisions and commitments, each tied to the exact words it rests on, shared by its people and agents.
8 node types · 18 edge types · 41 queries
[Hardware]
Hardware program
Requirements, budgets, interfaces and verification for a hardware program, with "verified" and "over budget" worked out from the evidence on every read.
15 node types · 28 edge types · 39 queries