open traces   v0.3.3

Open data is the new open source.

When LLMs drive the logic, traces become the real source: the record of decisions, tool calls, and reasoning behind the outcome.

opentraces lets you parse, sanitise, review, and push those sessions to HuggingFace Hub so you or others can build on real workflows, not synthetic benchmarks.

$pipx install opentraces[cp]
setupinitstatusreviewblamepushconsume
~/my-project$ opentraces init
opentraces initagentclaude-codedetectedpolicyreview every traceinbox gatedhf loginalice-devremotejayfarei/opentracesprivateimport42 traces✓ importedInitialized
Created .opentraces.json Installed claude-code hook

features ────────────────────────────────

git for traces

init, status, review, push. The workflow you know, applied to agent sessions.

security pipeline

Regex + entropy + optional TruffleHog and LLM review. Stable placeholders like [EMAIL_1] keep traces coherent.

auto or review

Per-project policy: auto-approve safe traces, or gate every session through the TUI or browser inbox.

blame and graph

Every shipped line back to the prompt behind it. ot blame and ot graph map commits to their agent sessions.

schema depth

Steps, tool calls, reasoning, sub-agents, tokens, attribution, outcome in one record.

huggingface native

Sharded JSONL on HF Hub. Load via datasets.load_dataset() or mount it as a virtual filesystem. No lock-in.

quality scoring

Five persona rubrics score every trace. Upload gates enforce minimums. Re-score remotely with ot assess.

content-hash dedup

Reset state, switch machines, re-push safely. murmur3 hashing blocks duplicates on the remote.

agent-native cli

Every command emits structured JSON with next_steps. Built for agents to drive agents.

privacy & trust ─────────────────────────

Every trace scrubbed before it leaves your machine.

Layered scanning: 30+ regex patterns, Shannon entropy, optional TruffleHog (800+ detectors, opt-in), and optional local LLM review. Stable placeholders like [EMAIL_1] preserve referential meaning across a trace.

step 1regex
step 2entropy
step 3trufflehog
step 4llm review
redaction preview
API key
sk-proj-abc123def456ghi789...[API_KEY_1]
email
jay@company.internal[EMAIL_1]
DB URL
postgresql://admin:pass@db.internal:5432/prod[DB_URL_1]
path
/Users/jayfarei/src/client-project//Users/user/src/client-project/
Two ways to push traces to a dataset, configured per-project.
Traces land in your local inbox. Review in the TUI or browser, then stage and push the ones you want to share.
review policy
~$ ot init review policy: review (default) installed agent session hook~$ ot statusinbox: 8 traces pending review stage / redact / reject each trace~$ ot add --allstaged 6 traces~$ ot pushauto-redacted 3 secrets jayfarei/opentraces uploaded 6 staged traces →

attribution ─────────────────────────────

Who wrote this line of code?

When agents write most of the code, git blame points at a user, not a session id. ot blame and ot graph resolve every commit back to the traces that produced it — so you can see what worked and what didn't across your agent sessions.

Attribution search can surface as a semantic diff — added functions, modified classes, renamed files — so agents can pull up the session behind any change in a fraction of the tokens a line-level view would cost.

graphopentraces graph --limit 4
┊╭┄s:5baac494~1push
c:6899f64cfix(publish): report failed loads100%
├╯
┊╭┄s:fa2fe980+14 ~4 -1 1fns
┊├┄s:be59b9f8+7 ~10fnsstate, test_resume
┊├┄s:0e7c776c+10 ~5fnsresume, parse
c:83d26672feat(capture): resume sessions100%
├╯
┊╭┄s:6606fc1f+8 ~12 -2fnsserver, graph_api
┊├┄s:fe8fe3fd+6 ~1fnsPushModal
c:ac019172feat(viewer): hover actions100%
├╯
┊╭┄s:6606fc1f~2
c:92c23cccRefine trace map35%
├╯
blameopentraces blame ac019172
commitac019172feat(viewer): hover actions, two-stage push
94 diff lines · 3 traces · 5 files
s:6606fc1fclaude-code·45/9448%
+Addedserver, graph_api, api
~Modified__file_patterns__, PushSelected
s:fe8fe3fdclaude-code·30/9432%
+AddedPushModal, PushModal.onOpen
s:5baac494claude-code·19/9420%
+AddedReviewView, TraceSecurityModal
──── 94/94 · 100% attributed ────
files:
components/review/PushModal.tsx45L(12× edits)
components/modals/TraceSecurityModal.tsx21L(6× edits)
lib/conversation.ts15L(4× edits)
App.tsx8L(2× edits)
components/review/ReviewView.tsx5L(1× edits)

how it works ────────────────────────────

agent harness
dev-time agents
Claude Code
Codex
Cursor
OpenCode
run-time agents
Hermes
NemoClaw
OpenClaw
DeepAgents
Local traces / Session Hook
opentraces
initcaptureparseenrichsanitise
push mode
auto
capture, redact, auto-stage safe traces
review
human inbox, stage, push (default)
JSONL shards, private or public
Hugging Face Hub
training / sft

Fine-tune on real workflows

Alternating role sequences, tool call/observation pairing, reasoning coverage. Validated against 10 quality checks before upload.

rl / rlhf

Reward from outcomes

Committed patches as reward proxies, per-step token costs for cost-penalized reward, sub-agent hierarchy for credit assignment.

analytics / eval

Observability and ground truth

Cache hit rates, per-step token breakdowns, duration timelines, model distribution. Real production inputs with outcome signals become reproducible eval datasets for quality gating — no annotation queue required.

domain sourcing

Filter by ecosystem

Language tags, extracted dependencies, VCS context, code snippets with language annotations. Build domain-specific datasets from HF queries.

schema ──────────────────────────────────

TraceRecord

One session, one JSONL line. Full schema docs

{
  "schema_version": "0.3.0",
  "trace_id": "uuid",
  "execution_context": "devtime",
  "task": { "description": "Fix the failing test...", "repository": "owner/repo" },
  "agent": { "name": "claude-code", "model": "anthropic/claude-sonnet-4" },
  "steps": [                                    // TAO loop
    { "role": "user", "content": "..." },
    { "role": "agent", "tool_calls": [...], "reasoning_content": "..." }
  ],
  "outcome": { "success": true, "committed": true, "patch": "...", "terminal_state": null, "reward": null, "reward_source": null },
  "attribution": { "files": [{ "path": "src/parser.ts", "ranges": [...] }] },
  "metrics": { "total_steps": 42, "estimated_cost_usd": 2.40 },
  "security": { "scanned": true },
  "dependencies": ["react", "typescript"]
}

get started ─────────────────────────────

Start pushing traces in 60 seconds.

Open data is the new open source. Your agent traces are the most valuable dataset nobody is collecting. Start contributing to the commons.

$ from your terminal
pipx install opentraces
install the CLI
opentraces setup && opentraces init
ensure the global install, then initialize an inbox in this project
opentraces web
review in the browser, stage what's safe to share
opentraces push
upload staged traces to your HuggingFace dataset
> from your agent
set up opentraces for this project
installs, authenticates, connects a dataset, and installs the hook
open my opentraces inbox and review my traces
review in the browser or TUI, then stage or reject traces
ensure $CLIENT is redacted and stage the safe traces
agent checks redactions against your criteria before upload
push my staged traces to HuggingFace
uploads the staged traces to your private dataset