Traccia Documentation

Trace, monitor, and govern your AI agents in production.

Traccia is an OpenTelemetry-based tracing SDK for AI agents and LLM applications. Instrument your agents with a single decorator and gain full visibility into their execution, costs, and behavior across Python and TypeScript.

bash
pip install traccia

Choose Your Path

Use SDK Locally

Open Source

Export traces to your own observability stack. Works with Jaeger, Grafana Tempo, Zipkin, and any OpenTelemetry-compatible backend.

  • No account required
  • OTLP standard export
  • Full SDK control

Use Traccia Platform

Full Power

Access the complete Traccia dashboard with agent-first governance, cost attribution, policy guardrails, and team collaboration.

  • Policy guardrails
  • Cost attribution
  • Agent lifecycle management

How It Works

Traccia sits between your application and observability backends, enriching traces with AI-specific metadata:

1
Your Agent Code
↓ @observe() decorators
2
Traccia SDK
• Auto-instruments OpenAI, Anthropic, FastAPI
• Counts tokens, calculates costs
• Adds agent/session/user metadata
• Rate limits and batches spans
↓ OTLP over HTTP
3
Your Backend
• Jaeger / Grafana Tempo (open-source)
• Traccia Platform (hosted)

Quick Example

Add tracing to any function with the @observe() decorator:

agent.py
python
from traccia import observe, init
# Initialize Traccia
init()
@observe()
def my_agent(query: str) -> str:
"""Your agent logic here."""
response = call_llm(query)
return response
# All LLM calls are automatically traced
result = my_agent("What is the weather today?")

What You Get

Full Trace Visibility

See every step of agent execution, from prompts to tool calls.

Cost Attribution

Track token usage and costs per agent, model, and tool.

Policy Guardrails

Set spend limits, retry caps, and custom rules.

Auto-Instrumentation

Automatic tracing for OpenAI, Anthropic, and FastAPI.

OpenTelemetry Native

Export to any OTLP-compatible backend.

Team Collaboration

Org-level visibility with role-based access.

Governance Hub

AI system registry, reviews, incidents, evidence exports.

PII redaction (SDK)

Optional pattern masking before export (redact_pii).

© 2026 Traccia.