Agent Tracking with AgentOps
Use AgentOps to simplify the development process and monitor your agents in production.
AgentOps provides session replays, metrics, and monitoring for AI agents.
At a high level, AgentOps gives you the ability to monitor LLM calls, costs, latency, agent failures, multi-agent interactions, tool usage, session-wide statistics, and more. For more info, check out the AgentOps Repo.
Overview Dashboard
Session Replays
Adding AgentOps to an existing Autogen service.
To get started, you’ll need to install the AgentOps package and set an API key.
AgentOps automatically configures itself when it’s initialized meaning your agent run data will be tracked and logged to your AgentOps account right away.
Some extra dependencies are needed for this notebook, which can be installed via pip:
For more information, please refer to the installation guide.
Set an API key
By default, the AgentOps init()
function will look for an environment
variable named AGENTOPS_API_KEY
. Alternatively, you can pass one in as
an optional parameter.
Create an account and obtain an API key at AgentOps.ai
Autogen will now start automatically tracking - LLM prompts and completions - Token usage and costs - Agent names and actions - Correspondence between agents - Tool usage - Errors
Simple Chat Example
You can view data on this run at app.agentops.ai.
The dashboard will display LLM events for each message sent by each agent, including those made by the human user.
Tool Example
AgentOps also tracks when Autogen agents use tools. You can find more information on this example in tool-use.ipynb
You can see your run in action at
app.agentops.ai. In this example, the
AgentOps dashboard will show: - Agents talking to each other - Each use
of the calculator
tool - Each call to OpenAI for LLM use