Track operations and LLM calls in your agent applications.
AgentOps makes it easy to track operations and interactions in your AI applications with minimal setup.
The simplest way to get started with AgentOps is to initialize it at the beginning of your application:
That’s it! This single line of code will:
You can also set a custom trace name during initialization:
AgentOps automatically instruments calls to popular LLM providers without requiring any additional code:
This works with many popular LLM providers including:
For more detailed tracking, AgentOps provides decorators that allow you to explicitly instrument your code. This is optional but can provide more context in the dashboard.
@operation
DecoratorThe @operation
decorator helps track specific operations in your application:
@agent
DecoratorIf you use agent classes, you can track them with the @agent
decorator:
@tool
DecoratorTrack tool usage and costs with the @tool
decorator. You can specify costs to get total cost tracking directly in your dashboard summary:
@trace
DecoratorCreate custom traces to group related operations using the @trace
decorator. This is the recommended approach for most applications:
Keep it Simple: For most applications, just initializing AgentOps with agentops.init()
is sufficient.
Use @trace for Custom Workflows: When you need to group operations, use the @trace
decorator instead of manual trace management.
Meaningful Names and Tags: When using decorators, choose descriptive names and relevant tags to make them easier to identify in the dashboard.
Cost Tracking: Use the @tool
decorator with cost parameters to track tool usage costs in your dashboard.
Track operations and LLM calls in your agent applications.
AgentOps makes it easy to track operations and interactions in your AI applications with minimal setup.
The simplest way to get started with AgentOps is to initialize it at the beginning of your application:
That’s it! This single line of code will:
You can also set a custom trace name during initialization:
AgentOps automatically instruments calls to popular LLM providers without requiring any additional code:
This works with many popular LLM providers including:
For more detailed tracking, AgentOps provides decorators that allow you to explicitly instrument your code. This is optional but can provide more context in the dashboard.
@operation
DecoratorThe @operation
decorator helps track specific operations in your application:
@agent
DecoratorIf you use agent classes, you can track them with the @agent
decorator:
@tool
DecoratorTrack tool usage and costs with the @tool
decorator. You can specify costs to get total cost tracking directly in your dashboard summary:
@trace
DecoratorCreate custom traces to group related operations using the @trace
decorator. This is the recommended approach for most applications:
Keep it Simple: For most applications, just initializing AgentOps with agentops.init()
is sufficient.
Use @trace for Custom Workflows: When you need to group operations, use the @trace
decorator instead of manual trace management.
Meaningful Names and Tags: When using decorators, choose descriptive names and relevant tags to make them easier to identify in the dashboard.
Cost Tracking: Use the @tool
decorator with cost parameters to track tool usage costs in your dashboard.