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.
Installation agent prête
Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.
npx -y tokrepo@latest install d570c84f-4e22-4723-806a-d23710686a5c --target codexÀ exécuter après confirmation du plan en dry-run.
What it is
AgentOps is a Python SDK for monitoring AI agents in production. It provides LLM cost tracking, session replay, benchmarking, and error analysis. The SDK auto-instruments LLM calls from OpenAI, Anthropic, and other providers, and integrates with agent frameworks like CrewAI, LangChain, and AutoGen.
AgentOps targets developers who build AI agents and need visibility into cost, performance, and failure patterns. It captures every LLM call, tool invocation, and agent decision in a timeline view for debugging and optimization.
How it saves time or tokens
Without observability, debugging AI agents means adding print statements and manually tracing execution paths. AgentOps auto-captures LLM calls, token usage, and costs without modifying your agent code. Session replay lets you step through an agent's decision history visually. Cost tracking surfaces expensive prompts so you can optimize token usage. Error analysis identifies patterns in agent failures across sessions.
How to use
- Install the SDK:
pip install agentops
- Initialize with one line at the start of your agent code:
import agentops
agentops.init(api_key='YOUR_KEY')
- Run 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': 'Analyze this codebase.'}]
)
# AgentOps captures this call automatically
- View sessions, costs, and replays in the AgentOps dashboard.
Example
import agentops
from crewai import Agent, Task, Crew
agentops.init(api_key='YOUR_KEY')
researcher = Agent(
role='Researcher',
goal='Find relevant papers on transformer architectures',
backstory='You are an ML research assistant.'
)
task = Task(
description='Search for papers on efficient attention mechanisms published in 2025-2026.',
agent=researcher
)
crew = Crew(agents=[researcher], tasks=[task])
result = crew.kickoff()
# AgentOps tracks all LLM calls, tool uses, and costs
Related on TokRepo
- AI Agent Tools — Frameworks and tools for building AI agents
- Monitoring Tools — Observability and monitoring solutions
This tool integrates with standard development workflows and requires minimal configuration to get started. It is available as open-source software with documentation and community support through the official repository. The project follows semantic versioning for stable releases.
For teams evaluating this tool, the key advantage is reducing manual work in repetitive tasks. The automation provided by the built-in features means less custom code to maintain and fewer integration points to manage. This translates directly to lower maintenance costs and faster iteration cycles.
Common pitfalls
- AgentOps requires an API key and sends telemetry data to their dashboard; review their data handling policies if your agents process sensitive information.
- Auto-instrumentation patches LLM client libraries at import time; import agentops and call init() before importing OpenAI or Anthropic clients to ensure proper instrumentation.
- Session replay data can grow large for long-running agents; configure session limits or sampling to manage storage costs on the AgentOps platform.
Questions fréquentes
AgentOps auto-instruments OpenAI, Anthropic, Cohere, and other major LLM providers. It captures request and response data, token counts, latency, and costs for each call automatically.
Yes. AgentOps integrates with CrewAI, LangChain, AutoGen, and other agent frameworks. It auto-detects these frameworks and captures agent-level events (task assignments, tool calls, delegation) in addition to raw LLM calls.
AgentOps tracks token usage per LLM call and calculates costs based on each provider's pricing. You see per-session and per-agent cost breakdowns in the dashboard, making it easy to identify expensive prompts and optimize spending.
The AgentOps Python SDK is open-source. The dashboard and analytics platform are hosted services. You can inspect and modify the SDK code, but session data is stored on AgentOps servers.
Yes. AgentOps is designed for production monitoring. The SDK adds minimal overhead to LLM calls and supports async operations. Configure sampling rates and session limits to control the volume of telemetry data.
Sources citées (3)
- AgentOps GitHub— AgentOps provides LLM cost tracking, session replay, and auto-instrumentation
- AgentOps Documentation— AgentOps integrates with CrewAI, LangChain, and AutoGen
- AgentOps Official Site— AgentOps Python SDK for agent observability
En lien sur TokRepo
Source et remerciements
Created by AgentOps AI. Licensed under MIT. AgentOps-AI/agentops — 5,400+ GitHub stars
Fil de discussion
Actifs similaires
Laminar — Open-Source Observability for AI Agents
Open-source observability for AI agents: self-host with Docker Compose, then use the SDK to trace runs, metrics, and outputs end-to-end.
AgentOps — Observability Dashboard for AI Agents
Python SDK for monitoring AI agent sessions with real-time dashboards, token tracking, cost analysis, and error replay. Two lines of code to instrument any framework. 4,500+ GitHub stars.
Logfire — Python Observability on OpenTelemetry
Logfire is Pydantic’s Python SDK for traces/metrics/logs on OpenTelemetry, helping teams add observability with minimal code and query data with SQL.
HyperDX — Open Source Full-Stack Observability Platform
A self-hosted observability platform that unifies logs, metrics, traces, and session replays in one interface powered by ClickHouse and OpenTelemetry.