Skip to main content

tool-call-replay

tool-call-replay converts recorded agent tool-call events into a canonical local replay file, deterministic assertions, and an optional pytest regression.

At a Glance

Job Turn a recorded tool-call sequence into a repeatable regression artifact.
Built for Agent developers, eval engineers, and CI owners debugging tool-use failures.
Differentiator Replays recorded structure and outputs without a model, provider API, or live tool.
Produces Canonical replay JSON, assertion results, Markdown reports, and generated pytest code.

Install

python -m pip install "tool-call-replay==0.1.1"

Verified Quickstart

Run from a source checkout:

tool-call-replay ingest examples/recovered_trace.jsonl \
  --out /tmp/refund-replay.json

tool-call-replay run /tmp/refund-replay.json \
  --assert examples/refund_assertions.yaml \
  --report /tmp/refund-replay.md

tool-call-replay pytest /tmp/refund-replay.json \
  --assert examples/refund_assertions.yaml \
  --out /tmp/test_refund_replay.py

The recovered refund fixture passes its tool order, terminal answer, retry, and forbidden-tool assertions. examples/failed_refund_agent_trace.jsonl is an intentional failing fixture and returns exit code 1 with the same assertions.

Accepted Input Profiles

  • jsonl: normalized goal, tool call, tool result, and final-answer events;
  • openai: the same normalized JSONL field subset under an OpenAI-oriented adapter name;
  • otlp: JSON with flat gen_ai.tool.* attributes;
  • phoenix: the same OTLP-style attribute mapping for Phoenix-like exports.

The v1 importers are intentionally small adapters, not complete parsers for every SDK or telemetry export version.

Assertion Surface

  • exact tool order;
  • final-answer substring;
  • maximum retries per tool;
  • forbidden tools;
  • required argument keys for named tools.

Runtime, Data, and Network Boundary

  • Ingest, replay, report, and pytest generation are local file operations.
  • The CLI does not call a model, execute a tool, or make a network request.
  • Ingest redacts secret-like keys plus sk-... and bearer-token strings. It is not a general PII scrubber, and generated replay and pytest files embed the remaining recorded arguments and outputs.
  • Assertions evaluate recorded events only; they do not prove current live tool behavior.

Limitations

  • The v1 importers normalize a narrow subset of supported trace shapes; they do not parse every provider or SDK export variant.
  • Passing assertions confirms only the recorded replay. It does not prove that the current live model or tool stack still behaves the same way.

Compatibility

The published auraone-agent-studio-open CLI declares tool-call-replay>=0.1.0 as a runtime dependency for trace import, replay, and CI export flows.

Publication Status

Verified on 2026-07-13:

Next Action

Normalize one sanitized failure trace, write the smallest assertion file that captures the regression, and commit the replay plus generated pytest test.

Metadata

Release files for tool-call-replay 0.1.1

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

Source distribution (sdist)

Source distribution for tool-call-replay 0.1.1
File Size Uploaded
tool_call_replay-0.1.1.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tool-call-replay 0.1.1
File Interpreter ABI Platform
tool_call_replay-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / tool_call_replay-0.1.1.tar.gz

Download URL tool_call_replay-0.1.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
37a03c340a007ed67462a2f25849b76362de682899febbdf0d9db470ec07c5ed
BLAKE2b-256 checksum
How to use checksums
f83b20d9ec84b704178d7e004b29d5e182b4eb83b4a13031ee414eead207d381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / tool_call_replay-0.1.1-py3-none-any.whl

Download URL tool_call_replay-0.1.1-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
525dcb13918f0a5e96cc2dd7b9a5a560c1b746fdd05dfc3dffa211aed2e483d5
BLAKE2b-256 checksum
How to use checksums
a9b50b9960fb4032456fbf37eb1696ac54d941ec899d616cbfef848cda020648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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