CopilotKit React Core
@copilotkit/react-core is the React frontend half of CopilotKit: it mounts a provider,
speaks AG-UI over SSE to a runtime (or directly to CopilotKit Intelligence in SPA mode), and
exposes hooks for every interaction surface.
This SKILL.md is the index. Read the reference under references/ that matches
your task — do not try to absorb the whole package from this file.
Mental model — three shells you compose
- Provider shell — the
CopilotKitprovider (from@copilotkit/react-core/v2) at or near the root (inside"use client"for Next.js App Router). CarriesruntimeUrl(orpublicLicenseKeyfor SPA),headers,credentials,properties,onError,debug,showDevConsole. - Chat shell —
CopilotChat/CopilotPopup/CopilotSidebaror a composedCopilotChatView+ slot primitives (CopilotChatInput,CopilotChatMessageView, etc.). All chat components ship from@copilotkit/react-core/v2.CopilotPaneldoes not exist — it's a common hallucination. - Hook shell — inside any component under the provider, call
useAgent,useFrontendTool,useRenderTool, etc. Every hook takes optional `{ ag…