ScriptsMar 31, 2026·2 min read

AgentOps — Observability for AI Agents

Python SDK for AI agent monitoring. LLM cost tracking, session replay, benchmarking, and error analysis. Integrates with CrewAI, LangChain, AutoGen, and more. 5.4K+ stars.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

pip install agentops
import agentops
agentops.init(api_key="YOUR_KEY")

# Your existing agent code — AgentOps auto-instruments LLM calls
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)

agentops.end_session("Success")

Intro

AgentOps is a Python SDK for monitoring and observing AI agents in production. It auto-instruments LLM calls to track costs, latency, token usage, errors, and session replays. Integrates with CrewAI, LangChain, AutoGen, OpenAI Agents SDK, Agno, and CamelAI with one line of code. 5,400+ GitHub stars, MIT licensed.

Best for: Teams running AI agents in production who need cost control and debugging Works with: OpenAI, Anthropic, CrewAI, LangChain, AutoGen, Agno, CamelAI


Key Features

Auto-Instrumentation

Add agentops.init() and all LLM calls are automatically tracked — no code changes needed.

Cost Tracking

Real-time cost per session, per agent, per model. Set budget alerts.

Session Replay

Replay entire agent sessions step-by-step: prompts, responses, tool calls, errors.

Error Analysis

Automatic detection of hallucinations, infinite loops, and failed tool calls.

Benchmarking

Compare agent performance across models, prompts, and configurations.

Dashboard

Web dashboard for team-wide monitoring, analytics, and alerting.


FAQ

Q: What is AgentOps? A: A Python SDK for AI agent observability — cost tracking, session replay, benchmarking, and error analysis. Auto-instruments LLM calls. 5.4K+ stars.

Q: Does AgentOps add latency? A: Minimal — instrumentation is async and non-blocking. Typically <5ms overhead per LLM call.


🙏

Source & Thanks

Created by AgentOps AI. Licensed under MIT. AgentOps-AI/agentops — 5,400+ GitHub stars

Related Assets