# 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. ## Install Save as a script file and run: ## Quick Use ```bash pip install agentops ``` ```python 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](https://github.com/AgentOps-AI). Licensed under MIT. > [AgentOps-AI/agentops](https://github.com/AgentOps-AI/agentops) — 5,400+ GitHub stars --- Source: https://tokrepo.com/en/workflows/d570c84f-4e22-4723-806a-d23710686a5c Author: Script Depot