Current collected state Current
Observed since 20 Oct, 22:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentos-python
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.
| Package / target | Requirement | Relationship |
|---|---|---|
httpxEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | httpx<1,>=0.24 | runtime |
anthropicEnvironment{
"extras": "",
"marker": "extra == \"all\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | anthropic>=0.20; extra == "all" | runtime |
langchain-coreEnvironment{
"extras": "",
"marker": "extra == \"all\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | langchain-core>=0.2; extra == "all" | runtime |
litellmEnvironment{
"extras": "",
"marker": "extra == \"all\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | litellm>=1.0; extra == "all" | runtime |
openaiEnvironment{
"extras": "",
"marker": "extra == \"all\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | openai>=1.0; extra == "all" | runtime |
opentelemetry-exporter-otlp-proto-httpEnvironment{
"extras": "",
"marker": "extra == \"all\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | opentelemetry-exporter-otlp-proto-http>=1.20; extra == "all" | runtime |
opentelemetry-sdkEnvironment{
"extras": "",
"marker": "extra == \"all\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | opentelemetry-sdk>=1.20; extra == "all" | runtime |
anthropicEnvironment{
"extras": "",
"marker": "extra == \"anthropic\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | anthropic>=0.20; extra == "anthropic" | runtime |
crewaiEnvironment{
"extras": "",
"marker": "python_version >= \"3.10\" and extra == \"crewai\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | crewai>=0.50; python_version >= "3.10" and extra == "crewai" | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | mypy>=1.11; extra == "dev" | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio>=0.23; extra == "dev" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest>=8; extra == "dev" | runtime |
respxEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | respx>=0.21; extra == "dev" | runtime |
ruffEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | ruff>=0.6; extra == "dev" | runtime |
langchain-coreEnvironment{
"extras": "",
"marker": "extra == \"langchain\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | langchain-core>=0.2; extra == "langchain" | runtime |
litellmEnvironment{
"extras": "",
"marker": "extra == \"litellm\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | litellm>=1.0; extra == "litellm" | runtime |
llama-index-coreEnvironment{
"extras": "",
"marker": "python_version >= \"3.10\" and extra == \"llamaindex\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | llama-index-core>=0.10; python_version >= "3.10" and extra == "llamaindex" | runtime |
openaiEnvironment{
"extras": "",
"marker": "extra == \"openai\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | openai>=1.0; extra == "openai" | runtime |
opentelemetry-exporter-otlp-proto-httpEnvironment{
"extras": "",
"marker": "extra == \"otel\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | opentelemetry-exporter-otlp-proto-http>=1.20; extra == "otel" | runtime |
opentelemetry-sdkEnvironment{
"extras": "",
"marker": "extra == \"otel\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | opentelemetry-sdk>=1.20; extra == "otel" | runtime |
pydantic-aiEnvironment{
"extras": "",
"marker": "python_version >= \"3.10\" and extra == \"pydantic-ai\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pydantic-ai>=0.1; python_version >= "3.10" and extra == "pydantic-ai" | runtime |
bdist_wheel · 37.11 KB · Python py3
sdist · 390 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 22:50 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:284a0cf924bafe84afb2371bebe3fc9b2b280f689886eb2fcbfeb87ea54eba9c