Current collected state Current
Observed since 20 Oct, 22:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python SDK for AgentLogs — open-source observability for AI agents
Open-source observability for AI agents. Trace every LLM call, tool use, error, and cost.
pip install agentlogs-sdk
import asyncio
from agentlogs import AgentLogs, StepType
async def main():
# Reads AGENTLOGS_API_KEY from env, defaults to https://agentlogs.app
client = AgentLogs()
async with await client.create_trace(name="research-agent") as trace:
async with trace.step("search", step_type=StepType.TOOL) as s:
# ... your tool call
pass
await trace.add_step(
name="gpt-4o",
step_type=StepType.LLM,
metadata={"model": "gpt-4o", "provider": "openai"},
tokens=1234,
cost=0.012,
)
asyncio.run(main())
from agentlogs import configure
configure(
api_key="al_...", # or set AGENTLOGS_API_KEY
api_url="https://agentlogs.app", # default
project="my-agent",
)
Env vars:
AGENTLOGS_API_KEY — get one from https://agentlogs.app/settingsAGENTLOGS_API_URL — override for self-hosted instancesAGENTLOGS_PROJECT — default project namefrom agentlogs import trace_agent
@trace_agent()
async def my_agent(query: str):
return await llm.generate(query)
Point the SDK at your own deployment:
configure(api_url="https://logs.your-company.com")
MIT licensed.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 21 May 2026 | 13 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e0ed7c28c7bd02a81cf9384f0f7b3d5ae10ed1c5f59f7d48ce6f89606bbe8bf0