with one click
events
How to use the event queue CLI
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
How to use the event queue CLI
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
How to create agents that work with the agent-runner
Design and create a town — a group of agents that work together.
Multi-agent orchestration over a shared SQLite event queue.
Collide two random notes into new ideas using oblique-strategy thinking. Generates 3 new ideas in the idea-collider/ folder.
Capture text into the note garden pipeline. Paste a transcript or idea and it flows through the zettelkasten pipeline.
Summarize recent activity in the note garden by reading breadcrumbs
| name | events |
| description | How to use the event queue CLI |
A SQLite-backed event queue for inter-worker communication. Workers can push events and poll for new events using cursor-based pagination. Each worker maintains its own cursor position, enabling reliable at-least-once delivery.
Push an event to the queue.
busytown events push --worker <id> --type <type> [--payload <json>]
--type is required--payload is optional JSON (defaults to {}){ id } on successExample:
busytown events push --worker agent-1 --type task.created --payload '{"name":"foo"}'
# Output: {"id":1}
Poll for new events and stream ndjson to stdout.
busytown events watch --worker <id> [--poll <seconds>] [--omit_worker <id>]
Example:
busytown events watch --worker agent-1 --poll 2
# Output (streaming):
# {"id":1,"timestamp":1234567890,"type":"task.created","worker_id":"agent-2","payload":{"name":"foo"}}
# {"id":2,"timestamp":1234567891,"type":"task.done","worker_id":"agent-2","payload":{}}
Get the current cursor position for a worker.
busytown events cursor --worker <id>
Example:
busytown events cursor --worker agent-1
# Output: {"worker_id":"agent-1","since":5}
Fetch events after a given ID. Outputs ndjson (one event per line).
busytown events list [--since <id>] [--tail <n>] [--limit <n>] [--omit-worker <id>] [--worker <id>] [--type <type>]
--since <id> — event ID to start after (forward scan, ascending; default:
0)--tail <n> — show the last n events (output ascending)--limit <n> — maximum number of events for forward scan (default: 100)--worker <id> — only show events from this worker--omit-worker <id> — exclude events from this worker--type <type> — only show events of this type (* = all, default: *)Example:
busytown events list --since 0 --limit 10
# Output (one event per line):
# {"id":1,"timestamp":1234567890,"type":"task.created","worker_id":"agent-1","payload":{}}
# {"id":2,"timestamp":1234567891,"type":"task.done","worker_id":"agent-1","payload":{}}
# Filter to a specific worker:
busytown events list --since 0 --worker agent-1
# Filter by event type:
busytown events list --since 0 --type task.created
# Show the last 5 events:
busytown events list --tail 5
Manually set the cursor position for a worker.
busytown events set-cursor --worker <id> --set <event_id>
Example:
busytown events set-cursor --worker agent-1 --set 10
# Output: {"worker_id":"agent-1","since":10}
Claim an event (first-claim-wins). Claiming lets workers coordinate over who should claim an event.
busytown events claim --worker <id> --event <id>
{"claimed":true} on success{"claimed":false,"claimant":"<worker_id>"} if already claimedExample:
busytown events claim --worker agent-1 --event 5
# Output: {"claimed":true}
busytown events claim --worker agent-2 --event 5
# Output: {"claimed":false,"claimant":"agent-1"}
Check the claim status of an event.
busytown events check-claim --event <id>
Example:
busytown events check-claim --event 5
# Output: {"event_id":5,"worker_id":"agent-1","claimed_at":1234567890}
busytown events check-claim --event 99
# Output: {"event_id":99,"claimed":false}
| Option | Description |
|---|---|
--db <path> | Database path (default: events.db) |
--help | Show help message |
Push an event and watch for responses:
# Terminal 1: Watch for events
busytown events watch --worker consumer --omit_worker consumer
# Terminal 2: Push events
busytown events push --worker producer --type ping --payload '{"msg":"hello"}'
Read all events from the beginning:
busytown events list --since 0
Reset a worker's cursor to replay events:
busytown events set-cursor --worker agent-1 --set 0