SpanTrail records every tool call, prompt, token and error your AI agent produces, then gives you a timeline you can actually read. Ship in an afternoon.
# pip install spantrail import spantrail spantrail.init(api_key="spantrail_sk_...", endpoint="https://host:8443") @spantrail.trace("research.run") def research(query): with spantrail.span("llm.completion", kind="llm", model="gpt-4o") as s: s.input = {"prompt": query} s.tokens_input, s.tokens_output = 120, 340 s.cost_usd = 0.004 return answer
Agent failures are invisible. The run "succeeded" and the output was wrong. No stack trace, no step-by-step record of which tool call drifted.
Token spend is discovered after the fact, attributed by guesswork, and never tied back to the step that caused it.
Reproducing a failure means re-running the agent against a live world, hoping it fails the same way a second time.
Every span in order: name, duration, inputs, outputs, errors, token counts and cost. Click any trace to see the full tree.
Cost is attached to the span that incurred it, not to a monthly total you have to reverse-engineer.
Exceptions are captured with their message and the span stack, so a failed run is a link you can send to a colleague.
No agent-side proxy, no key rotation dance, no LLM vendor in the billing path. The SDK is batched and never raises into your app.
$0
50k events / month. 30-day retention. Unlimited traces.
$29
1M events / month. 30-day retention. Cost dashboards. Email support.
$99
10M events / month. 90-day retention. Shared workspaces. Priority support.