Current collected state Current
Observed since 20 Oct, 21:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Sentry for AI Agents — one-line observability with local SQLite persistence
One-line observability for any Python agent. No framework required. No API key. No network calls.
pip install agentdna
from agentdna import observe, get_stats
@observe
def my_agent(prompt):
# your existing agent code
return llm.call(prompt)
my_agent("hello world")
# View stats (persists across restarts)
print(get_stats())
That's it. One decorator. Full observability.
📊 Stats: my_agent
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Health: ✅ Healthy
Total calls: 42
Success rate: 97.6%
Failed calls: 1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Avg latency: 1250.5 ms
P50 latency: 980.0 ms
P95 latency: 2100.0 ms
P99 latency: 3500.0 ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Errors:
Timeout: 1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
agentdna statsagentdna stats # overview of all observed functions
agentdna stats my_agent # detailed view
agentdna stats --export json # export as JSON
agentdna stats --export csv # export as CSV
agentdna stats --reset # clear all data
from agentdna import observe
@observe
def my_agent(prompt):
return llm.call(prompt)
@observe(name="transcriber", tags={"version": "2.0", "model": "whisper"})
def transcribe(audio_path):
return whisper.transcribe(audio_path)
@observe
async def my_async_agent(prompt):
result = await llm.acall(prompt)
return result
from agentdna import get_stats
stats = get_stats("my_agent")
print(f"Success rate: {stats['success_rate']:.1%}")
print(f"P95 latency: {stats['p95_latency_ms']:.0f}ms")
# All functions
all_stats = get_stats()
for name, s in all_stats.items():
print(f"{name}: {s['total_calls']} calls")
from agentdna import export_stats
json_str = export_stats(format="json")
csv_str = export_stats(format="csv")
~/.agentdna/observe.db (SQLite, WAL mode)get_stats() or agentdna statsNo dependencies beyond Python stdlib. click is only needed for the CLI.
Default: ~/.agentdna/observe.db
Custom path:
import os
os.environ["AGENTDNA_DB_PATH"] = "/path/to/my/observe.db"
| Without AgentDNA | With AgentDNA |
|---|---|
print("done!") | Track every call with latency + errors |
| Hope nothing breaks | Know exactly when and what breaks |
| Debug blind | P95 latency, error breakdown, trends |
| Lose data on restart | SQLite persistence |
pip install agentdna
Optional features:
pip install agentdna[discovery] # agent discovery (httpx, PyYAML)
pip install agentdna[server] # run registry server (FastAPI)
Apache 2.0
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.1 | 5 Apr 2026 | 9 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ba8248c81e2df362433618722451ccc41bcfa2f71a0b4d361fb28186e0751c9b