Understanding the fundamental concepts of AgentOps
AgentOps is designed to provide comprehensive monitoring and analytics for AI agent workflows with minimal implementation effort. The SDK follows these key design principles:
After calling agentops.init()
, the SDK automatically identifies installed LLM providers and instruments their API calls. This allows AgentOps to capture interactions between your code and the LLM providers to collect data for your dashboard without requiring manual instrumentation for every call.
The decorators system allows you to add tracing to your existing functions and classes with minimal code changes. Decorators create hierarchical spans that provide a structured view of your agent’s operations for monitoring and analysis.
AgentOps is built on OpenTelemetry, a widely-adopted standard for observability instrumentation. This provides a robust and standardized approach to collecting, processing, and exporting telemetry data.
A Session represents a single user interaction with your agent. When you initialize AgentOps using the init
function, a session is automatically created for you:
By default, all events and API calls will be associated with this session. For more advanced use cases, you can control session creation manually:
In AgentOps, activities are organized into a hierarchical structure of spans:
This hierarchy creates a complete trace of your agent’s execution:
An Agent represents a component in your application that performs tasks. You can create and track agents using the @agent
decorator:
AgentOps automatically tracks LLM API calls from supported providers, collecting valuable information like:
Tags help you organize and filter your sessions. You can add tags when initializing AgentOps or when starting a session:
AgentOps automatically collects basic information about the environment where your agent is running:
The AgentOps dashboard provides several ways to visualize and analyze your agent’s performance:
A typical implementation looks like this:
Understanding the fundamental concepts of AgentOps
AgentOps is designed to provide comprehensive monitoring and analytics for AI agent workflows with minimal implementation effort. The SDK follows these key design principles:
After calling agentops.init()
, the SDK automatically identifies installed LLM providers and instruments their API calls. This allows AgentOps to capture interactions between your code and the LLM providers to collect data for your dashboard without requiring manual instrumentation for every call.
The decorators system allows you to add tracing to your existing functions and classes with minimal code changes. Decorators create hierarchical spans that provide a structured view of your agent’s operations for monitoring and analysis.
AgentOps is built on OpenTelemetry, a widely-adopted standard for observability instrumentation. This provides a robust and standardized approach to collecting, processing, and exporting telemetry data.
A Session represents a single user interaction with your agent. When you initialize AgentOps using the init
function, a session is automatically created for you:
By default, all events and API calls will be associated with this session. For more advanced use cases, you can control session creation manually:
In AgentOps, activities are organized into a hierarchical structure of spans:
This hierarchy creates a complete trace of your agent’s execution:
An Agent represents a component in your application that performs tasks. You can create and track agents using the @agent
decorator:
AgentOps automatically tracks LLM API calls from supported providers, collecting valuable information like:
Tags help you organize and filter your sessions. You can add tags when initializing AgentOps or when starting a session:
AgentOps automatically collects basic information about the environment where your agent is running:
The AgentOps dashboard provides several ways to visualize and analyze your agent’s performance:
A typical implementation looks like this: