Catalog PyPI
PACKAGE EXPLORERView in registry

agenttrace-sdk

PyPI

AgentTrace SDK - AI Agent Observability & Debugging

agentaidebugginglangchainllmobservabilityopenaitracing
Versions collected1
Direct dependencies3From release 1.0.0
Last observed20 Oct, 23:35 UTC

README

Version 1.0.0 documentation

AgentTrace SDK

AI Agent Observability & Debugging - Record, replay, and debug your AI agents.

PyPI version Python 3.8+


🚀 Quick Start

pip install agenttrace-sdk
from agenttrace import AgentTrace

# Initialize with your API key
tracer = AgentTrace(api_key="at_your_api_key_here")

# Start a trace session
tracer.start("my_agent.py")

# Record agent activities
tracer.thought("Analyzing the user's request...")
tracer.tool_start("web_search", {"query": "latest AI news"})
tracer.tool_end("web_search", {"results": [...]})

# End the session
tracer.end()

📋 Features

  • 📍 Event Recording - Capture thoughts, tool calls, file writes, and exceptions
  • 🔄 Replay Execution - Re-run your agent with deterministic results
  • 🌿 Branch & Fork - Create alternate timelines from any point
  • 🔍 Compare Runs - Side-by-side diff of different executions
  • 🛠️ AutoFix Engine - AI-powered error detection and fixes

🔧 API Reference

Initialize Client

from agenttrace import AgentTrace

tracer = AgentTrace(
    api_key="at_xxx...",                    # Your API key (required)
    endpoint="https://app.agenttrace.io",   # API endpoint (optional)
    batch_size=10,                          # Events before auto-flush
    flush_interval=1.0                      # Seconds between flushes
)

Record Events

# Record a thought/reasoning step
tracer.thought("Planning the next action...")

# Record tool invocation
tracer.tool_start("calculator", {"expression": "2+2"})
tracer.tool_end("calculator", result=4)

# Record file operations
tracer.file_write("/path/to/file.txt", "content here")

# Record exceptions
tracer.exception("ValueError", "Invalid input", traceback_str)

Context Manager

with tracer.session("my_script.py") as trace_id:
    tracer.thought("Starting...")
    # Your agent code here
    # Automatically ends with status "completed" or "failed"

Decorator

from agenttrace import trace

@trace
def my_function(x, y):
    return x + y  # Automatically traced!

🔑 Get Your API Key

  1. Sign up at agenttrace.io
  2. Go to Settings → API Keys
  3. Create a new key
  4. Copy and use in your code
# Or set via environment variable
export AGENTTRACE_API_KEY="at_your_key_here"

# Then just:
tracer = AgentTrace()  # Auto-reads from env

📊 View Your Traces

After recording, view your traces at:

  • Dashboard: https://app.agenttrace.io/dashboard/traces
  • Individual Trace: https://app.agenttrace.io/trace/{trace_id}

🌐 Self-Hosted

For self-hosted deployments:

tracer = AgentTrace(
    api_key="at_xxx...",
    endpoint="https://your-domain.com"  # Your self-hosted instance
)

📄 License

MIT License - see LICENSE for details.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.019 Dec 20253

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
agenttrace/sdk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:35 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:6a91d8b55a304b4be8fed14a43bb8eb9210d624a910e10bb50a85f61eebf36be