Integrations
Google Generative AI
Monitor and analyze your Google Gemini API calls with AgentOps
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:
- GOOGLE_API_KEY: From the Google AI Studio
- AGENTOPS_API_KEY: From your AgentOps Dashboard
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
For more information on using the Google Gen AI SDK, refer to the official documentation.