Bring your Google Antigravity agents
into any app
CopilotKit is an open-source framework that connects your app to Google Antigravity agents. Give your agents chat, generative UI, human-in-the-loop, AG-UI Streams, Automatic Learning and more.
Open your coding agent in your project's folder, or in an empty folder for a new app.This runs in a coding agent on your computer.
Build with Google Antigravity
Antigravity gives you the agent: a harness that runs the model, its tools and its sessions. 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 Python tools run inside the adapter, and their calls and results stream to the browser as they happen. CopilotKit renders each one as a an Angular component instead of leaving the user with a spinner.
Read the docs Live demoHuman-in-the-loop
Antigravity awaits a tool with no timeout, so a frontend tool that asks the user just parks the run. CopilotKit resolves it from the browser once the user decides, and the same turn continues with the answer.
Read the docs Live demoFrontend tools
Every tool your app registers becomes a real Antigravity tool. The model calls it like any other, and the value your handler returns is the result it sees.
Read the docs Live demoShared state and app context (experimental), attachments, reasoning, A2UI and multi-agent flows work with Google Antigravity too. And more
Start building
Connect an existing agent or build a new one. Get a tailored setup prompt.
What are you building?
Tell us what you already have. We’ll tailor your setup.
Connect your agent
Your agent keeps running as its own Python service, with the ag-ui-antigravity adapter in front of it. CopilotKit reaches that service over HTTP, so nothing inside the agent changes.
import { HttpAgent } from "@ag-ui/client";
import {
CopilotRuntime,
createCopilotRuntimeHandler,
} from "@copilotkit/runtime/v2";
import type { NextRequest } from "next/server";
const runtime = new CopilotRuntime({
agents: {
antigravity_agent: new HttpAgent({
url: process.env.AGENT_URL ?? "http://localhost:8000",
}),
},
});
const handler = createCopilotRuntimeHandler({
runtime,
basePath: "/api/copilotkit",
mode: "single-route",
});
export const POST = (req: NextRequest) => handler(req);