Skip to main content

tracedeck — structured decision logs for AI agents

The debugging fix for "the 200 status code that is completely wrong". Agents don't crash — they confidently execute the wrong plan. The only artifact is a 100k-token context window no human can audit. tracedeck replaces it with a git-like decision log: every decision point is a structured record written to a known directory by convention, replayable, diffable, and convertible into regression tests.

Why

  • Traces alone are unreadable. A single turn is 3-15 LLM calls; a failed run at turn 40 is 80k+ tokens. Structured decision records — decision, rationale, sources, confidence, cost — turn debugging into "check the decision log", not "read the context window".
  • Decision-point diffing barely exists. When you change a prompt or swap a model, you need to know which decision points changed and in what direction — the agent equivalent of a code diff.
  • The eval-debugging loop is the discipline that scales. Every resolved failure becomes a test case; every test case that fails triggers an investigation. failures closes that loop automatically.

Record schema

One JSON object per line, runs/<run_id>.jsonl:

{"run_id": "r1", "step": 3, "decision": "use_get_pipeline_logs",
 "rationale": "deploy failure is in the pipeline, not the image",
 "sources": ["ops/run-4821.log"], "confidence": 0.91, "cost": 0.012,
 "tool_calls": [{"tool": "get_pipeline_run_logs"}], "status": "done",
 "model": "claude-sonnet", "timestamp": "2026-08-15T12:00:00+00:00"}

Required: run_id, step, decision. Optional: everything else.

Usage

./tracedeck init ~/traces

# agents append records (flags or --stdin for JSON)
./tracedeck record ~/traces --run-id r1 --step 1 --decision use_lookup \
    --rationale "well index docs exist" --sources '["pvt/black-oil.md"]' \
    --confidence 0.9 --cost 0.001
echo '{"run_id":"r1","step":2,"decision":"escalate","status":"failed"}' \
    | ./tracedeck record ~/traces --stdin

./tracedeck replay ~/traces r1          # git-log-style rendering
./tracedeck diff ~/traces r1 r2         # decision-point diff (exit 1 if differs)
./tracedeck golden ~/traces r1          # mark known-good run
./tracedeck check ~/traces r2           # regression detection vs golden
./tracedeck failures ~/traces r1        # extract failed steps -> eval test cases
./tracedeck runs ~/traces               # list runs + decision-point counts

diff/check exit non-zero on divergence, so CI can gate on agent regressions.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracedeck-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracedeck-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file tracedeck-0.1.0.tar.gz.

File metadata

  • Download URL: tracedeck-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for tracedeck-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1014c9c7aaef1fa3ab1d39b3026147969c57acd89eff1bc7f9185b26ac97ac06
MD5 1d9fae9ba0c7b928fbcb8b1b2d30847f
BLAKE2b-256 929fe3ac73f6f40a025e160dd0ffa261de004fd189b19f515b67fa8ad49e1132

See more details on using hashes here.

File details

Details for the file tracedeck-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tracedeck-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for tracedeck-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e4ee4f520932d17d9b5d95c0973078f67dc0f7a051b182ddd6e11a46cc04ffc
MD5 684f520212f93a168b7a821ec1346314
BLAKE2b-256 7b1c29a971c8704e599f31daf2a0be27661e2b9798294ba121a3c46df25d8f1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page