Documentation

Gemini is Google's AI model family that can be accessed directly through the Google AI Studio API.

Before you begin

Make sure that your Google Cloud account has a project with the Gemini API enabled.

Configuring Gemini

  1. Get your API key from Google AI Studio.

  2. Create a Kubernetes Secret that stores the API key.

    kubectl create secret generic kagent-gemini -n kagent --from-literal GOOGLE_API_KEY=<your_api_key>
  3. Create a ModelConfig resource using the Gemini provider. The following Gemini models are supported:

    • gemini-pro - Text generation with function calling support
    • gemini-pro-vision - Multimodal model for text and image processing
    apiVersion: kagent.dev/v1alpha2
    kind: ModelConfig
    metadata:
    name: gemini-model-config
    namespace: kagent
    spec:
    apiKeySecret: kagent-gemini
    apiKeySecretKey: GOOGLE_API_KEY
    model: gemini-pro
    provider: Gemini
    gemini: {}