# CopilotKit

> Add in-app AI copilots and agent-driven generative UI to React and beyond

- Category: App UIs & Builders / Generative UI SDKs
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/CopilotKit/CopilotKit
- Website: https://copilotkit.ai
- Canonical page: https://ai-tldr.dev/tools/copilotkit/

## In short

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 sits in the Generative UI SDKs category of the App UIs & Builders tools and is open-source, written in TypeScript and licensed MIT.

## 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.).

1. 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.

```bash
npx copilotkit@latest create
```

2. Add 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.

```bash
npx copilotkit@latest skills install
```

3. Follow 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.

## 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
