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.

Download files

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

Source Distribution

tool_call_replay-0.1.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

tool_call_replay-0.1.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file tool_call_replay-0.1.1.tar.gz.

File metadata

  • Download URL: tool_call_replay-0.1.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for tool_call_replay-0.1.1.tar.gz
Algorithm Hash digest
SHA256 37a03c340a007ed67462a2f25849b76362de682899febbdf0d9db470ec07c5ed
MD5 d208efc5383edb6c2b1271c3c3add188
BLAKE2b-256 f83b20d9ec84b704178d7e004b29d5e182b4eb83b4a13031ee414eead207d381

See more details on using hashes here.

File details

Details for the file tool_call_replay-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tool_call_replay-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 525dcb13918f0a5e96cc2dd7b9a5a560c1b746fdd05dfc3dffa211aed2e483d5
MD5 76fe6a1ad248505d992f1d3d392a7d00
BLAKE2b-256 a9b50b9960fb4032456fbf37eb1696ac54d941ec899d616cbfef848cda020648

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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