CopilotKit + ADK
Bring your ADK agentsinto any app
CopilotKit is an open-source framework that connects your app to ADK agents. Give your agents chat, generative UI, human-in-the-loop, AG-UI Streams, Automatic Learning and more.
QuickstartADK and CopilotKit running together, in the React frontend. Every demo below is the same integration with one capability turned on.
Build with ADK
ADK gives you the agent: tools, sessions and a runner that serves them. What it does not give you is the surface. Somewhere for the conversation to happen, a way to show the run while it is running, and a moment for a person to step in. Each capability below builds on something your agent already does.
Generative UI
Your agent calls tools and updates session state as it runs. CopilotKit streams both to the browser and renders them as React components your users watch update while the agent works.
Human-in-the-loop
AGUIToolset() puts frontend tools in reach of your agent. CopilotKit renders the one that asks for a decision, waits for the user's answer, and hands it back as the tool result.
Shared state
ADK sessions keep state between turns on the server. CopilotKit mirrors it into your app and back, so a user edit and an agent write land in the same place.
Chat surfaces, headless UI, frontend tools and multi-agent flows work with ADK too. And more
Start building
Scaffold a new app with the CLI, or follow the quickstart to connect the ADK agent you already run.
npx copilotkit@latest initConnect your agent
Your agent keeps running as its own Python service, with the AG-UI bridge from ag_ui_adk in front of it. CopilotKit reaches that service over HTTP, so nothing inside the agent changes.
import {
CopilotRuntime,
createCopilotRuntimeHandler,
} from "@copilotkit/runtime/v2";
import { HttpAgent } from "@ag-ui/client";
const runtime = new CopilotRuntime({
agents: {
my_agent: new HttpAgent({ url: process.env.AGENT_URL! }),
},
});
const handler = createCopilotRuntimeHandler({
runtime,
basePath: "/api/copilotkit",
});
export const GET = handler;
export const POST = handler;Already have Google ADK sessions?
When you add a user-facing app to an existing ADK agent, your users may need to open and continue sessions they started elsewhere. CopilotKit Intelligence can import persisted ADK sessions as threads, bringing that history into your CopilotKit app.
The importer supports ADK database session stores and Vertex/Agent Engine session history. In-memory sessions cannot be exported; legacy pickle stores need migration first.
Import the history once. After that, runs that go through CopilotKit sync to Intelligence. If your agent uses a durable session service with enough retention, ADK also keeps saving those runs. This is not a continuous mirror of runs made outside CopilotKit.
Import and synchronize Google ADK sessions for source setup, agent mapping, and thread continuity.
How is this guide?