CopilotKit review: generative UI and shared app state

Learn how CopilotKit connects agents to React UI through AG-UI, shared state and approval flows, and how the speaker compares it with Vercel AI SDK.

Player not loading? Watch on YouTube

This developer review demonstrates CopilotKit as a frontend stack for apps where an AI agent works with the interface and application state. The presenter scaffolds a project using an installer from its repository, starts development mode and tries the app locally. The demo covers streamed responses, tool calls and rendered components, followed by a request that pauses for user approval.

The explanation centers on AG-UI, an open event-based protocol for communication between agents and frontends. It carries messages, state updates, tool calls and UI events through a common event stream. Generative UI lets an agent trigger components supplied by the app. CoAgents provides shared state in both directions, so user edits can reach the agent and agent updates can appear in the interface. Approval flows let users confirm actions before they proceed.

The presenter describes CopilotKit as more batteries included than Vercel AI SDK, which he considers lighter and better suited to developers who want control over the architecture. He recommends CopilotKit for React or Next.js workflows with shared state, but considers it excessive for basic question-and-answer chat. He also flags the need to check which parts are open source, require keys, use hosted services or cost money. The demonstrated local app does not establish an offline or fully self-hosted deployment.