A2UI Launched: Full CopilotKit support at launch!

A2UI Launched: CopilotKit has partnered with Google to deliver full support in both CopilotKit and AG-UI!

Check it out
LogoLogo
  • Overview
  • Integrations
  • API Reference
  • Copilot Cloud
Slanted end borderSlanted end border
Slanted start borderSlanted start border
  • API Reference
  • UI Components
  • CopilotTextarea
  • CopilotKit
  • Hooks
  • useAgent
  • useDefaultTool
  • useFrontendTool
  • useRenderToolCall
  • useHumanInTheLoop
  • useCopilotReadable
  • useCopilotAdditionalInstructions
  • useCopilotChat
  • useCopilotChatHeadless_c
  • useCopilotChatSuggestions
  • useCoAgent
  • useCoAgentStateRender
  • useLangGraphInterrupt
  • useCopilotAction
  • Classes
  • CopilotRuntime
  • CopilotTask
  • SDKs
LLM Adapters

GoogleGenerativeAIAdapter

Copilot Runtime adapter for Google Generative AI (e.g. Gemini).

Copilot Runtime adapter for Google Generative AI (e.g. Gemini).

Example

import { CopilotRuntime, GoogleGenerativeAIAdapter } from "@copilotkit/runtime";
const { GoogleGenerativeAI } = require("@google/generative-ai");
 
const genAI = new GoogleGenerativeAI(process.env["GOOGLE_API_KEY"]);
 
const copilotKit = new CopilotRuntime();
 
return new GoogleGenerativeAIAdapter({ model: "gemini-2.5-flash", apiVersion: "v1" });

Constructor Parameters

modelstring

A custom Google Generative AI model to use.

apiVersion'v1' | 'v1beta'

The API version to use (e.g. "v1" or "v1beta"). Defaults to "v1".

apiKeystring

The API key to use.

PREV
GroqAdapter
Slanted end borderSlanted end border
Slanted start borderSlanted start border
NEXT
CopilotTask

On this page

Example
Constructor Parameters