Current collected state Current
Observed since 20 Oct, 22:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python SDK for Agent OS — AI agent observability platform
Python SDK for Agent OS — AI agent observability, experimentation, and security. "PostHog for AI Agents."
pip install agentos
from agentos import wrap_openai
import openai
client = openai.OpenAI()
client = wrap_openai(client, api_key="aos_...", agent_id="my-agent")
# Every LLM call is now automatically traced
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)
That's it. Open your Agent OS dashboard to see traces, token usage, costs, and latency.
@observe decorator (Langfuse-compatible)from agentos import observe
@observe()
def my_agent(query: str) -> str:
result = search(query) # auto-traced as child span
return summarize(result) # auto-traced as child span
@observe(as_type="generation")
def summarize(text: str) -> str:
return openai_client.chat.completions.create(...)
from agentos import AgentOS
client = AgentOS(api_key="aos_...")
client.llm_call("my-agent", model="gpt-4o", system="openai", input_tokens=100, output_tokens=50)
client.tool_call("my-agent", tool_name="web-search", status="success", duration_ms=120)
client.eval("my-agent", eval_name="accuracy", score=0.95)
client.business_event("my-agent", event_name="task_completed")
client.flush()
export AGENTOS_API_KEY=aos_...
export AGENTOS_ENABLED=true
python my_agent.py
| Framework | Integration | One-liner |
|---|---|---|
| OpenAI | wrap_openai(client) | from agentos import wrap_openai |
| Anthropic | wrap_anthropic(client) | from agentos import wrap_anthropic |
| LangChain | AgentOSCallbackHandler | from agentos.integrations.langchain import AgentOSCallbackHandler |
| LlamaIndex | AgentOSCallbackHandler | from agentos.integrations.llamaindex import AgentOSCallbackHandler |
| CrewAI | @trace_crew / instrument_crewai() | from agentos.integrations.crewai import trace_crew |
| Pydantic AI | wrap_agent() / instrument_pydantic_ai() | from agentos.integrations.pydantic_ai import wrap_agent |
| LiteLLM | patch_litellm() | from agentos.integrations.litellm import patch_litellm |
| OpenTelemetry | OTLP SpanExporter | from agentos.compat.otel import register |
Change one import and keep your existing code:
| Platform | Migration |
|---|---|
| Langfuse | from agentos.compat.langfuse import Langfuse |
| LangSmith | from agentos.compat.langsmith import traceable |
| Arize Phoenix | from agentos.compat.otel import register (swap endpoint) |
| Helicone | from agentos.compat.helicone import get_proxy_config |
| Braintrust | from agentos.compat.braintrust import traced, Eval |
| W&B Weave | from agentos.compat.weave import op |
Full docs, guides, and API reference: docs.agentos.dev
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 8 Apr 2026 | 15 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 22:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:7148d26b56e18864a8b378399931c411596e56bf68557bf7c6656957a80aeba0