How uw-syfi/tracelab works
TraceLab collects and sanitizes Claude/Codex session traces, materializes them for reproducible workload analysis, and offers browser-based exploration and trace contribution. A separate Rust replay tool turns session traces into synthetic inference workloads. The graph follows documented pipeline stages and sampled call/reference evidence; unsampled experiment internals and some web wiring are represented only at the documented subsystem level.
Main entry points: trace_db.py Trace database · session.rs Session replay · cli.rs Replay CLI · collect_llm_traces.py Trace collection
Components 31
Trace preparation
- Trace collection
scripts/collect_llm_traces.py - Claude extraction
scripts/extract_claude_rounds.py - Codex extraction
scripts/extract_codex_rounds.py - Trace sanitization
scripts/sanitize_round_trace.py - Privacy safeguards
scripts/trace_privacy.py
Trace analysis
- Trace database
artifacts/utils/trace_db.py - Workload experiments
artifacts/llm_generation - Prefix-cache analysis
artifacts/prefix_cache - Tool-call analysis
artifacts/tool_calls - Human-loop analysis
artifacts/human_in_the_loop - Session analysis
artifacts/session - Trace facts
artifacts/trace_facts - Web analytics data
artifacts/web_analytics/rounds.py - Trace validators
validators
Browser explorer
- Trace ingest
web/payload/ingest.py - Ingest interface
web/app/src/lib/ingestUi.ts - Worker protocol
web/app/src/lib/worker/protocol.ts - Browser analysis worker
web/app/src/lib/worker/analyze.worker.ts - Ask-the-trace client
web/app/src/lib/ai/askClient.ts
Web services
- Ask-the-trace service
web/ai_infra/app.py - LLM runtime
web/ai_infra/syfi_llm_runtime.py - Contribution API
web/server/app.py - Contribution storage
web/server/store.py
Workload replay
- Replay CLI
replay/src/cli.rs - Replay trace loader
replay/src/trace.rs - Synthetic tokens
replay/src/tokens.rs - Session replay
replay/src/session.rs - Generation backend
replay/src/backend.rs - Step logging
replay/src/record.rs
Other components
- Trace owner
- Browser user
Connections 31
- Trace owner → Trace collection: collects traces
README.md - Trace collection → Claude extraction: extracts rounds
README.md - Trace collection → Codex extraction: extracts rounds
README.md - Trace owner → Trace sanitization: sanitizes trace
README.md - Trace sanitization → Privacy safeguards: applies safeguards
README.md - Trace sanitization → Trace database: materializes trace
README.md - Trace database → Workload experiments: feeds analysis
README.md - Trace database → Prefix-cache analysis: feeds analysis
README.md - Trace database → Tool-call analysis: feeds analysis
README.md - Trace database → Human-loop analysis: feeds analysis
README.md - Trace database → Session analysis: feeds analysis
README.md - Trace database → Trace facts: feeds analysis
README.md - Trace database → Web analytics data: queries database
artifacts/web_analytics/analyze.py - Web analytics data → Trace validators: supports audits
- Trace owner → Browser user: explores traces
- Browser user → Trace ingest: drops trace
README.md - Trace ingest → Ingest interface: returns ingest results
web/app/src/lib/ingestUi.ts - Ingest interface → Browser analysis worker: starts analysis
- Browser analysis worker → Worker protocol: exchanges messages
web/app/src/lib/worker/analyze.worker.ts - Browser user → Ask-the-trace client: asks trace questions
README.md - Ask-the-trace client → Worker protocol: uses protocol
web/app/src/lib/ai/askClient.ts - Ask-the-trace client → Ask-the-trace service: sends chat requests
README.md - Ask-the-trace service → LLM runtime: runs chat turns
web/ai_infra/app.py - Browser user → Contribution API: contributes trace
README.md - Contribution API → Contribution storage: stores contributions
web/server/app.py - Replay CLI → Replay trace loader: loads session trace
replay/src/main.rs - Replay CLI → Synthetic tokens: builds token pool
replay/src/main.rs - Replay CLI → Session replay: runs sessions
replay/src/main.rs - Session replay → Synthetic tokens: builds prompts
replay/src/session.rs - Session replay → Generation backend: sends inference
replay/src/session.rs - Session replay → Step logging: emits step logs
replay/src/session.rs