Documentation
Configuring Google Vertex AI#
Google Vertex AI is supported for Gemini and Anthropic models.
- Create the Google Application Default Credentials file and store it in a Kubernetes Secret. If your credentials are in a different location, update the filepath.
kubectl create secret generic kagent-google-creds -n kagent --from-file=~/.config/gcloud/application_default_credentials.json
- For Gemini models: create a ModelConfig resource using the
GeminiVertexAI
provider that references the secret and key name, and specify the Gemini model you want to use. Note theprojectID
andlocation
are required:
apiVersion: kagent.dev/v1alpha2kind: ModelConfigmetadata:name: gemini-model-config-vertexainamespace: kagentspec:apiKeySecret: kagent-google-credsapiKeySecretKey: google_creds.jsonmodel: gemini-2.0-flash-liteprovider: GeminiVertexAIgeminiVertexAI:projectID: kagent-devlocation: us-west1maxOutputTokens: 1000
- For Anthropic models: create a ModelConfig resource using the
AnthropicVertexAI
provider that references the secret and key name, and specify the Anthropic model you want to use. Note theprojectID
andlocation
are required:
apiVersion: kagent.dev/v1alpha2kind: ModelConfigmetadata:name: anthropic-model-config-vertexainamespace: kagentspec:apiKeySecret: kagent-google-credsapiKeySecretKey: google_creds.jsonmodel: claude-sonnet-4@20250514provider: AnthropicVertexAIanthropicVertexAI:projectID: kagent-devlocation: us-east5
Kagent Lab: Discover kagent and kmcp
Free, on‑demand lab: build custom AI agents with kagent and integrate tools via kmcp on Kubernetes.