Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

agentos-python

Python SDK for Agent OS — AI agent observability platform

agentsaillmobservabilitytracing
Published8 Apr 2026
Direct dependencies15
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

Agent OS Python SDK

Python SDK for Agent OS — AI agent observability, experimentation, and security. "PostHog for AI Agents."

Install

pip install agentos

Quick Start

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.

Other Ways to Instrument

@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(...)

Manual event capture

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()

Environment variable (zero-code)

export AGENTOS_API_KEY=aos_...
export AGENTOS_ENABLED=true
python my_agent.py

Framework Integrations

FrameworkIntegrationOne-liner
OpenAIwrap_openai(client)from agentos import wrap_openai
Anthropicwrap_anthropic(client)from agentos import wrap_anthropic
LangChainAgentOSCallbackHandlerfrom agentos.integrations.langchain import AgentOSCallbackHandler
LlamaIndexAgentOSCallbackHandlerfrom agentos.integrations.llamaindex import AgentOSCallbackHandler
CrewAI@trace_crew / instrument_crewai()from agentos.integrations.crewai import trace_crew
Pydantic AIwrap_agent() / instrument_pydantic_ai()from agentos.integrations.pydantic_ai import wrap_agent
LiteLLMpatch_litellm()from agentos.integrations.litellm import patch_litellm
OpenTelemetryOTLP SpanExporterfrom agentos.compat.otel import register

Migrating From Another Platform?

Change one import and keep your existing code:

PlatformMigration
Langfusefrom agentos.compat.langfuse import Langfuse
LangSmithfrom agentos.compat.langsmith import traceable
Arize Phoenixfrom agentos.compat.otel import register (swap endpoint)
Heliconefrom agentos.compat.helicone import get_proxy_config
Braintrustfrom agentos.compat.braintrust import traced, Eval
W&B Weavefrom agentos.compat.weave import op

Documentation

Full docs, guides, and API reference: docs.agentos.dev

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 21

Native requirements
15 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx<1,>=0.24runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.20; extra == "all"runtime
langchain-core
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.2; extra == "all"runtime
litellm
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
litellm>=1.0; extra == "all"runtime
openai
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0; extra == "all"runtime
opentelemetry-exporter-otlp-proto-http
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-exporter-otlp-proto-http>=1.20; extra == "all"runtime
opentelemetry-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"all\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-sdk>=1.20; extra == "all"runtime
anthropic
Environment
{
  "extras": "",
  "marker": "extra == \"anthropic\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
anthropic>=0.20; extra == "anthropic"runtime
crewai
Environment
{
  "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
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.11; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8; extra == "dev"runtime
respx
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
respx>=0.21; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.6; extra == "dev"runtime
langchain-core
Environment
{
  "extras": "",
  "marker": "extra == \"langchain\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.2; extra == "langchain"runtime
litellm
Environment
{
  "extras": "",
  "marker": "extra == \"litellm\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
litellm>=1.0; extra == "litellm"runtime
llama-index-core
Environment
{
  "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
openai
Environment
{
  "extras": "",
  "marker": "extra == \"openai\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.0; extra == "openai"runtime
opentelemetry-exporter-otlp-proto-http
Environment
{
  "extras": "",
  "marker": "extra == \"otel\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-exporter-otlp-proto-http>=1.20; extra == "otel"runtime
opentelemetry-sdk
Environment
{
  "extras": "",
  "marker": "extra == \"otel\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
opentelemetry-sdk>=1.20; extra == "otel"runtime
pydantic-ai
Environment
{
  "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

Distribution files

2 collected
agentos_python-0.1.0-py3-none-any.whl

bdist_wheel · 37.11 KB · Python py3

Source file
agentos_python-0.1.0.tar.gz

sdist · 390 KB · Python source

Source file

Repository

PENDING
amitabh1998/agentos-python

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:50 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:284a0cf924bafe84afb2371bebe3fc9b2b280f689886eb2fcbfeb87ea54eba9c

Other collected versions

View all collected versions →