Skip to main content

Audit agent decisions after the fact by turning raw traces into per-property reconstructability reports that identify evidenced, missing, and opaque decision facts.

Project description

Decision Trace Reconstructor

DOI

Decision Trace Reconstructor makes agent decisions auditable after the fact: it shows whether the available traces are enough to reconstruct what happened, and names every missing or opaque decision fact.

Instead of generating another narrative, it produces a per-property reconstructability matrix: which decision-event fields are evidenced, partial, structurally absent, or opaque. No synthetic rationale is invented.

Supported Adapters

Full adapter documentation lives in docs/adapters/. Each adapter supports offline file ingest; vendor-backed adapters also support live/network ingest when the optional extra and credentials are available.

# Adapter Extra Covers
01 langsmith [langsmith] LangChain / LangGraph ecosystem
02 otlp [otlp] OpenTelemetry GenAI — one adapter, many backends
03 bedrock [bedrock] AWS Bedrock AgentCore
04 openai-agents [openai-agents] OpenAI Agents SDK + Traces dashboard exports
05 anthropic [anthropic] Anthropic Messages API + Computer Use
06 mcp [mcp] Model Context Protocol transcripts
07 crewai [crewai] CrewAI multi-agent telemetry
08 agentframework [agentframework] Microsoft Agent Framework / AutoGen v0.4
09 pydantic-ai [pydantic-ai] Pydantic AI run records
10 generic-jsonl none Custom JSONL logs via mapping config

Unsupported source systems should use generic-jsonl first. If OpenTelemetry GenAI spans are available, otlp is usually the better long-term integration path.

Quick Start

# 1. Install with the relevant adapter extra
pip install -e '.[langsmith]'   # or [otlp], [bedrock], [openai-agents], ...

# 2. Ingest a trace into a fragments manifest
decision-trace ingest langsmith --from-file traces/agent_run.json \
  --architecture single_agent --stack-tier within_stack \
  --state-mutation-tools "(write|exec|drop|delete|update)" \
  --out fragments.json

# 3. Reconstruct and emit evidence reports
decision-trace reconstruct fragments.json --out report/ --jsonld

Output:

  • report/feasibility.json: per-property reconstructability categories, gap descriptions, and completeness percentage
  • report/trace.jsonld: W3C PROV-O graph, queryable via SPARQL

Ingest can also be piped directly into reconstruction:

decision-trace ingest langsmith --from-file traces/run.json --out - | \
  decision-trace reconstruct /dev/stdin --out report/ --jsonld

Result Shape

The report is intentionally diagnostic, not narrative:

Property Category Gap
inputs fully_fillable none
policy_basis structurally_unfillable active policy was not recorded
reasoning_trace opaque model reasoning is not externally observable

Documentation

Examples

Worked examples live under examples/<adapter>_basic_agent/ and are pinned by integration tests for bit-identical reproduction. The named incident example examples/replit_drop_database/ shows reconstruction from a public-record fragment manifest.

Related Work Status

  • Companion papers for the Decision Evidence Maturity Model and related evidence-regime concepts are in preparation. They are intentionally not cited as publications until public identifiers exist.
  • Conceptual dependencies: the Decision Event Schema, the upstream Evidence Collector SDK, and the downstream Governance Benchmark Dataset.

Citation

CITATION.cff, codemeta.json, and ro-crate-metadata.json ship with the package. Version v0.1.0 is archived on Zenodo at https://doi.org/10.5281/zenodo.19851574.

License

Apache-2.0. See LICENSE.

Project details


Download files

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

Source Distribution

decision_trace_reconstructor-0.1.2.tar.gz (254.6 kB view details)

Uploaded Source

Built Distribution

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

decision_trace_reconstructor-0.1.2-py3-none-any.whl (204.3 kB view details)

Uploaded Python 3

File details

Details for the file decision_trace_reconstructor-0.1.2.tar.gz.

File metadata

File hashes

Hashes for decision_trace_reconstructor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8e5c70ad5788ca376b8afa3a3ca0b2ea57502d73c1bd0d18aa20b5f3978a5281
MD5 2ea156e454101fc5301894a7518aef9d
BLAKE2b-256 4088dfff45259e22977e1ade6b0cf68bd111b0e07f2022afe639d9ab41d3d637

See more details on using hashes here.

Provenance

The following attestation bundles were made for decision_trace_reconstructor-0.1.2.tar.gz:

Publisher: release.yml on governance-evidence/decision-trace-reconstructor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file decision_trace_reconstructor-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for decision_trace_reconstructor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8564ae04e53a06b9450a2da5bba83c2c8d01bd69f4ab90fe9cafdbead124da
MD5 6d9687ab89c694e1f8f90f457b4d49c5
BLAKE2b-256 d140d5f85b202e46b65591e50a69dbee2ff8358e1be5703c8a528fa88a706cfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for decision_trace_reconstructor-0.1.2-py3-none-any.whl:

Publisher: release.yml on governance-evidence/decision-trace-reconstructor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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