Discover / Token & Cost Optimization

AgentOps

by AgentOps-AIPython

Observability platform for tracking cost, performance and behavior of AI agents in production.

Toolexperimental

Maturity: experimental because latest release 0.4.21 is pre 1.0. Derived from release and commit history, not a rating.

Stars
5.7k
Forks
611
Downloads / mo
287k
Last commit
2026-06-25
License
MIT
Open issues
178

Market and trust evidence

Edition not yet matched

No exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.

Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.

In practice

Written by AI from this repository’s README · high confidence

Agent runs are opaque, so failures and spend cannot be traced back to a specific step or model call.

Use it when

Use it when you run CrewAI, LangChain, AutoGen or OpenAI Agents in production and need replays and cost tracking.

Not the right pick when

Less suitable if you cannot send trace data to a hosted dashboard and do not want to run the self hosted app.

Capabilities

  • session replays added in two lines of code
  • step by step agent execution graphs
  • LLM cost management across foundation model providers
  • native integrations with CrewAI, AG2, Agno and LangGraph
  • self host the dashboard and API backend

Requirements

  • An AgentOps API key passed to agentops.init

Cost: Open source with a paid cloud option

Install

Derived from the published package name in the repository, not from a model.

Video walkthroughs

Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.

What the repository ships

Has testsHas docsHas examplesCI configured

Detected from the actual files in the repository root.

Latest release 0.4.21

Published 2025-08-29

What's Changed

  • add back lib by @areibman in https://github.com/AgentOps-AI/agentops/pull/1222
  • updated gitignore by @areibman in https://github.com/AgentOps-AI/agentops/pull/1223
  • new screenshots by @areibman in https://github.com/AgentOps-AI/agentops/pull/1224
  • feat(sync): sync OSS distribution from AgentOps.Next ($(cd ../next-repo && git rev-parse --short HEAD)) by @devin-ai-integration[bot] in https://github.com/AgentOps-AI/agentops/pull/1226
  • feat(sync): sync documentation updates from AgentOps.Next by @devin-ai-integration[bot] in https://github.com/AgentOps-AI/agentops/pull/1227
  • docs(app): Add Beginner Quickstart and troubleshooting to run full-stack locally by @devin-ai-integration[bot] in https://github.com/AgentOps-AI/agentops/pull/1228
  • Add working Haystack example, wire into CI, and update docs by @devin-ai-integration[bot] in https://github.com/AgentOps-AI/agentops/pull/1230
  • feat(haystack): auto-instrument Haystack 2.x generators incl. AzureOpenAIChatGenerator; add Azure example + docs by @devin-ai-integration[bot] in https://github.com/AgentOps-AI/agentops/pull/1231
  • Update pyproject.toml by @areibman in https://github.com/AgentOps-AI/agentops/pull/1232

Full Changelog: https://github.com/AgentOps-AI/agentops/compare/0.4.20...0.4.21

Tags

README

<div align="center">

<a href="https://agentops.ai?ref=gh">

<img src="docs/images/external/logo/github-banner.png" alt="Logo">

</a>

</div>

<div align="center">

<em>Observability and DevTool platform for AI Agents</em>

</div>

<br />

<div align="center">

<a href="https://pepy.tech/project/agentops">

<img src="https://static.pepy.tech/badge/agentops/month" alt="Downloads">

</a>

<a href="https://github.com/agentops-ai/agentops/issues">

<img src="https://img.shields.io/github/commit-activity/m/agentops-ai/agentops" alt="git commit activity">

</a>

<img src="https://img.shields.io/pypi/v/agentops?&color=3670A0" alt="PyPI - Version">

<a href="https://opensource.org/licenses/MIT">

<img src="https://img.shields.io/badge/License-MIT-yellow.svg?&color=3670A0" alt="License: MIT">

</a>

<a href="https://smithery.ai/server/@AgentOps-AI/agentops-mcp">

<img src="https://smithery.ai/badge/@AgentOps-AI/agentops-mcp"/>

</a>

</div>

<p align="center">

<a href="https://twitter.com/agentopsai/">

<img src="https://img.shields.io/twitter/follow/agentopsai?style=social" alt="Twitter" style="height: 20px;">

</a>

<a href="https://discord.gg/FagdcwwXRR">

<img src="https://img.shields.io/badge/discord-7289da.svg?style=flat-square&logo=discord" alt="Discord" style="height: 20px;">

</a>

<a href="https://app.agentops.ai/?ref=gh">

<img src="https://img.shields.io/badge/Dashboard-blue.svg?style=flat-square" alt="Dashboard" style="height: 20px;">

</a>

<a href="https://docs.agentops.ai/introduction">

<img src="https://img.shields.io/badge/Documentation-orange.svg?style=flat-square" alt="Documentation" style="height: 20px;">

</a>

<a href="https://entelligence.ai/AgentOps-AI&agentops">

<img src="https://img.shields.io/badge/Chat%20with%20Docs-green.svg?style=flat-square" alt="Chat with Docs" style="height: 20px;">

</a>

</p>

<div align="center">

<video src="https://github.com/user-attachments/assets/dfb4fa8d-d8c4-4965-9ff6-5b8514c1c22f" width="650" autoplay loop muted></video>

</div>

<br/>

AgentOps helps developers build, evaluate, and monitor AI agents. From prototype to production.

Open Source

The AgentOps app is open source under the MIT license. Explore the code in our app directory.

Key Integrations 🔌

<div align="center" style="background-color: white; padding: 20px; border-radius: 10px; margin: 0 auto; max-width: 800px;">

<div style="display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; margin-bottom: 20px;">

<a href="https://docs.agentops.ai/v2/integrations/openai_agents_python"><img src="docs/images/external/openai/agents-sdk.svg" height="45" alt="OpenAI Agents SDK"></a>

<a href="https://docs.agentops.ai/v1/integrations/crewai"><img src="docs/v1/img/docs-icons/crew-banner.png" height="45" alt="CrewAI"></a>

<a href="https://docs.ag2.ai/docs/ecosystem/agentops"><img src="docs/images/external/ag2/ag2-logo.svg" height="45" alt="AG2 (AutoGen)"></a>

<a href="https://docs.agentops.ai/v1/integrations/microsoft"><img src="docs/images/external/microsoft/microsoft_logo.svg" height="45" alt="Microsoft"></a>

</div>

<div style="display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; margin-bottom: 20px;">

<a href="https://docs.agentops.ai/v1/integrations/langchain"><img src="docs/images/external/langchain/langchain-logo.svg" height="45" alt="LangChain"></a>

<a href="https://docs.agentops.ai/v1/integrations/camel"><img src="docs/images/external/camel/camel.png" height="45" alt="Camel AI"></a>

<a href="https://docs.llamaindex.ai/en/stable/module_guides/observability/?h=agentops#agentops"><img src="docs/images/external/ollama/ollama-icon.png" height="45" alt="LlamaIndex"></a>

<a href="https://docs.agentops.ai/v1/integrations/cohere"><img src="docs/images/external/cohere/cohere-logo.svg" height="45" alt="Cohere"></a>

</div>

</div>

| | |

| ------------------------------------- | ------------------------------------------------------------- |

| 📊 Replay Analytics and Debugging | Step-by-step agent execution graphs |

| 💸 LLM Cost Management | Track spend with LLM foundation model providers |

| 🤝 Framework Integrations | Native Integrations with CrewAI, AG2 (AutoGen), Agno, LangGraph, & more |

| ⚒️ Self-Host | Want to run AgentOps on your own cloud? You're covered |

Quick Start ⌨️


pip install agentops
Session replays in 2 lines of code

Initialize the AgentOps client and automatically get analytics on all your LLM calls.

Get an API key


import agentops

# Beginning of your program (i.e. main.py, __init__.py)
agentops.init( < INSERT YOUR API KEY HERE >)

...

# End of program
agentops.end_session('Success')

All your sessions can be viewed on the AgentOps dashboard

<br/>

Self-Hosting

Looking to run the full AgentOps app (Dashboard + API backend) on your machine? Follow the setup guide in app/README.md:

  • Run the App and Backend (Dashboard + API)

<details>

<summary>Agent Debugging</summary>

<a href="https://app.agentops.ai?ref=gh">

<img src="docs/images/external/app_screenshots/session-drilldown-metadata.png" style="width: 90%;" alt="Agent Metadata"/>

</a>

<a href="https://app.agentops.ai?ref=gh">

<img src="docs/images/external/app_screenshots/chat-viewer.png" style="width: 90%;" alt="Chat Viewer"/>

</a>

<a href="https://app.agentops.ai?ref=gh">

<img src="docs/images/external/app_screenshots/session-drilldown-graphs.png" style="width: 90%;" alt="Event Graphs"/>

</a>

</details>

<details>

<summary>Session Replays</summary>

<a href="https://app.agentops.ai?ref=gh">

<img src="docs/images/external/app_screenshots/session-replay.png" style="width: 90%;" alt="Session Replays"/>

</a>

</details>

<details>

<summary>Summary Analytics</summary>

<a href="https://app.agentops.ai?ref=gh">

<img src="docs/images/external/app_screenshots/overview.png" style="width: 90%;" alt="Summary Analytics"/>

</a>

<a href="https://app.agentops.ai?ref=gh">

<img src="docs/images/external/app_screenshots/overview-charts.png" style="width: 90%;" alt="Summary Analytics Charts"/>

</a>

</details>

First class Developer Experience

Add powerful observability to your agents, tools, and functions with as little code as possible: one line at a time.

<br/>

Refer to our documentation


# Create a session span (root for all other spans)
from agentops.sdk.decorators import session

@session
def my_workflow():
    # Your session code here
    return result

# Create an agent span for tracking agent operations
from agentops.sdk.decorators import agent

@agent
class MyAgent:
    def __init__(self, name):
        self.name = name

    # Agent methods here

# Create operation/task spans for tracking specific operations
from agentops.sdk.decorators import operation, task

@operation  # or @task
def process_data(data):
    # Process the data
    return result

# Create workflow spans for tracking multi-operation workflows
from agentops.sdk.decorators import workflow

@workflow
def my_workflow(data):
    # Workflow implementation
    return result

# Nest decorators for proper span hierarchy
from agentops.sdk.decorators import session, agent, operation

@agent
class MyAgent:
    @operation
    def nested_operation(self, message):
        return f"Processed: {message}"

    @operation
    def main_operation(self):
        result = self.nested_operation("test message")
        return result

@session
def my_session():
    agent = MyAgent()
    return agent.main_operation()

All decorators support:

  • Input/Output Recording
  • Exception Handling
  • Async/await functions
  • Generator functions
  • Custom attributes and names

Integrations 🦾

OpenAI Agents SDK 🖇️

Build multi-agent systems with tools, handoffs, and guardrails. AgentOps natively integrates with the OpenAI Agents SDKs for both Python and TypeScript.

Python

pip install openai-agents
TypeScript

npm install agentops @openai/agents

CrewAI 🛶

Build Crew agents with observability in just 2 lines of code. Simply set an AGENTOPS_API_KEY in your environment, and your crews will get automatic monitoring on the AgentOps dashboard.


pip install 'crewai[agentops]'

AG2 🤖

With only two lines of code, add full observability and monitoring to AG2 (formerly AutoGen) agents. Set an AGENTOPS_API_KEY in your environment and call agentops.init()

Camel AI 🐪

Track and analyze CAMEL agents with full observability. Set an AGENTOPS_API_KEY in your environment and initialize AgentOps to get started.

<details>

<summary>Installation</summary>


pip install "camel-ai[all]==0.2.11"
pip install agentops

import os
import agentops
from camel.agents import ChatAgent
from camel.messages import BaseMessage
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType

# Initialize AgentOps
agentops.init(os.getenv("AGENTOPS_API_KEY"), tags=["CAMEL Example"])

# Import toolkits after AgentOps init for tracking
from camel.toolkits import SearchToolkit

# Set up the agent with search tools
sys_msg = BaseMessage.make_assistant_message(
    role_name='Tools calling operator',
    content='You are a helpful assistant'
)

# Configure tools and model
tools = [*SearchToolkit().get_tools()]
model = ModelFactory.create(
    model_platform=ModelPlatformType.OPENAI,
    model_type=ModelType.GPT_4O_MINI,
)

# Create and run the agent
camel_agent = ChatAgent(
    system_message=sys_msg,
    model=model,
    tools=tools,
)

response = camel_agent.step("What is AgentOps?")
print(response)

agentops.end_session("Success")

Check out our Camel integration guide for more examples including multi-agent scenarios.

</details>

Langchain 🦜🔗

AgentOps works seamlessly with applications built using Langchain. To use the handler, install Langchain as an optional dependency:

<details>

<summary>Installation</summary>


pip install agentops[langchain]

To use the handler, import and set


import os
from langchain.chat_models import ChatOpenAI
from langchain.agents import initialize_agent, AgentType
from agentops.integration.callbacks.langchain import LangchainCallbackHandler

AGENTOPS_API_KEY = os.environ['AGENTOPS_API_KEY']
handler = LangchainCallbackHandler(api_key=AGENTOPS_API_KEY, tags=['Langchain Example'])

llm = ChatOpenAI(openai_api_key=OPENAI_API_KEY,
                 callbacks=[handler],
                 model='gpt-3.5-turbo')

agent = initialize_agent(tools,
                         llm,
                         agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION,
                         verbose=True,
                         callbacks=[handler], # You must pass in a callback handler to record your agent
                         handle_parsing_errors=True)

Check out the Langchain Examples Notebook for more details including Async handlers.

</details>

Cohere ⌨️

First class support for Cohere(>=5.4.0). This is a living integration, should you need any added functionality please message us on Discord!

<details>

<summary>Installation</summary>


pip install cohere

import cohere
import agentops

# Beginning of program's code (i.e. main.py, __init__.py)
agentops.init(<INSERT YOUR API KEY HERE>)
co = cohere.Client()

chat = co.chat(
    message="Is it pronounced ceaux-hear or co-hehray?"
)

print(chat)

agentops.end_session('Success')

import cohere
import agentops

# Beginning of program's code (i.e. main.py, __init__.py)
agentops.init(<INSERT YOUR API KEY HERE>)

co = cohere.Client()

stream = co.chat_stream(
    message="Write me a haiku about the synergies between Cohere and AgentOps"
)

for event in stream:
    if event.event_type == "text-generation":
        print(event.text, end='')

agentops.end_session('Success')

</details>

Anthropic ﹨

Track agents built with the Anthropic Python SDK (>=0.32.0).

<details>

<summary>Installation</summary>

`

Truncated. Read the full README on GitHub ↗

Related tools