Skip to main content

CrossTrace

A crash test for AI agents. CrossTrace records real runs of your agent, replays them offline with no API cost, and breaks one model call at a time the way providers and networks really break: a stream cut short, a stalled connection, a reset, a rate limit, an overloaded API, a reply cut at the token limit. For every failure it tells you what your agent did next, and the fix for the SDK it detected. It runs in CI.

Your agent needs no code changes. It only has to read its provider base URL from the environment (the OpenAI and Anthropic SDKs, LangChain, LangGraph, LiteLLM, pydantic-ai, the OpenAI Agents SDK and the Vercel AI SDK all do).

Warning: your tools really run. CrossTrace replays the model, not your code. In record, test and check, your agent and its tools run for real, many times (only MCP tools behind crosstrace mcp-wrap are answered from the recording in test, unless you turn on real tools). Use test accounts, sandboxes and throwaway data only. Never live keys or real records.

pip install crosstrace
crosstrace init --command "python agent.py {input}"
crosstrace record     # runs your agent for real, once per input (uses your API key)
crosstrace test       # replays with faults, offline; exit code 1 if your agent hides a failure

Or ask one question with one command: does your agent do the wrong thing when a reply is cut off or lost?

crosstrace check -- python agent.py "{input}"

For Python 3.12+ agents it records which tool functions really ran, and with what values, with no change to your code. A tool that ran with values the healthy run never used is WRONG_ACTION.

What it found in a stock LangGraph agent: a stream cut inside a tool call made it run the tool on the truncated arguments, in 2 of 3 cut calls (the model asked for order 42, the agent looked up order 4, no error); a stalled stream froze it; a cut answer was printed as the whole answer.

It also tests MCP tool calls over stdio: when a tool succeeded but its response was lost, a retry can repeat a write (a second email, a second form submit). CrossTrace counts writes after recovery and reports DUPLICATE.

Early (v0.2), open source (MIT).

Metadata

Release files for crosstrace 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crosstrace 0.2.2
File Size Uploaded Provenance Actions
crosstrace-0.2.2.tar.gz 151.4 kB Without provenance Details for crosstrace-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crosstrace 0.2.2
File Interpreter ABI Platform Actions
crosstrace-0.2.2-py3-none-any.whl Python 3 none any Details for crosstrace-0.2.2-py3-none-any.whl

Total release size: 232.5 kB

Release files / crosstrace-0.2.2.tar.gz

Download URL crosstrace-0.2.2.tar.gz
Size 151.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2c418e1859a317f6728814ba46f95c4e7d77fcb38cab394153f9ceddbb5fe143
BLAKE2b-256 checksum
How to use checksums
dfb1dbf730efccf0ccbddd2ad1ed8211d81a3e47cfe2ee098acb0dbe4132008a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / crosstrace-0.2.2-py3-none-any.whl

Download URL crosstrace-0.2.2-py3-none-any.whl
Size 81.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24fb3dd4eabaaf4d927c351af8734e95fceab115c9ff7798cf132c36c5d2f1b4
BLAKE2b-256 checksum
How to use checksums
c04ce1040ff6597bcbab135476d5c1806c085537e94ab07c49714a9e16119b93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for crosstrace 0.2.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page