Catalog PyPI
PACKAGE EXPLORERView in registry

agentradar-sdk

PyPI

AI agent observability SDK — track runs, LLM calls, tool calls, and errors.

agentsaillmmonitoringobservabilityopentelemetrytracing
Versions collected1
Direct dependencies13From release 0.2.3
Last observed20 Oct, 23:06 UTC

README

Version 0.2.3 documentation

agentradar-sdk — Python SDK

PyPI version Python 3.10+ License: MIT

Next-generation AI agent observability — zero-code OpenTelemetry tracing for OpenAI, Anthropic, LangChain, CrewAI, LlamaIndex, and custom agents.


⚡ Zero-Code Quick Start

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.

1. Install

Install with your framework extra:

# 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.


🧩 Supported Frameworks

agentradar.init() uses OpenTelemetry and open-source OpenInference / OpenLLMetry instrumentors under the hood. It automatically detects installed packages and instruments them:

FrameworkInstallation ExtraAuto-Detected Package
OpenAIpip install "agentradar-sdk[openai]"openai
Anthropicpip install "agentradar-sdk[anthropic]"anthropic
LangChainpip install "agentradar-sdk[langchain]"langchain, langchain-core
LangGraphpip install "agentradar-sdk[langchain]"langgraph
LlamaIndexpip install "agentradar-sdk[llamaindex]"llama_index
CrewAIpip install "agentradar-sdk[crewai]"crewai
DSPypip install "agentradar-sdk[dspy]"dspy
Haystackpip install "agentradar-sdk[haystack]"haystack
Mistralpip install "agentradar-sdk[mistralai]"mistralai
Coherepip install "agentradar-sdk[cohere]"cohere
AWS Bedrockpip install "agentradar-sdk[bedrock]"boto3
Google GenAIpip install "agentradar-sdk[google-genai]"google.generativeai

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:

  • Payload Stripping Enabled by Default (include_payloads=False): Prompt messages, completion text, and tool input/output contents are stripped on the client side before export. Latency, token metrics, error types, model names, and execution hierarchies are preserved.
  • To retain inputs and outputs for prompt debugging:
    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).


🌐 OTel-Without-SDK (Direct OTLP Ingestion)

Already using OpenTelemetry collector, OpenLLMetry, or custom OTLP exporters? You can stream directly into AgentRadar without our SDK:

  • Endpoint: https://api.agent-radar.in/api/v1/traces
  • Protocols: OTLP/HTTP with Content-Type: application/x-protobuf or application/json
  • Authentication: Include Authorization: Bearer ar_live_... or X-API-Key: ar_live_...

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

VariablePurposeDefault
AGENTRADAR_API_KEY (or AR_API_KEY)API key from dashboardRequired
AGENTRADAR_ENDPOINTIngestion base URLhttps://api.agent-radar.in
OTEL_SERVICE_NAMEService name resource attributeagentradar-app
AGENTRADAR_ENABLEDSet to 0 or false to disable tracingtrue

📚 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

Downloads & popularity

Awaiting observations

No metric observations yet

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

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.318 Oct 202613

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
goodguyady/agentradar

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 23:06 UTC

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

Record identity

package:74baf6ec918dcb62a0d897b4f97bb52949f54e1da683e1d7d50ee8ff4e4c3476