Skip to main content
AgentOps provides seamless integration with Anthropic’s Python SDK, allowing you to track and analyze all your Claude model interactions automatically.

Installation

Setting Up API Keys

Before using Anthropic with AgentOps, you need to set up your API keys. You can obtain: Then to set them up, you can either export them as environment variables or set them in a .env file.
Then load the environment variables in your Python code:

Usage

Initialize AgentOps at the beginning of your application to automatically track all Anthropic API calls:

Examples

More Examples

Understanding Tools

Claude integration with tool usage and advanced features

Sync Example

Shows synchronous calls with the Anthropic SDK.

Async Example

Demonstrates asynchronous calls with the Anthropic SDK.