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

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
AgentOps — Observability for AI Agents
Direct install command
npx -y tokrepo@latest install d570c84f-4e22-4723-806a-d23710686a5c --target codex

Run after dry-run confirms the install plan.

TL;DR
AgentOps provides LLM cost tracking, session replay, and error analysis for AI agents via a Python SDK.
§01

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.

§02

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.

§03

How to use

  1. Install the SDK:
pip install agentops
  1. Initialize with one line at the start of your agent code:
import agentops
agentops.init(api_key='YOUR_KEY')
  1. 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
  1. View sessions, costs, and replays in the AgentOps dashboard.
§04

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
§05

Related on TokRepo

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.

§06

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.

Frequently Asked Questions

What LLM providers does AgentOps support?+

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.

Does AgentOps work with CrewAI?+

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.

How does cost tracking work?+

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.

Is AgentOps open source?+

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.

Can I use AgentOps in production?+

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.

Citations (3)
🙏

Source & Thanks

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

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets