Loading...
Loading...
@copilotkit/react-core — mount CopilotKitProvider in a Next.js App Router / React Router v7 / TanStack Start / SPA app, drop in CopilotChat/CopilotPopup/CopilotSidebar (v2 chat components ship from react-core/v2 — NOT react-ui, which is CSS-only in v2), access and subscribe to agents with useAgent / useAgentContext / useCapabilities, switch between multiple agents, manage durable Intelligence threads with useThreads, register browser-side tools via useFrontendTool, render tool calls with useRenderTool / useComponent / useDefaultRenderTool, gate execution with useHumanInTheLoop, wire file attachments with useAttachments, configure suggestion pills, and register activity- and custom-message renderers. publicLicenseKey is canonical (publicApiKey is deprecated alias). Load the reference under references/ that matches your task.
npx skill4agent add copilotkit/copilotkit react-core@copilotkit/react-corereferences/CopilotKitProvider"use client"runtimeUrlpublicLicenseKeyheaderscredentialspropertiesonErrordebugshowDevConsoleCopilotChatCopilotPopupCopilotSidebarCopilotChatViewCopilotChatInputCopilotChatMessageView@copilotkit/react-core/v2CopilotPaneluseAgentuseFrontendTooluseRenderTool{ agentId }| Task | Reference |
|---|---|
Mount | |
Drop in | |
File / image attachments via | |
Client-side debug tooling — | |
Read / subscribe to an agent ( | |
Feature-gate UI on declared agent capabilities ( | |
Build a multi-agent UI (per-panel | |
List / rename / archive / delete durable Intelligence threads ( | |
Register browser-side tools ( | |
Render per-tool UI ( | |
Gate tool execution behind user approval ( | |
Configure dynamic or static suggestion pills ( | |
Render non-chat activity messages ( | |
Inject custom UI before/after specific messages ( | |
publicLicenseKeypublicApiKeyagents__unsafe_dev_onlyselfManagedAgentspackages/a2ui-rendererspa-without-runtimeCopilotPanelreact-core/v2react-uireact-uiuseAgents()copilotkit.subscribe({ onAgentsChanged })useRenderToolCalluseRenderTooluseComponentuseDefaultRenderToolrenderclient-side-toolsrendering-tool-callshuman-in-the-loopstatus'inProgress' | 'executing' | 'complete'Partial<T>useHumanInTheLooprespond(result)respondundefinedExecutinguseThreads'Runtime URL is not configured'v1 → v2useCopilotActionuseFrontendTooluseHumanInTheLoopimageUploadsEnabledattachmentsv1-to-v2-migrationprovider-setupchat-componentsagent-accessclient-side-toolsrendering-tool-calls