Overview
CopilotKit is an open-source SDK for building full-stack agentic applications, generative UI, and chat features into your product. It started as a React library and now spans multiple frontends, including React/Next.js, Angular, Vue, and React Native, with the same agent backend powering each surface.
It is aimed at frontend and full-stack developers who want to connect an LLM-driven agent to their UI. CopilotKit handles the UI layer (chat, streaming, tool-call rendering, shared state), while the AG-UI protocol it maintains handles the wire format between your agent and the app.
In the generative-UI category, it fits where you need agents to render and update real UI components at runtime, pause for user confirmation, and read or write shared state, rather than just returning plain chat text.
What it does
- Customizable chat UI with message streaming, tool-call rendering, and agent responses
- Generative UI: agents create and update UI components dynamically at runtime based on user intent and agent state
- Backend tool rendering, so agents can call backend tools that return UI components shown in the client
- Shared state layer that both agents and UI components read from and write to in real time
- Human-in-the-loop: agents can pause to request user input, confirmation, or edits before continuing
- Multi-framework support (React/Next.js, Angular, Vue, React Native) and integrations beyond the browser such as Slack and Microsoft Teams (beta)
Getting started
You can scaffold a CopilotKit app in a few minutes; all you need is an LLM API key (OpenAI, Anthropic, Gemini, etc.).
Create a project
Run the create command, which sets up the core packages, configures the provider, connects the agent to the UI, and leaves the app deployment-ready.
npx copilotkit@latest createAdd the agent skills (optional)
Install CopilotKit's agent skills into your project so your coding agent (Claude Code, Cursor, Codex, Gemini, and others) knows how to set up, build with, and debug CopilotKit. Re-run it any time to refresh to the latest skills.
npx copilotkit@latest skills installFollow the framework quickstart
Use the docs quickstart for your platform (React/Next.js is GA; Angular, Vue, and React Native are supported) to wire up the provider, chat UI, and your agent.
Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Add an in-app AI copilot or assistant chat panel to an existing React or Next.js application
- Build generative UI where an agent renders and updates real components (forms, cards, dashboards) at runtime
- Create human-in-the-loop workflows where the agent pauses for user approval or edits before acting
- Reuse one agent backend across web, mobile (React Native), and team chat tools like Slack or Microsoft Teams
How CopilotKit compares
CopilotKit alongside other open-source generative ui sdks tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| CopilotKit | ★ 35.3k | Add in-app AI copilots and agent-driven generative UI to React and beyond |
| Vercel AI SDK | ★ 25k | A TypeScript toolkit for building AI apps and agents that includes streaming helpers and generative-UI features for rendering model output as React components. |
| OpenUI | ★ 22.4k | OpenUI lets you describe a UI in plain language, see it rendered live, ask for changes, and convert the result to React, Svelte, or Web Components. |
| AG-UI Protocol | ★ 14.3k | An open protocol that standardizes how AI agents stream events and UI to frontend applications, with SDKs across multiple languages and frameworks. |
| Tambo | ★ 11.2k | A generative UI SDK for React where you register components with Zod schemas and an agent picks the right one and streams its props to the user. |
| assistant-ui | ★ 10.7k | A TypeScript/React library of composable chat primitives for building AI chat apps that can render tool calls and JSON as interactive React components. |
| OpenUI (Thesys) | ★ 7.1k | An open standard and runtime for generative UI that uses a compact streaming language to let models emit interactive charts, forms, tables, and cards. |