Skip to main content
AgentOps provides seamless integration with Google’s Generative AI API, allowing you to monitor and analyze all your Gemini model interactions automatically.

Installation

Setting Up API Keys

Before using Google Gemini 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 Gemini API calls.

Examples

Gemini Quickstart Notebook

Basic Gemini usage with AgentOps
For more information on using the Google Gen AI SDK, refer to the official documentation.