CopilotKit

Introduction

Bring your AG2 agents to your users with CopilotKit via AG-UI.


AG2

Bring your AG2 agents to your users

Give your AG2 agents real user-interactivity using CopilotKit and AG-UI. Build rich, interactive, agent-powered applications.

What you can build

Build with AG2

The user-facing primitives every AG2 integration ships with — pick the one that fits your product and drop the code in.

Generative UI

Render your agent's state, progress, outputs, and tool calls with custom UI components in real-time. Bridges the gap between AI agents and user interfaces.

Human in the Loop

Empower users to guide agents at key checkpoints. Combine the best of AI and human judgment for more reliable and controllable agent behavior.

Shared State

Keep your agent and your app in sync. Your agent can see everything in your app, and your app can react to your agent in real-time.

How it fits together

Architecture

The shape of a CopilotKit + AG2 application — from your UI down to the agent runtime.

CopilotKit AG2 architecture diagram
Live example

Run AG2 in your browser

Two patterns we see most often — drive a SaaS workflow, or collaborate on a canvas with your agent.

A traditional SaaS application enhanced with AI agents. These copilots integrate seamlessly into existing workflows, providing intelligent assistance for specific business processes. Perfect for customer service, sales automation, project management, and domain-specific tasks where users need guided, step-by-step AI assistance.

CopilotKit consumes AG-UI protocol events streamed by AG2 over /chat. See the AG2 AG-UI integration docs.