agent-trace-eval
Golden trace regression evaluation for tool-using AI agents.
agent-trace-eval checks agent execution traces against declarative expectations for:
- tool selection (required / forbidden tools)
- tool-call arguments
- tool-call ordering
- multi-agent handoffs
- recovery decisions (retry / fallback / escalate)
It is designed as a small, employer-neutral library you can use in CI to gate agent workflow changes.
Install
pip install agent-trace-eval
For local development:
pip install -e ".[dev]"
Quick start
Run the bundled examples:
agent-trace-eval \
--cases examples/cases \
--traces-dir examples/traces \
--report reports/example-report.md
Trace format
Traces are JSON or YAML documents with an events list. Supported event types include:
tool_callhandoffrecovery_decisionfinal_answer
Example:
{
"case_id": "refund_lookup",
"events": [
{
"type": "tool_call",
"name": "lookup_order",
"arguments": { "order_id": "12345" }
},
{
"type": "tool_call",
"name": "issue_refund",
"arguments": { "order_id": "12345" }
}
]
}
Case format
Cases are YAML or JSON files with id, description, input, and expect sections:
id: refund_lookup
description: Agent should look up an order before issuing a refund.
expect:
tools:
required: [lookup_order, issue_refund]
forbidden: [delete_account]
ordering:
before:
- first: lookup_order
second: issue_refund
arguments:
issue_refund:
order_id: "12345"
Python API
from agent_trace_eval import RegressionRunner, render_markdown_report
from agent_trace_eval.loader import load_case, load_trace
from agent_trace_eval.result import SuiteResult
case = load_case("examples/cases/refund_lookup.yaml")
trace = load_trace("examples/traces/refund_lookup.json")
runner = RegressionRunner()
result = runner.run_case(case, trace)
report = render_markdown_report(SuiteResult(case_results=[result]))
print(report)
Related writing
This project complements a series on agent regression testing and release gates:
Development
pytest
License
MIT
Metadata
Release files for agent-trace-eval 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_trace_eval-0.1.0.tar.gz | 8.4 kB | With provenance | Details for agent_trace_eval-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_trace_eval-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agent_trace_eval-0.1.0-py3-none-any.whl |
Total release size: 22.5 kB
Release files / agent_trace_eval-0.1.0.tar.gz
| Download URL | agent_trace_eval-0.1.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10f3a43b1c3f647e9894fb084013ffe0fd06aaceb4b857fb8baa95368e00201c
|
|
BLAKE2b-256 checksum How to use checksums |
a9acadf49cda1437a549434ef0df6733c5c83e953ed810e29a000c7c4747ddd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.
Transparency logRelease files / agent_trace_eval-0.1.0-py3-none-any.whl
| Download URL | agent_trace_eval-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f15fd04fde935e39e16f4d6950c0ad3bd82d20afaf9cde6e85c95b51fe706e69
|
|
BLAKE2b-256 checksum How to use checksums |
0be15140db5776a4ead7cb795b3f1d5c4fcb8c4035905c57c196f70919e9a836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.
Transparency logSecurity for agent-trace-eval 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agent_trace_eval-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.