Skip to content

Latest commit

Β 

History

16,700 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FavIcon

CopilotKit

Build agent-native applications β€” on any framework, on any surface.

Generative UI, shared state, and human-in-the-loop workflows for React, Angular, Vue, React Native, and in Slack and Microsoft Teams.

Add CopilotKit Intelligence when it goes to production: rich threads that persist with generative UI, user memories, and agents that automatically learn from real use.

Bring Your Own Agent. Any Channel. β€” CopilotKit and AG-UI connect any agent framework to Slack, Microsoft Teams, Discord, WhatsApp, and Telegram, with more channels on the roadmap.



What is CopilotKit?

CopilotKit is a best-in-class SDK for building full-stack agentic applications, Generative UI, and chat applications.

What started as a React library is now the horizontal layer between your agents and your users: the same agent can power your web app, your mobile app, and your team's Slack or Microsoft Teams workspace.

We are the company behind the AG-UI Protocol β€” adopted by Google, LangChain, AWS, Microsoft, Mastra, PydanticAI, and more!

Quick Start

Setup with your coding agent

Use your coding agent to add CopilotKit to your app. It will inspect your project and guide the integration.

Give your coding agent this prompt:

Help me get started with CopilotKit. From the root of my project, run this
command and follow the instructions:

npx --yes copilotkit@latest onboard start

Want to use our agent skills?

Already using CopilotKit or just finished setup? Add our agent skills to help your coding agent build features and debug issues.

npx copilotkit@latest skills install

Start a new project

Scaffolds a project in its own directory. It does not modify an app you already have.

npx copilotkit@latest create
cpk-cli.mp4

What you can build

Whole.Generative.UI.v5.mp4

Features:

  • Chat UI – A fully customizable chat interface that supports message streaming, tool calls, and agent responses.
  • Backend Tool Rendering – Enables agents to call backend tools that return UI components rendered directly in the client.
  • Generative UI – Allows agents to generate and update UI components dynamically at runtime based on user intent and agent state.
  • Shared State – A synchronized state layer that both agents and UI components can read from and write to in real time.
  • Human-in-the-Loop – Lets agents pause execution to request user input, confirmation, or edits before continuing.
  • Rich Threads – Conversations that survive reloads, devices, and sessions, with their generative UI intact.
  • Automatic Learning – Agents that improve from real usage: completed threads become reviewed Skills, with no fine-tuning pipeline.

πŸͺ CopilotKit Intelligence

CopilotKit Intelligence adds rich threads with generative UI, user memories, product analytics, inspection, and automatic learning to your agents. It works with your existing CopilotKit app and agent framework. Use our hosted platform or deploy it in your own infrastructure.

  • Rich Threads – Conversations survive reloads, devices, and sessions, with messages, generative UI, and live runs restored as they were.
  • User Memories – Durable facts and preferences carried across conversations, recalled semantically rather than by keyword.
  • Automatic Learning – Completed threads become evidence-backed Insights and reviewed, reusable Skills you publish yourself. No fine-tuning pipeline.
  • Product Analytics – See what your agents do and where users get value, from the same interaction data.
  • Self-hosting – The same platform inside your own Kubernetes cluster, VPC, or data boundary.

See the Intelligence overview for what each plan includes.

πŸ‘‰ Connect Intelligence in 5 minutes β†’

How it works

CopilotKit connects your UI, agents, and tools into a single interaction loop.

How CopilotKit connects your UI, your agents, and your tools in one loop

This enables:

  • Agents that ask users for input
  • Tools that render UI
  • Stateful workflows across steps and sessions
  • One agent, deployed across web, mobile, and chat platforms

🧩 Works With Your Stack

One agent backend. Every frontend.

Platform Status Get Started
βš›οΈ React / Next.js βœ… GA Quickstart
πŸ…°οΈ Angular βœ… Supported Source Code & Quickstart
πŸ’š Vue βœ… Supported Source Code - Quickstart coming soon
πŸ“± React Native βœ… Supported Quickstart
πŸ’¬ Slack / Microsoft Teams βœ… Supported Channels Β· Quickstart
πŸ’¬ Discord / WhatsApp / Telegram βœ… Channels SDK adapter (managed connection coming soon) Channels
πŸ”œ Google Chat / iMessage / SMS 🟑 On the roadmap Channels

Your agent logic stays the same β€” AG-UI handles the wire protocol, CopilotKit handles the UI layer for each framework and channel.

πŸ’¬ Channels: One Agent, Every Chat App

Write it once, run every channel

The Channels SDK takes the agent you already built and drops it into the chat apps your users live in β€” same tools, same shared state, same human-in-the-loop, no rewrite (Learn more).

  • Slack – Agents as first-class Slack apps: threads, tool calls, and human-in-the-loop approvals right in the channel.
  • Microsoft Teams – Bring agentic workflows to the enterprise, where your org already lives.

πŸ‘‰ Explore Channels β†’

⭐️ useAgent Hook

The useAgent hook sits directly on AG-UI, giving you full programmatic control over the agent connection.

// Programmatically access and control your agents
const { agent } = useAgent({ agentId: "my_agent" });

// Render and update your agent's state
return <div>
  <h1>{agent.state.city}</h1>
  <button onClick={() => agent.setState({ city: "NYC" })}>
    Set City
  </button>
</div>

Check out the useAgent docs to learn more.

CopilotKit.UseAgent.Graphic.Motion_2.mp4

Generative UI

Generative UI is a core CopilotKit pattern that allows agents to dynamically render UI as part of their workflow.

demo-generative-ui.mp4

Compare the Three Types

The three generative UI types compared

Explore:

Generative UI educational repo β†’

πŸ–₯️ AG-UI: The Agent–User Interaction Protocol

Connect agent workflows to user-facing apps, with deep partnerships and 1st-party integrations across the agentic stackβ€”including LangChain, CrewAI, Mastra, PydanticAI, and more.

AG-UI

Start a new AG-UI agent app:

npx create-ag-ui-app my-agent-app

Learn more in the AG-UI README β†’

🀝 Community

Have questions or need help?

Join our Discord β†’
Read the Docs β†’
Try CopilotKit Intelligence β†’

Stay up to date with our latest releases!

Follow us on LinkedIn β†’
Follow us on X β†’

πŸ™‹πŸ½β€β™‚οΈ Contributing

Thanks for your interest in contributing to CopilotKit! πŸ’œ

We value all contributions, whether it's through code, documentation, creating demo apps, or just spreading the word.

Here are a few useful resources to help you get started:

πŸ“„ License

This repository's source code is available under the MIT License.

About

The Frontend Stack for Agents & Generative UI. React, Angular, Mobile, Slack, and more. Makers of the AG-UI Protocol

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

37.4k stars

Watchers

184 watching

Forks

Releases

Used by

Contributors

Languages