Current collected state Current
Observed since 20 Oct, 21:47 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentdb-sdk
AgentDB tells you when your agent stops behaving like itself. Causal lineage, time travel and behavioral baselines for any AI agent.
Python SDK for AgentDB — the operational database for AI agents.
pip install agentdb-sdk
Note: There is an unrelated package called
agentdbon PyPI. Make sure to installagentdb-sdk(this package). The import is stillfrom agentdb import AgentDB.
from agentdb import AgentDB
# Cloud (agentdb.zizka.ai)
db = AgentDB("agdb_live_xxxx")
# Self-hosted
db = AgentDB(host="http://localhost:8000")
result = await db.log(
agent="my-bot",
event="tool_call",
data={"tool": "search_web", "query": "competitor pricing"},
)
print(result.event_id)
# Log the user message
msg = await db.log(agent="my-bot", event="user_message",
data={"text": "why is my bill $200?"})
# Log the tool call that happened BECAUSE of the message
tool = await db.log(agent="my-bot", event="tool_call",
data={"tool": "get_billing"},
parent_id=msg.event_id) # <-- causal link
# Log the response that happened BECAUSE of the tool call
await db.log(agent="my-bot", event="agent_response",
data={"text": "I found an anomaly in your account"},
parent_id=tool.event_id)
chain = await db.why(tool.event_id)
chain.print()
# user_message: {'text': 'why is my bill $200?'} [14:32:01]
# └── tool_call: {'tool': 'get_billing'} [14:32:02]
# └── agent_response: {'text': '...'} [14:32:03]
results = await db.search("customer angry about billing")
for event in results:
print(event.event, event.data)
from datetime import datetime
state = await db.at("my-bot", datetime(2026, 5, 1, 15, 0))
print(state.state)
events = await db.query("my-bot", limit=100, event_type="tool_call")
git clone https://github.com/Zizka-ai/agentdb
cd agentdb && cp .env.example .env
docker-compose -f infra/docker-compose.yml up
AGPL-3.0
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | httpx>=0.27.0 | runtime |
bdist_wheel · 9.42 KB · Python py3
sdist · 9.29 KB · Python source
Observed since 20 Oct, 21:47 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:20c80e35d936f9b489bccf203e9669f8c8d3a2db467c659ab9502279a71ec88b