tx

Primitives

Composable building blocks for agent infrastructure

Overview

tx provides a set of CLI primitives for managing tasks, dependencies, learnings, and synchronization. These primitives are the building blocks for any agent orchestration pattern.

Philosophy

tx is about primitives, not frameworks. We don't dictate how you orchestrate your agents. Instead, we provide headless infrastructure that you compose however you need.

┌─────────────────────────────────────────────────────┐
│  Your Orchestration (your code, your rules)         │
├─────────────────────────────────────────────────────┤
│  tx primitives                                      │
│                                                     │
│   tx ready     tx done      tx context    tx learn  │
│   tx claim     tx block     tx sync       tx trace  │
│                                                     │
└─────────────────────────────────────────────────────┘

Core Primitives

PrimitivePurposeStatus
tx readyGet next workable task (unblocked, highest priority)Available
tx doneComplete task, potentially unblocking othersAvailable
tx blockDeclare dependencies between tasksAvailable
tx claimClaim task with lease to prevent parallel collisionsAvailable
tx contextGet relevant learnings for prompt injectionAvailable
tx learning:*Record and search knowledgeAvailable
tx syncPersist to git-friendly JSONLAvailable
tx try / tx attemptsRecord and track implementation attemptsAvailable
tx doc *Docs-as-primitives with YAML structured documentationAvailable
tx invariant *Machine-checkable system rules with enforcement trackingAvailable
tx trace *Execution tracing and run observabilityAvailable

Example Orchestration Patterns

We ship example patterns, not a required workflow:

Simple: One Agent, One Task

while task=$(tx ready --limit 1 --json | jq -r '.[0].id'); do
  claude "Work on task $task, then run: tx done $task"
done

Parallel: N Agents Pulling from Queue

for i in {1..5}; do
  (while task=$(tx ready --limit 1 --json | jq -r '.[0].id'); do
    claude "Complete $task" && tx done $task
  done) &
done
wait

Human-in-Loop: Agent Proposes, Human Approves

task=$(tx ready --limit 1 --json | jq -r '.[0].id')
claude "Plan implementation for $task" > plan.md
read -p "Approve? [y/n] " && claude "Execute plan.md"
tx done $task

Global Options

All primitives support these global options:

OptionDescription
--jsonOutput as JSON for scripting
--db <path>Custom database path (default: .tx/tasks.db)
--helpShow command help

Task Lifecycle

backlog → ready → planning → active → blocked → review → human_needs_to_review → done

A task is ready when:

  1. Its status is workable (backlog, ready, planning, active, blocked, or review)
  2. All tasks blocking it have status done

On this page