Google Provider
Complete guide to using Google Gemini with Reactive Agents, including configuration, authentication, and advanced features
Reactive Agents provides seamless integration with Google's Vertex AI API, supporting Gemini models for chat completions, multimodal tasks, and advanced AI applications.
Authentication & Configuration
Setup
- Get your Google Cloud API key from Google Cloud Console
- Add your API key in the Reactive Agents dashboard under AI Providers
- Configure your preferred Gemini models in the Models section
Basic Usage
const response = await fetch('http://localhost:3000/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.BEARER_TOKEN ?? 'reactive-agents'}`,
'Content-Type': 'application/json',
'ra-config': JSON.stringify({
agent_name: 'gemini-agent',
skill_name: 'multimodal',
strategy: { mode: 'single' },
targets: [{ optimization: 'auto' }]
})
},
body: JSON.stringify({
model: 'gemini-1.5-pro',
messages: [
{ role: 'user', content: 'Analyze this image and describe what you see' }
]
})
});Troubleshooting
Authentication Errors (401): Verify your API key is correct and has sufficient credits
Rate Limit Errors (429): Reactive Agents automatically handles retries; consider upgrading your Google Cloud plan
Model Not Found (404): Verify the model name is correct and your account has access
Vertex AI Errors: Ensure vertex_project_id and vertex_region are properly configured