# https://github.com/CopilotKit/CopilotKit Project Manual

Generated at: 2026-07-21 19:38:03 UTC

## Table of Contents

- [Repository Overview & Monorepo Architecture](#overview-monorepo)
- [Multi-Platform Frontend Adapters (React, Angular, Vue, React Native, Slack, Teams)](#framework-adapters)
- [AG-UI Protocol, A2UI & MCP Apps Generative UI](#generative-ui-protocol)
- [Agent Framework Integrations & CopilotKit Intelligence](#agents-intelligence)

<a id='overview-monorepo'></a>

## Repository Overview & Monorepo Architecture

### Related Pages

Related topics: [Multi-Platform Frontend Adapters (React, Angular, Vue, React Native, Slack, Teams)](#framework-adapters), [AG-UI Protocol, A2UI & MCP Apps Generative UI](#generative-ui-protocol), [Agent Framework Integrations & CopilotKit Intelligence](#agents-intelligence)

<details>
<summary>Related Source Files</summary>

The following source files were used to generate this page:

- [README.md](https://github.com/CopilotKit/CopilotKit/blob/main/README.md)
- [package.json](https://github.com/CopilotKit/CopilotKit/blob/main/package.json)
- [nx.json](https://github.com/CopilotKit/CopilotKit/blob/main/nx.json)
- [migrations.json](https://github.com/CopilotKit/CopilotKit/blob/main/migrations.json)
- [AGENTS.md](https://github.com/CopilotKit/CopilotKit/blob/main/AGENTS.md)
- [CLAUDE.md](https://github.com/CopilotKit/CopilotKit/blob/main/CLAUDE.md)
</details>

# Repository Overview & Monorepo Architecture

CopilotKit is the open-source framework for integrating production-grade AI copilots into applications. The repository is structured as a multi-language, multi-package monorepo that delivers client SDKs (React, Vue, React Native, Angular), a server runtime, and a Python SDK from a single source tree. Source: [README.md:1-20]().

## Purpose and Scope

The framework provides three coordinated layers that ship from the same repository:

- **Frontend SDKs** — pre-built chat UI and React hooks for embedding copilots in web and mobile apps (`@copilotkit/react-core`, `@copilotkit/react-ui`, `@copilotkit/react-native`, `@copilotkit/vue-core`, `@copilotkit/angular`).
- **Runtime / Backend** — the `@copilotkit/runtime` server, which brokers requests between the UI and the underlying agent or LLM and exposes endpoints such as the AG-UI and A2UI streaming APIs.
- **Python SDK** — `copilotkit` on PyPI, which mirrors the runtime's contract for Python-defined agents (e.g., LangGraph, Google ADK).

The headline release v1.60.0 also debuts a new `@copilotkit/bot` family — a platform-agnostic bot engine, a cross-platform JSX UI runtime, and a Slack platform adapter — alongside the AG-UI `A2UIToolParams` single-arg API on `@ag-ui` 0.0.56, indicating the monorepo is expanding horizontally rather than vertically. Source: [README.md:40-80]().

## Monorepo Structure and Package Topology

The repository is a pnpm/Turborepo-style workspace orchestrated by Nx. The root `package.json` declares workspace globs, while `nx.json` configures task pipelines, caching, and dependency graphs for the dozens of first-party packages. Source: [package.json:1-40]().

A representative package topology looks like this:

| Layer | Package | Role |
| --- | --- | --- |
| Core SDK | `@copilotkit/react-core`, `@copilotkit/vue-core` | Headless hooks, state, action/action-list plumbing |
| UI SDK | `@copilotkit/react-ui`, `@copilotkit/react-native` | `CopilotChat`, `CopilotModal`, `useRenderTool`, `Markdown` |
| Server | `@copilotkit/runtime` | Node/server runtime, AG-UI + A2UI endpoints, telemetry |
| Bots | `@copilotkit/bot` (v1.60.0+) | Platform-agnostic bot engine + JSX UI runtime |
| Language SDK | `copilotkit` (Python) | Agent-side helpers for LangGraph, ADK, MCP Apps |
| Tooling | `sdk-js`, `sdk-py` | Shared build/release scripts across JS and Py |

Source: [package.json:60-200]().

The patch cadence on the `1.59` line (v1.59.0 → v1.59.5) shows coordinated cross-package versioning: fixes land simultaneously in `@copilotkit/react-core`, `@copilotkit/react-ui`, `@copilotkit/runtime`, and `copilotkit` on PyPI, which is only feasible because every package lives in one tree. Source: [README.md:100-150]().

## Build Orchestration and Release Pipeline

Nx is the task runner. `nx.json` defines affected-aware commands, so a change under `packages/runtime` only rebuilds downstream consumers; `migrations.json` ships as Nx-generated upgrade recipes that downstream apps apply when bumping CopilotKit. Source: [nx.json:1-60]().

Releases flow through a single OIDC-backed workflow that was consolidated in v1.59.0, replacing separate prerelease/stable pipelines. Each minor line ships:

1. Coordinated JS package bumps on the same `1.x` SemVer line (e.g., v1.60.0).
2. A paired Python SDK tag, currently `python-sdk/v0.1.93`, published to PyPI.
3. Optional platform tags such as `angular/v0.2.0` for first-party Angular distribution.

Source: [migrations.json:1-40](); Source: [README.md:150-220]().

## Cross-Cutting Concerns and Community Signals

Several recurring community requests map directly onto the monorepo's package boundaries:

- **Vue parity** — issue #1169 ("Support for Vue") drove the `@copilotkit/vue-core` package; the v1.59.2 release notes explicitly state tool-call rendering was hardened across React *and* Vue from the same codebase.
- **React Native parity** — issue #1892 ("React Native | React Native Web | Metro | Expo") was closed in v1.58.0 when pre-built UI for `@copilotkit/react-native` shipped alongside the existing web SDK.
- **Google ADK support** — issue #1856 maps to the Python SDK side, exercised through the runtime's agent adapters.
- **AG-UI integration** — issue #2186 is the most engaged request; it is being addressed through the runtime's AG-UI endpoint and the new `A2UIToolParams` API.
- **File uploads** — issue #1756 surfaces in both the React UI package and the runtime's multipart handling.

Two contributor guides, `AGENTS.md` and `CLAUDE.md`, document the conventions for adding or modifying packages inside this monorepo — including dependency direction (UI packages never depend on the runtime), shared tooling entry points, and how to regenerate `migrations.json` when adding a new Nx project. Source: [AGENTS.md:1-60](); Source: [CLAUDE.md:1-60]().

## Architectural Summary

The monorepo's defining property is that every layer of the copilot stack — UI, runtime, agent SDK, and now bots — is co-versioned and co-released from one repository. This makes framework-wide invariants (header propagation in v1.57.4, A2UI tool injection in v1.59.4, thread-routing fixes in v1.59.1) ship as a single coherent unit rather than as fragmented package updates. Source: [README.md:200-260](); Source: [package.json:200-260]().

---

<a id='framework-adapters'></a>

## Multi-Platform Frontend Adapters (React, Angular, Vue, React Native, Slack, Teams)

### Related Pages

Related topics: [Repository Overview & Monorepo Architecture](#overview-monorepo), [AG-UI Protocol, A2UI & MCP Apps Generative UI](#generative-ui-protocol), [Agent Framework Integrations & CopilotKit Intelligence](#agents-intelligence)

<details>
<summary>Related Source Files</summary>

The following source files were used to generate this page:

- [packages/react-core/src/components/copilot-provider.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/react-core/src/components/copilot-provider.tsx)
- [packages/react-ui/src/components/chat/Chat.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/react-ui/src/components/chat/Chat.tsx)
- [packages/angular/src/lib/copilotkit.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/angular/src/lib/copilotkit.ts)
- [packages/angular/src/lib/components/chat/copilot-chat-view.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/angular/src/lib/components/chat/copilot-chat-view.ts)
- [packages/angular/src/lib/agent.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/angular/src/lib/agent.ts)
- [examples/v2/vue/demo/app.vue](https://github.com/CopilotKit/CopilotKit/blob/main/examples/v2/vue/demo/app.vue)
- [examples/v2/vue/demo/pages/index.vue](https://github.com/CopilotKit/CopilotKit/blob/main/examples/v2/vue/demo/pages/index.vue)
- [packages/react-native/src/components/chat/CopilotChat.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/react-native/src/components/chat/CopilotChat.tsx)
- [examples/v2/react-native/demo/App.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/examples/v2/react-native/demo/App.tsx)
- [packages/bot/src/index.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/bot/src/index.ts)
- [packages/bot/src/slack/index.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/bot/src/slack/index.ts)
- [packages/bot/src/ui/runtime.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/bot/src/ui/runtime.tsx)
</details>

# Multi-Platform Frontend Adapters (React, Angular, Vue, React Native, Slack, Teams)

CopilotKit is shipped as a family of platform-specific frontend adapters that share one backend runtime and one agent protocol. Each adapter wraps the same `CopilotRuntime` HTTP surface in idiomatic primitives for its host framework, so an agent authored once on the server can be exposed to React, Angular, Vue, React Native, or chat platforms like Slack without re-implementing the transport layer. Source: [packages/react-core/src/components/copilot-provider.tsx:1-40]() and [packages/angular/src/lib/copilotkit.ts:1-60]().

## Adapter Family Overview

The adapter layer sits between an agent-enabled backend (`@copilotkit/runtime` or the Python SDK) and a host application. Adapters differ only in how they expose the underlying message, tool, and state streams; the wire format and protocol are constant. Source: [packages/react-ui/src/components/chat/Chat.tsx:1-80]().

| Adapter | Package | Status | Primary Use Case |
|---|---|---|---|
| React | `@copilotkit/react-core`, `@copilotkit/react-ui` | Stable, reference implementation | Web apps using React |
| Angular | `@copilotkit/angular` (`angular/v0.2.0`) | Active | Angular 17+ standalone apps |
| Vue | Vue demo under `examples/v2/vue` | Preview | Nuxt/Vue 3 SFC apps |
| React Native | `@copilotkit/react-native` | Stable since v1.58.0 | iOS/Android via Metro/Expo |
| Slack | `@copilotkit/bot/slack` | New in v1.60.0 | Slack workspaces |
| Teams | `@copilotkit/bot` (planned) | Roadmap | Microsoft Teams |

The community has explicitly asked for several of these surfaces: a Vue adapter ([#1169](https://github.com/CopilotKit/CopilotKit/issues/1169), 9 comments), React Native + Metro + Expo coverage ([#1892](https://github.com/CopilotKit/CopilotKit/issues/1892), 7 comments), and a direct AG-UI bridge that several adapters consume ([#2186](https://github.com/CopilotKit/CopilotKit/issues/2186), 29 comments). The current package set is the result of those threads.

## React and React Native

The React adapter is the reference implementation and is split into a headless core (`react-core`) and a styled UI package (`react-ui`). The provider wraps the app and binds hooks to the runtime transport. Source: [packages/react-core/src/components/copilot-provider.tsx:40-120]().

```tsx
<CopilotKit runtimeUrl="/api/copilotkit" agent="my_agent">
  <CopilotChat />
</CopilotKit>
```

`react-ui` ships pre-built components such as `CopilotChat`, `CopilotModal`, the `useRenderTool` hook, and a streaming `Markdown` renderer. Source: [packages/react-ui/src/components/chat/Chat.tsx:80-200]().

React Native parity was the headline of v1.58.0: `CopilotChat`, `CopilotModal`, `useRenderTool`, and a streaming `Markdown` component were added so React Native is no longer a headless-only target. Source: [packages/react-native/src/components/chat/CopilotChat.tsx:1-90](). The community-reported gap ([#1892](https://github.com/CopilotKit/CopilotKit/issues/1892)) was closed by that release. Example wiring for an Expo app is in the v2 demo. Source: [examples/v2/react-native/demo/App.tsx:1-60]().

## Angular and Vue

The Angular adapter exposes the same primitives through Angular signals and standalone components. The runtime client is created in a service and bound through an injection root. Source: [packages/angular/src/lib/copilotkit.ts:1-90]().

```ts
provideCopilotKit({ runtimeUrl: '/api/copilotkit', agent: 'my_agent' })
```

Chat UI is a standalone component (`CopilotChatView`) that reads messages and tool calls from the injected client, mirroring the React `CopilotChat` API. Source: [packages/angular/src/lib/components/chat/copilot-chat-view.ts:1-120](). Agent directives live alongside the runtime client. Source: [packages/angular/src/lib/agent.ts:1-80](). The Angular line ships as `angular/v0.2.0` and continues to iterate alongside the React 1.59.x line.

Vue has no first-party package yet, but v1.59.2 hardened the built-in tool-call rendering path "across React and Vue," and a Vue demo exists under `examples/v2/vue` showing how to mount the runtime client inside a Vue SFC. Source: [examples/v2/vue/demo/app.vue:1-80]() and [examples/v2/vue/demo/pages/index.vue:1-60](). The outstanding Vue request ([#1169](https://github.com/CopilotKit/CopilotKit/issues/1169)) tracks promotion of this demo into a published package.

## `@copilotkit/bot`: Chat Platform Adapters

The `@copilotkit/bot` family, introduced in v1.60.0, is a platform-agnostic bot engine: a JSX UI runtime that is not tied to a DOM, plus platform adapters that translate inbound messages into the same runtime protocol used by the web adapters. Source: [packages/bot/src/index.ts:1-60]() and [packages/bot/src/ui/runtime.tsx:1-100]().

The first platform adapter is Slack, which maps Slack events to the runtime's message envelope and renders bot replies through the shared JSX runtime. Source: [packages/bot/src/slack/index.ts:1-80](). Because the bot engine consumes the same runtime transport as the React/Angular/Vue adapters, an agent and its tools work unchanged when re-targeted from a web chat to a Slack channel. The same architecture is the basis for the planned Microsoft Teams adapter.

## Cross-Adapter Consistency

All adapters funnel into the same `@copilotkit/runtime` HTTP endpoint, which is why release notes for the 1.59.x line frequently describe fixes that apply "across React and Vue" or "across the JS and Python SDK helpers." Header propagation, manual tool-call IDs, and thread routing are normalized in the runtime, not in each adapter. Source: [packages/react-core/src/components/copilot-provider.tsx:120-200](), [packages/angular/src/lib/copilotkit.ts:60-140](), and [packages/bot/src/slack/index.ts:80-160]().

```mermaid
flowchart LR
  A[Agent<br/>Python or JS] --> R[CopilotRuntime]
  R --> RC[react-core]
  R --> AN[angular]
  R --> VUE[Vue demo]
  R --> RN[react-native]
  R --> BOT[bot engine]
  BOT --> SLACK[Slack adapter]
  BOT --> TEAMS[Teams adapter]
```

For developers, the practical implication is that picking an adapter is a host-framework decision, not a protocol decision: agent code, tools, and runtime configuration are reused as the application moves between web, mobile, and chat surfaces.

---

<a id='generative-ui-protocol'></a>

## AG-UI Protocol, A2UI & MCP Apps Generative UI

### Related Pages

Related topics: [Repository Overview & Monorepo Architecture](#overview-monorepo), [Multi-Platform Frontend Adapters (React, Angular, Vue, React Native, Slack, Teams)](#framework-adapters), [Agent Framework Integrations & CopilotKit Intelligence](#agents-intelligence)

<details>
<summary>Related Source Files</summary>

The following source files were used to generate this page:

- [packages/a2ui-renderer/src/index.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/a2ui-renderer/src/index.ts)
- [packages/a2ui-renderer/src/a2ui-types.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/a2ui-renderer/src/a2ui-types.ts)
- [packages/a2ui-renderer/src/react-renderer/core/A2UIRenderer.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/a2ui-renderer/src/react-renderer/core/A2UIRenderer.tsx)
- [packages/a2ui-renderer/src/react-renderer/core/A2UIProvider.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/a2ui-renderer/src/react-renderer/core/A2UIProvider.tsx)
- [packages/a2ui-renderer/src/react-renderer/create-catalog.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/a2ui-renderer/src/react-renderer/create-catalog.tsx)
- [packages/a2ui-renderer/src/react-renderer/a2ui-react/A2uiSurface.tsx](https://github.com/CopilotKit/CopilotKit/blob/main/packages/a2ui-renderer/src/react-renderer/a2ui-react/A2uiSurface.tsx)
- [packages/runtime/src/lib/a2ui/a2ui-handler.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/runtime/src/lib/a2ui/a2ui-handler.ts)
- [packages/runtime/src/lib/mcp-apps/mcp-apps-handler.ts](https://github.com/CopilotKit/CopilotKit/blob/main/packages/runtime/src/lib/mcp-apps/mcp-apps-handler.ts)
</details>

# AG-UI Protocol, A2UI & MCP Apps Generative UI

## Overview

CopilotKit ships three cooperating subsystems that bring **generative, agent-driven UI** into chat experiences: the **AG-UI protocol**, the **A2UI (Agent-to-UI) renderer**, and **MCP Apps**. Together they let a remote agent stream structured UI descriptions (component trees, data, and actions) over a streaming endpoint, render them inside the host application's chat surface, and react to user input back to the agent. The community's most-trafficked feature request ([#2186](https://github.com/CopilotKit/CopilotKit/issues/2186), 29 comments) explicitly asks for tighter AG-UI ↔ CopilotKit integration, and recent minor releases on the `1.59`/`1.60` lines have been converging on that goal. Source: [packages/a2ui-renderer/src/index.ts]()

The A2UI renderer package exposes a React renderer that consumes an agent-issued UI catalog, resolves a component tree from a `surfaceUpdate` stream, and binds user interactions back into the agent's tool-call protocol. The runtime package hosts the matching server-side handlers that translate agent output into the protocol streams the renderer expects. Source: [packages/a2ui-renderer/src/react-renderer/core/A2UIRenderer.tsx]()

## A2UI Renderer Architecture

The A2UI renderer is organized as a thin core wrapped by a React adapter. `A2UIRenderer` is the platform-agnostic engine that ingests an `A2UIMessage`-shaped stream from `A2UIProvider` and produces a resolved component tree, while `A2uiSurface` is the React-specific mount point that hosts the tree inside a host conversation. Source: [packages/a2ui-renderer/src/react-renderer/core/A2UIRenderer.tsx]()

`A2UIProvider` wires the renderer into a CopilotKit chat session: it registers the A2UI catalog, listens for tool calls that carry `A2UIToolParams`, and pushes each incremental `surfaceUpdate` delta into the renderer's internal buffer. `createCatalog` is the helper consumers use to declare which A2UI primitives (text, button, form, card, etc.) the application supports; only components listed in the catalog may be instantiated. Source: [packages/a2ui-renderer/src/react-renderer/create-catalog.tsx]() and [packages/a2ui-renderer/src/react-renderer/core/A2UIProvider.tsx]()

```mermaid
flowchart LR
  Agent[Remote Agent] -->|A2UI tool call| Runtime[Runtime A2UI Handler]
  Runtime -->|surfaceUpdate stream| Provider[A2UIProvider]
  Provider -->|deltas| Renderer[A2UIRenderer core]
  Renderer -->|resolved tree| Surface[A2uiSurface]
  Surface -->|user events| Provider
  Provider -->|tool result| Runtime
```

The v1.60 release aligned this pipeline with the upstream `@ag-ui` `0.0.56` `A2UIToolParams` single-argument API, simplifying the shape consumed in `A2UIProvider`. v1.59.5 added improved recovery when partial `surfaceUpdate`s arrive after a reconnect, so the React chat surface reconciles cleanly instead of resetting the assistant message. Source: [packages/a2ui-renderer/src/a2ui-types.ts]()

## AG-UI Protocol Integration

AG-UI is the streaming transport CopilotKit uses for agent ↔ chat communication. On the runtime side, the A2UI handler parses incoming tool invocations, validates the payload against `A2UIToolParams`, and proxies events through the AG-UI event bus so any subscribed React provider (including `A2UIProvider`) reacts to them in real time. Source: [packages/runtime/src/lib/a2ui/a2ui-handler.ts]()

The renderer is decoupled from the transport: `A2UIRenderer` only knows about a sequence of `surfaceUpdate` deltas, so the same engine can be fed from AG-UI today and from alternative transports (e.g., the new `@copilotkit/bot` Slack adapter introduced in v1.60) without a renderer change. This is the architectural payoff that the [#2186](https://github.com/CopilotKit/CopilotKit/issues/2186) request explicitly asks to consolidate. Source: [packages/a2ui-renderer/src/react-renderer/a2ui-react/A2uiSurface.tsx]()

v1.59.4 introduced an opt-in flag that automatically injects the A2UI tool into LangGraph agents via middleware, so LangGraph-built agents do not need manual tool registration to participate in generative UI. Combined with the deterministic tool-call IDs added in v1.59.0, this yields a stable contract across refresh, reconnect, and human-in-the-loop interrupt scenarios that trigger UI re-renders. Source: [packages/a2ui-renderer/src/index.ts]()

## MCP Apps Generative UI

MCP Apps (Model Context Protocol "Apps") is a parallel protocol path for generative UI, where the UI surface is described by an MCP server's tool schema rather than streamed through AG-UI. The runtime handles these separately so that the two transports can coexist inside a single CopilotKit session. Source: [packages/runtime/src/lib/mcp-apps/mcp-apps-handler.ts]()

The MCP Apps handler converts an MCP tool's JSON-Schema output into the same `A2UIMessage`-compatible deltas the renderer expects, with Zod-4-aware schema repair applied as documented in the v1.59.0 release notes. The repaired schema is then handed to `A2UIRenderer` through `A2UIProvider` exactly as an AG-UI-sourced surface would be, so the React chat surface renders MCP Apps with no additional renderer code. Source: [packages/a2ui-renderer/src/react-renderer/core/A2UIProvider.tsx]()

User interactions inside an MCP-App-rendered component follow the same outbound tool-call contract as A2UI, which is why the v1.59.0 deterministic tool-call IDs (covering both JS and Python SDK helpers) are valuable here: they let the runtime correlate a click in an MCP Apps card back to its originating tool invocation even after a chat re-mount. Source: [packages/runtime/src/lib/mcp-apps/mcp-apps-handler.ts]()

---

<a id='agents-intelligence'></a>

## Agent Framework Integrations & CopilotKit Intelligence

### Related Pages

Related topics: [Repository Overview & Monorepo Architecture](#overview-monorepo), [Multi-Platform Frontend Adapters (React, Angular, Vue, React Native, Slack, Teams)](#framework-adapters), [AG-UI Protocol, A2UI & MCP Apps Generative UI](#generative-ui-protocol)

<details>
<summary>Related Source Files</summary>

The following source files were used to generate this page:

- [examples/integrations/langgraph-python/agent/agent.py](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/langgraph-python/agent/agent.py)
- [examples/integrations/langgraph-js/agent/src/agent.ts](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/langgraph-js/agent/src/agent.ts)
- [examples/integrations/langgraph-fastapi/agent/main.py](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/langgraph-fastapi/agent/main.py)
- [examples/integrations/adk/agent/main.py](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/adk/agent/main.py)
- [examples/integrations/crewai-crews/agent/src/latest_ai_development/crew.py](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/crewai-crews/agent/src/latest_ai_development/crew.py)
- [examples/integrations/crewai-flows/agent/src/agent.py](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/crewai-flows/agent/src/agent.py)
- [examples/integrations/ag-ui/agent/src/agent.ts](https://github.com/CopilotKit/CopilotKit/blob/main/examples/integrations/ag-ui/agent/src/agent.ts)
</details>

# Agent Framework Integrations & CopilotKit Intelligence

CopilotKit ships first-class adapters for popular agent frameworks so that a single CopilotKit runtime can serve agents written in LangGraph (Python and JavaScript), CrewAI (Crews and Flows), Google ADK, and AG-UI. Each adapter normalizes the framework's native message and tool-call protocol into CopilotKit's frontend-facing event stream, letting React, Vue, React Native, and Angular UIs talk to any supported backend without rewriting client code. On top of that transport layer, CopilotKit Intelligence adds persistent threads, learning annotations, deterministic thread titles, and human-in-the-loop (HITL) interrupt handling that span every integration. Source: [examples/integrations/langgraph-python/agent/agent.py]()

## Supported Agent Frameworks

The integration examples under `examples/integrations/` demonstrate the canonical wiring for each backend:

- **LangGraph (Python)** – A stateful graph exported from `agent.py`, mounted behind CopilotKit's runtime. The Python SDK wraps it with the `LangGraphAgent` helper that forwards `x-*` headers and exposes interrupts. Source: [examples/integrations/langgraph-python/agent/agent.py]()
- **LangGraph (JavaScript)** – A parallel JS example built with `@langchain/langgraph` and `@copilotkit/sdk-js`, exporting a compiled graph from `agent.ts`. Source: [examples/integrations/langgraph-js/agent/src/agent.ts]()
- **LangGraph + FastAPI** – A standalone FastAPI service that hosts the LangGraph agent, useful when the runtime must live outside the Next.js/Node process. Source: [examples/integrations/langgraph-fastapi/agent/main.py]()
- **CrewAI (Crews)** – A multi-agent crew defined in `crew.py`, executed through CopilotKit's CrewAI adapter which forwards tool calls and stream step events. Source: [examples/integrations/crewai-crews/agent/src/latest_ai_development/crew.py]()
- **CrewAI (Flows)** – A Flow-based example that demonstrates long-running, stateful orchestration. Source: [examples/integrations/crewai-flows/agent/src/agent.py]()
- **Google ADK** – A community-driven integration (see issue #1856) that hosts an ADK agent and exposes it through CopilotKit's HTTP bridge. Source: [examples/integrations/adk/agent/main.py]()
- **AG-UI** – A direct integration request tracked in issue #2186; an example is included alongside the AG-UI `A2UIToolParams` single-arg API shipped with `@ag-ui` 0.0.56. Source: [examples/integrations/ag-ui/agent/src/agent.ts]()

| Framework | Language | Adapter Surface | Notable v1.5x Behavior |
|---|---|---|---|
| LangGraph | Python + JS | `LangGraphAgent`, header propagation, interrupt resume | Deterministic manual tool-call IDs, explicit-thread routing (v1.59.0) |
| CrewAI | Python | Crew + Flow adapters | Stable tool-call render path across React/Vue (v1.59.2) |
| Google ADK | Python | HTTP bridge | Requested in #1856 |
| AG-UI | TypeScript | A2UI tool injection via LangGraph middleware | `A2UIToolParams` API in v1.60.0 |

## CopilotKit Intelligence

CopilotKit Intelligence is a runtime-side enhancement layer that turns ordinary chat threads into persistent, learning-aware conversations. It is activated per-agent and adds:

- **Persistent threads** with deterministic, generated titles (title generation regression closed in v1.59.3).
- **Persistent chat indicator** while an Intelligence run is in progress (v1.59.4).
- **Learning annotations** with the first client/runtime pieces landing in v1.59.4.
- **A2UI tool injection** through LangGraph middleware (opt-in, v1.59.4) and improved A2UI recovery rendering (v1.59.5).
- **Same-thread HITL interrupts** with Enter-key resume routed through the send path (v1.59.3, regression fix in v1.59.2).
- **Closed-beta user-memory configuration** documented for self-hosted runtimes (v1.57.4).

Intelligence runs reuse the same adapters as standard agent runs; the runtime differentiates them by thread metadata so an existing LangGraph, CrewAI, or ADK agent does not need to be re-wired to participate. Source: [examples/integrations/langgraph-python/agent/agent.py]()

## Cross-Platform UI Layer

The integration examples assume a CopilotKit-aware UI on the frontend. The release line v1.58.0 closed the React Native parity gap by shipping `CopilotChat`, `CopilotModal`, `useRenderTool`, and a streaming `Markdown` component, so the same LangGraph or CrewAI backend can power a web, native, or Angular app (latest Angular release: `angular/v0.2.0`). Vue support was requested in issue #1169 and is partially available through the hardened tool-call rendering path (v1.59.2). Stable chat UI test IDs added in v1.59.2 let e2e tests assert against messages regardless of which agent framework produced them.

```mermaid
flowchart LR
  UI[React / Vue / RN / Angular UI] -->|CopilotKit protocol| Runtime[CopilotKit Runtime]
  Runtime -->|Intelligence layer| Intel[(Persistent threads + annotations)]
  Runtime --> LG[LangGraph Adapter]
  Runtime --> CR[CrewAI Adapter]
  Runtime --> ADK[Google ADK Bridge]
  Runtime --> AGUI[AG-UI Adapter]
  LG --> LGAgent[(LangGraph Agent)]
  CR --> CRAgent[(CrewAI Crew / Flow)]
  ADK --> ADKAgent[(ADK Agent)]
  AGUI --> AGUIAgent[(AG-UI Agent)]
```

## Community Signals

The integration roadmap is largely shaped by community requests. AG-UI integration is the highest-engagement feature request (#2186, 29 comments), Google ADK support (#1856, 12 comments) and native file uploads (#1756, 12 comments) follow, while React Native parity (#1892) shipped in v1.58.0. A `LangGraphAgent` header-propagation gap that silently dropped forwarded `x-*` headers was closed in v1.57.4, underscoring the importance of header fidelity for framework adapters that sit behind the runtime.

---

<!-- evidence_pipeline_checked: true -->
<!-- evidence_injected: true -->

---

## Pitfall Log

Project: CopilotKit/CopilotKit

Summary: Found 21 structured pitfall item(s), including 4 high/blocking item(s). Top priority: Maintenance risk - Maintenance risk requires verification.

## 1. Maintenance risk - Maintenance risk requires verification

- Severity: high
- Evidence strength: source_linked
- Finding: Project evidence flags a maintenance risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/CopilotKit/CopilotKit/issues/6090

## 2. Maintenance risk - Maintenance risk requires verification

- Severity: high
- Evidence strength: source_linked
- Finding: Project evidence flags a maintenance risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/CopilotKit/CopilotKit/issues/2005

## 3. Maintenance risk - Maintenance risk requires verification

- Severity: high
- Evidence strength: source_linked
- Finding: Project evidence flags a maintenance risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/CopilotKit/CopilotKit/issues/2011

## 4. Security or permission risk - Security or permission risk requires verification

- Severity: high
- Evidence strength: source_linked
- Finding: Project evidence flags a security or permission risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: community_evidence:github | https://github.com/CopilotKit/CopilotKit/issues/592

## 5. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.57.4
- User impact: Upgrade or migration may change expected behavior: v1.57.4
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.57.4

## 6. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.58.0
- User impact: Upgrade or migration may change expected behavior: v1.58.0
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.58.0

## 7. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.59.0
- User impact: Upgrade or migration may change expected behavior: v1.59.0
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.59.0

## 8. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.59.1
- User impact: Upgrade or migration may change expected behavior: v1.59.1
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.59.1

## 9. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.59.2
- User impact: Upgrade or migration may change expected behavior: v1.59.2
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.59.2

## 10. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.59.3
- User impact: Upgrade or migration may change expected behavior: v1.59.3
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.59.3

## 11. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.59.4
- User impact: Upgrade or migration may change expected behavior: v1.59.4
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.59.4

## 12. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.59.5
- User impact: Upgrade or migration may change expected behavior: v1.59.5
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.59.5

## 13. Installation risk - Installation risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Developers should check this installation risk before relying on the project: v1.60.0
- User impact: Upgrade or migration may change expected behavior: v1.60.0
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/v1.60.0

## 14. Configuration risk - Configuration risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Project evidence flags a configuration risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.host_targets | https://github.com/CopilotKit/CopilotKit

## 15. Capability evidence risk - Capability evidence risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: README/documentation is current enough for a first validation pass.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: capability.assumptions | https://github.com/CopilotKit/CopilotKit

## 16. Maintenance risk - Maintenance risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: Project evidence flags a maintenance risk. Review the linked source before relying on this workflow.
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/CopilotKit/CopilotKit

## 17. Security or permission risk - Security or permission risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: no_demo
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: downstream_validation.risk_items | https://github.com/CopilotKit/CopilotKit

## 18. Security or permission risk - Security or permission risk requires verification

- Severity: medium
- Evidence strength: source_linked
- Finding: no_demo
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: risks.scoring_risks | https://github.com/CopilotKit/CopilotKit

## 19. Maintenance risk - Maintenance risk requires verification

- Severity: low
- Evidence strength: source_linked
- Finding: issue_or_pr_quality=unknown。
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/CopilotKit/CopilotKit

## 20. Maintenance risk - Maintenance risk requires verification

- Severity: low
- Evidence strength: source_linked
- Finding: release_recency=unknown。
- User impact: May increase setup, validation, or first-run risk for the user.
- Evidence: evidence.maintainer_signals | https://github.com/CopilotKit/CopilotKit

## 21. Maintenance risk - Maintenance risk requires verification

- Severity: low
- Evidence strength: source_linked
- Finding: Developers should check this maintenance risk before relying on the project: python-sdk/v0.1.93
- User impact: Upgrade or migration may change expected behavior: python-sdk/v0.1.93
- Evidence: failure_mode_cluster:github_release | https://github.com/CopilotKit/CopilotKit/releases/tag/python-sdk/v0.1.93

<!-- canonical_name: CopilotKit/CopilotKit; human_manual_source: deepwiki_human_wiki -->
