explaingit

agentops-ai/agentops

5,544PythonAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Python SDK that adds monitoring and debugging to AI agent workflows in two lines of code, it records every LLM call, cost, and step so you can replay and inspect what your agent did.

Mindmap

mindmap
  root((repo))
    What it does
      Agent monitoring
      Session replay
      Cost tracking
    Integrations
      CrewAI LangChain
      OpenAI Agents SDK
      AutoGen LlamaIndex
    Features
      Execution graph
      Step-by-step replay
      Decorator support
    Use Cases
      Debug agent loops
      Track LLM spend
      Catch silent failures
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add session recording to a CrewAI or LangChain agent and replay each step to debug why it behaved unexpectedly.

USE CASE 2

Track LLM spend across hundreds of agent runs and find sessions where cost spiked unexpectedly.

USE CASE 3

Catch silent tool-call failures by reviewing the full execution graph in the AgentOps dashboard after a run.

Tech stack

Pythonpip

Getting it running

Difficulty · easy Time to first run · 5min

Requires a free AgentOps API key from agentops.ai, self-hosting requires additional setup.

MIT license, use freely for any purpose including commercial projects, self-hosting is supported if you prefer not to send data to a cloud service.

In plain English

AgentOps is a Python toolkit for monitoring and debugging AI agents: programs that use large language models to take sequences of actions or make decisions autonomously. When you build something with a framework like CrewAI, LangChain, or OpenAI's Agents SDK, it can be hard to understand why it behaved a certain way, how much it cost, or where it went wrong. AgentOps records everything that happens during a run so you can review it afterward. Adding it to an existing project takes two lines of code: one to initialize it with an API key and one to mark when a session ends. From there, AgentOps automatically captures each call made to AI model providers, what was sent and received, how long it took, and what it cost. You can also add decorators to your own functions and classes to mark them as agents, tasks, or operations, which lets the dashboard show a structured breakdown of the full execution flow. The web dashboard lets you replay a session step by step, see a graph of how different parts of the program called each other, and view cost summaries across many sessions. This is useful for catching cases where an agent looped unnecessarily, where a tool call failed silently, or where spending spiked unexpectedly. AgentOps integrates with most major AI agent frameworks and model providers out of the box, including CrewAI, AutoGen, LangChain, Cohere, and LlamaIndex. The dashboard and backend are open-source under the MIT license and can be self-hosted on your own infrastructure if you do not want to send data to AgentOps' cloud service. It installs via pip and works with Python. Documentation is at docs.agentops.ai.

Copy-paste prompts

Prompt 1
I'm using AgentOps with CrewAI. Add the right decorators to my agents and tasks, and show me how to view the session replay in the dashboard.
Prompt 2
I have an OpenAI Agents SDK script. Add AgentOps initialization and show me how to filter sessions by total token cost in the dashboard.
Prompt 3
My AgentOps session shows an agent looping 50 times before failing. Help me add a step-count guard using the data AgentOps captures.
Prompt 4
Show me how to self-host the AgentOps backend on my own server so session data never leaves my infrastructure.
Open on GitHub → Explain another repo

← agentops-ai on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.