opentraces
Open schema + CLI for capturing agent traces into a private bucket, searching and slicing them locally, and publishing workflow-projected dataset rows to Hugging Face Hub.
opentraces has four separate surfaces:
- Trace workflow: capture agent sessions into a portable bucket, then use Trace Discovery, Trace Trails, and Context Tree to inspect the retained environment.
- Dataset workflows: skill-format row builders that use trace discovery, context, and trail evidence to project purposeful rows.
- Datasets: local HuggingFace-shaped row stores that can be reviewed, scheduled, and published.
- Clients: evaluation jobs, training loops, dashboards, context warmup, and manual trace-capsule patterns that consume either rows or bucket evidence.
Trace Workflow
opentraces setup # install capture hooks and optional integrations
opentraces init # enroll a repo explicitly (optional under global tracking)
opentraces init --agent pi # enroll Pi explicitly (optional; auto under global tracking)
opentraces bucket status # inspect private retained trace evidence
opentraces trace query --since 7d # search retained traces
opentraces trace skills --json # rank observed skills by usage
opentraces trace map <trace-id> --bursts # deterministic edit/intent map
opentraces trace get <trace-id> --run-intel # resteer/recovery/loop signals
opentraces trace slice <trace-id> --template bursts
opentraces trail blame commit <sha> # which traces contributed to a commit
opentraces ctx tree <trace-id> # what the agent saw across the trace
opentraces workflow templates # choose a row projection template
opentraces dataset new my-dataset --workflow my-workflow
opentraces dataset run my-dataset # synthesize dataset rows from retained traces
opentraces dataset new skill-episodes --from-skill opentraces
opentraces dataset run skill-episodes --executor script --json
opentraces dataset review approve my-dataset --all
opentraces dataset publish my-dataset # upload reviewed rows to the active remote
init writes the committable project marker at .opentraces.json. Captured
traces, bucket state, and upload bookkeeping stay machine-local under
~/.opentraces/. Global tracking (the default) auto-enrolls every agent,
including Pi, the first time a capture hook or the Pi extension fires in a repo,
private + review-required. Capture is opt-out: opentraces config tracking-mode manual or a per-project excluded marker turns it off.
What You Get
For individual developers. A private trace bucket, deterministic local search, and dataset publishing only when you choose to project and approve rows.
For teams. Shared bucket remotes for retained evidence, per-dataset HuggingFace remotes for curated rows, and reproducible workflow templates.
For dataset consumers. Schema-valid row streams for training, evaluation, teacher/student reinforcement learning, analytics, and attribution.
Start Here
| Section | What's inside |
|---|---|
| Installation | Install, verify, upgrade, uninstall |
| Authentication | OAuth, PATs, HF_TOKEN, auth precedence |
| Quick Start | Capture into a bucket, search traces, build and publish a dataset |
| Commands | Current opentraces command reference |
| Portable Bucket | Raw trace envelopes, companions, manifests, sync, replay |
| Trace Discovery | trace query, trace skills, trace map, trace slice, trace get, trace index, plus --waste / --run-intel and trace compare |
| Trace Trails | Git anchors, survival states, blame, graph, PR body generation |
| Context Tree | ctx commands and OTLP capture for what the agent saw |
| Dataset Workflows | Build deterministic row projections from bucket traces |
| Dataset Rows | Local HF-shaped datasets, review states, remotes, schedules |
| Publish | Publication gates, shards, visibility, bucket-vs-dataset split |
| Security Tools | Optional default-off security/privacy tool registry |
| Schema | TraceRecord and schema 0.7.0 field semantics |
| Clients | How consumers use rows or bucket evidence |
| Agent Workflows | Context warmup and progressive session-history discovery |
| Trace Capsule | Share a single trace as a reproducible capsule; use opentraces capsule for the full CLI surface |