OpenClaw TraceBridge is a Python-first bridge that turns OpenClaw runtime traces into reproducible datasets for offline evaluation and training-oriented workflows.
Most agent-training stacks are strong on algorithms, but weak on runtime-native data plumbing. TraceBridge focuses on that missing layer:
- Normalize OpenClaw session traces (
tracebridge.event.v1) - Export training-friendly formats (
messages/triplets) - Support deterministic replay/eval (
replay-split,replay-manifest)
- ✅ Import profiles:
lean,bridge,debug - ✅ Agent-Lightning-oriented export:
messages,triplets - ✅ Consumer smoke checks
- ✅ Deterministic replay split + manifest
- ✅ Runtime hook smoke (in-memory tracer/store path)
- ✅ Phase-1 shadow cycle automation (offline)
This is still preliminary. We are validating workflow reliability first, then effectiveness claims.
uv run --python 3.13 --group dev openclaw-tracebridge --help
# 1) import a session
uv run --python 3.13 --group dev openclaw-tracebridge import-openclaw-session \
--session-jsonl ~/.openclaw/agents/main/sessions/<session>.jsonl \
--out traces/<run>/events.jsonl \
--run-id <run> \
--profile bridge
# 2) export messages dataset
uv run --python 3.13 --group dev openclaw-tracebridge export-agent-lightning \
--events traces/<run>/events.jsonl \
--out traces/<run>/messages.jsonl \
--format messages
# 3) deterministic replay split
uv run --python 3.13 --group dev openclaw-tracebridge replay-split \
--input traces/<run>/messages.jsonl \
--out-a traces/<run>/train.jsonl \
--out-b traces/<run>/val.jsonl \
--seed 42 --split-ratio 0.9# end-to-end bridge smoke
bash scripts/smoke_end_to_end_lightning.sh
# optimization-loop shadow smoke
bash scripts/run_real_optimization_loop_smoke.sh
# phase-1 shadow cycle
bash scripts/run_phase1_shadow_cycle.shdocs/INDEX.md— entry pointdocs/PHASE_A_V0_SPEC.mddocs/AGENT_LIGHTNING_BRIDGE_SPEC.mddocs/REPLAY_CONTRACT_V0.mddocs/AGENT_LIGHTNING_CONSUMER_SMOKE.mddocs/REAL_OPTIMIZATION_LOOP.mddocs/PHASED_ADOPTION_PLAN.mddocs/PUBLIC_CHECKLIST_2026-02-09.md
Dogfood reports are under docs/DOGFOOD_*.md.
- Keep production runtime changes minimal
- Keep defaults token-lean
- Keep eval/training reproducible and auditable
- Prefer fail-open safety for production paths
MIT