Work board for agent coordination.
A structured task tracker where work items flow through a lifecycle. Agents poll for work matching their role, claim it, and advance it through states. Dependencies between items handle ordering.
Work item lifecycle
new → ready → claimed → in_progress → done
→ failed
↑
blocked (unmet dependency)
cancelledUsage from IEx
import AgentWorkshop.Workshop
# Add work
work(:cache, "Implement LRU cache",
type: :code, spec: "LRU with 1000 entries and TTL")
work(:cache_review, "Review cache implementation",
type: :review, depends_on: [:cache])
work(:cache_tests, "Write cache tests",
type: :test, depends_on: [:cache])
# Browse
board() # full board
board(status: :ready) # items ready to pick up
board(type: :code) # only code tasks
# Work on items
claim(:cache, :impl) # agent claims the task
start_work(:cache) # mark in progress
complete(:cache) # mark done, unblocks dependents
fail(:cache, "tests broke")Agent polling
Agents check the board for work matching their type:
every(:coder, "Check board(type: :code, status: :ready) and work on one item",
interval: :timer.minutes(2))
Summary
Functions
Add a work item to the board.
Cancel a work item.
Claim a work item for an agent.
Clear all work items.
Mark a work item as done. Unblocks dependents.
Mark a work item as failed.
Get a work item by ID.
List work items, optionally filtered.
Remove a work item from the board entirely.
Mark a work item as in progress.
Summary counts by status.
Types
@type t() :: %AgentWorkshop.Work{ claimed_at: DateTime.t() | nil, claimed_by: atom() | nil, completed_at: DateTime.t() | nil, created_at: DateTime.t(), depends_on: [atom()], error: String.t() | nil, id: atom(), metadata: map(), priority: non_neg_integer(), result: String.t() | nil, spec: String.t() | nil, started_at: DateTime.t() | nil, status: atom(), title: String.t(), type: atom() }
Functions
Add a work item to the board.
Cancel a work item.
Claim a work item for an agent.
Uses atomic ETS take-and-reinsert to prevent race conditions when multiple board workers poll simultaneously.
@spec clear() :: :ok
Clear all work items.
Mark a work item as done. Unblocks dependents.
Mark a work item as failed.
Get a work item by ID.
List work items, optionally filtered.
@spec remove(atom()) :: :ok
Remove a work item from the board entirely.
Mark a work item as in progress.
@spec summary() :: map()
Summary counts by status.