AI agent observability SDK — track runs, LLM calls, tool calls, and errors.
pip install agentradar-sdk==0.2.3 Copy PIP instructions
Next-generation AI agent observability — zero-code OpenTelemetry tracing for OpenAI, Anthropic, LangChain, CrewAI, LlamaIndex, and custom agents.
Trace your entire agent execution, tool calls, and LLM completions with two lines of code. No wrappers, no manual run creation, zero disruption to your existing code.
# For OpenAI pip install "agentradar-sdk[openai]" # For Anthropic pip install "agentradar-sdk[anthropic]" # For LangChain / LangGraph pip install "agentradar-sdk[langchain]" # For all supported frameworks pip install "agentradar-sdk[all]" 2. Initialize in 2 Lines Add agentradar.init() before running your agent code:
import agentradar agentradar.init(api_key="ar_live_your_key_here") # or set AGENTRADAR_API_KEY env var # Your existing agent code runs unchanged! from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Analyze our quarterly churn rate."}], ) All runs, token counts, latencies, model parameters, and errors are automatically streamed to your AgentRadar dashboard.
agentradar.init() uses OpenTelemetry and open-source OpenInference / OpenLLMetry instrumentors under the hood. It automatically detects installed packages and instruments them:
You can also specify which frameworks to activate:
agentradar.init(frameworks=["openai", "langchain"]) 🔒 Privacy-First Design By default, AgentRadar protects sensitive customer data with defense-in-depth:
agentradar.init(include_payloads=True) 🛠️ Tracing Plain-Python Agents (@agent & @tool) For custom functions or multi-step Python agents, use lightweight decorators:
import agentradar from agentradar import agent, tool agentradar.init(api_key="ar_live_...") @tool("calculator") def multiply(a: float, b: float) -> float: return a * b @agent("MathAssistant") def run_assistant(x: float, y: float): return multiply(x, y) run_assistant(10, 5) Works seamlessly with synchronous functions and async coroutines (async def).
Already using OpenTelemetry collector, OpenLLMetry, or custom OTLP exporters? You can stream directly into AgentRadar without our SDK:
Example with standard OpenTelemetry exporter:
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://api.agent-radar.in/api/v1/traces" export OTEL_EXPORTER_OTLP_TRACES_HEADERS="Authorization=Bearer ar_live_your_key_here" ⚙️ Configuration & Environment Variables Variable Purpose Default AGENTRADAR_API_KEY (or AR_API_KEY) API key from dashboard Required AGENTRADAR_ENDPOINT Ingestion base URL https://api.agent-radar.in OTEL_SERVICE_NAME Service name resource attribute agentradar-app AGENTRADAR_ENABLED Set to 0 or false to disable tracing true 📚 Advanced / Manual Tracing The SDK preserves 100% backward compatibility with the manual programmatic API:
from agentradar import AgentRadar ar = AgentRadar(api_key="ar_live_...") with ar.start_run(agent_name="CustomAgent", input={"query": "test"}) as run: run.log_llm_call( model_name="gpt-4o", provider="openai", duration_ms=650.0, token_usage={"prompt_tokens": 50, "completion_tokens": 20}, ) with run.track_tool("db_search", input={"id": 123}) as tool: tool.set_output({"status": "found"}) Async manual tracing is also fully supported with AsyncAgentRadar:
from agentradar import AsyncAgentRadar async with AsyncAgentRadar(api_key="ar_live_...") as ar: async with ar.start_run("AsyncAgent") as run: run.log_llm_call(model_name="claude-3-5-sonnet", provider="anthropic", duration_ms=450.0) 📄 License MIT © AgentRadar
all anthropic crewai dev langchain llamaindex openai
agents ai llm monitoring observability opentelemetry tracing
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.




