Current collected state Current
Observed since 20 Oct, 23:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AgentTrace SDK - AI Agent Observability & Debugging
AI Agent Observability & Debugging - Record, replay, and debug your AI agents.
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()
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 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)
with tracer.session("my_script.py") as trace_id:
tracer.thought("Starting...")
# Your agent code here
# Automatically ends with status "completed" or "failed"
from agenttrace import trace
@trace
def my_function(x, y):
return x + y # Automatically traced!
# Or set via environment variable
export AGENTTRACE_API_KEY="at_your_key_here"
# Then just:
tracer = AgentTrace() # Auto-reads from env
After recording, view your traces at:
https://app.agenttrace.io/dashboard/traceshttps://app.agenttrace.io/trace/{trace_id}For self-hosted deployments:
tracer = AgentTrace(
api_key="at_xxx...",
endpoint="https://your-domain.com" # Your self-hosted instance
)
MIT License - see LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 19 Dec 2025 | 3 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:6a91d8b55a304b4be8fed14a43bb8eb9210d624a910e10bb50a85f61eebf36be