Skip to main content

Replay and diff AI agent event trajectories for debugging regressions. Python port of @mukundakatta/agent-trajectory-replay.

Project description

agent-trajectory-replay-py

Replay and diff AI agent event trajectories. Pure Python, zero deps. Python port of @mukundakatta/agent-trajectory-replay.

pip install agent-trajectory-replay-py
from agent_trajectory_replay import summarize_trajectory, diff_trajectories, replay_trajectory

events = [{"type": "tool_call", "tool": "search"}, {"type": "final", "content": "ok"}]
summarize_trajectory(events)         # TrajectorySummary(steps=2, tool_calls=1, errors=0, final_output='ok')
diff_trajectories(events, events)    # []  (no diff)
replay_trajectory(events, {"final": lambda e, s: s.update({"a": e["content"]})})
# {"a": "ok"}

License

MIT

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

agent_trajectory_replay_py-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

agent_trajectory_replay_py-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_trajectory_replay_py-0.1.0.tar.gz.

File metadata

File hashes

Hashes for agent_trajectory_replay_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 af7fcfc9a2b1ba3493e76ecd7bb4ca56b6032cb7d70c59bae56556366c19f358
MD5 def8f55ab1be1ff1721d367aa50ed4ba
BLAKE2b-256 35a276f1de1e45e864ba796a2c3ee84057412714651398303a664c384e95a55b

See more details on using hashes here.

File details

Details for the file agent_trajectory_replay_py-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_trajectory_replay_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c00f5e23f180b7cb64e1c08d4ef3683d825640e8d245da501067d650d8c2037a
MD5 360cdc8518265347e22a6824c481a663
BLAKE2b-256 bbfcbeb85e8ed00d5b7f706a52b86411911a29a6023924cdefa733d40ac4d04b

See more details on using hashes here.

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