Skip to main content

agent-tracedown

The Python SDK for Tracedown, the flight recorder for AI agents. When an agent fails, Tracedown finds the step that caused it, not just the step that crashed. Then you can replay the run with your fix.

pip install agent-tracedown                 # the SDK: no dependencies
pip install agent-tracedown-server          # root-cause analysis, importers, server and UI
import agent_tracedown as tdn
tdn.init(project="support-bot", endpoint="http://localhost:7070")

with tdn.run("CalendarAssistant", input=user_msg) as run:
    out = tdn.llm_call(call_model, model="gpt-4o-mini", prompt=messages)
    result = tdn.tool_call("calendar_create_event", args, create_event)
    run.output(answer)

There is one-line instrumentation for LangGraph, the OpenAI Agents SDK, the Claude Agent SDK, Google ADK, Pydantic AI, MCP, CrewAI, AutoGen, Semantic Kernel and LlamaIndex (agent_tracedown.integrations). Runs can also be exported to any OpenTelemetry collector.

One-line run tracing

For a single-function agent, use @tdn.traced_run(name) instead of opening the run context yourself. The decorator records the first argument as input, the return value as output, and re-raises exceptions after marking the run failed. It supports both synchronous and asynchronous functions.

@tdn.traced_run("CalendarAssistant")
def answer(question):
    return call_model(question)

Framework integrations

The newer ones, briefly. Each records agents, model calls (with token usage and cost where the framework reports it) and tool calls, and marks the step where a failure happened.

Claude Agent SDK (pip install "agent-tracedown[claude-agent-sdk]"). Wrap the message stream; messages pass through unchanged. Subagents started with the Task tool nest under their own agent span, and the run's cost comes from ResultMessage.total_cost_usd.

from agent_tracedown.integrations import claude_agent as tdn_claude

async for msg in tdn_claude.trace_stream(query(prompt=p, options=opts), name="CodingAgent", prompt=p):
    ...

Google ADK (pip install "agent-tracedown[google-adk]"). Add the plugin to your app; it only observes.

from agent_tracedown.integrations import google_adk as tdn_adk

app = App(name="support", root_agent=root_agent, plugins=[tdn_adk.TracedownPlugin()])
runner = InMemoryRunner(app=app)

Pydantic AI (pip install "agent-tracedown[pydantic-ai]"). Run the agent through the wrapper; runs that raise are recorded too.

from agent_tracedown.integrations import pydantic_ai as tdn_pai

result = await tdn_pai.run(agent, "Refund order 42")      # or tdn_pai.run_sync(...)

MCP (pip install "agent-tracedown[mcp]"). Instrument a mcp.Client or ClientSession; inside a run, every call_tool becomes a step and list_tools records the server's tools and their input schemas.

from agent_tracedown.integrations import mcp as tdn_mcp

tdn_mcp.instrument(client, server="billing")   # or tdn_mcp.instrument_all()
with tdn.run("SupportAgent", input=question):
    await client.list_tools()
    await client.call_tool("refund", {"order_id": 42})

Documentation, benchmarks and the demo are in the repository. Licensed under Apache-2.0.

Metadata

Release files for agent-tracedown 0.5.0

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

Source distribution (sdist)

Source distribution for agent-tracedown 0.5.0
File Size Uploaded Provenance Actions
agent_tracedown-0.5.0.tar.gz 47.4 kB With provenance Details for agent_tracedown-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-tracedown 0.5.0
File Interpreter ABI Platform Actions
agent_tracedown-0.5.0-py3-none-any.whl Python 3 none any Details for agent_tracedown-0.5.0-py3-none-any.whl

Total release size: 101.0 kB

Release files / agent_tracedown-0.5.0.tar.gz

Download URL agent_tracedown-0.5.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7ca95b9bfca2351e07bf9183fdf9dd302af8e9dd7bc5486b3fc13ce01abe6a15
BLAKE2b-256 checksum
How to use checksums
9b2e807043d4491d0436c91a7b761b98eebb209bf6e36cdc5becc7bd7b3bcead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Release files / agent_tracedown-0.5.0-py3-none-any.whl

Download URL agent_tracedown-0.5.0-py3-none-any.whl
Size 53.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95f8d61920f6d006019df8c69b4ba1b7cd4ff0dd5c40e9eb756035ecbf30475c
BLAKE2b-256 checksum
How to use checksums
9d601ae682bde7f6f60ba6f87df7fb83578c70315fa0b6c372db2149f495fb73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 1, 2026.

Transparency log

Security for agent-tracedown 0.5.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_tracedown-0.5.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 Nov 1, 2026.

Transparency log

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