What problem does it solve? Building AI-powered features with CopilotKit v2 requires knowing the correct hooks, components, and runtime setup across its three-layer architecture (runtime, core, React). This Skill provides the exact API patterns and workflow steps so you avoid misusing hooks, misconfiguring endpoints, or wiring agents incorrectly. ## Core Features & Use Cases - Chat UI Setup: Add CopilotChat, CopilotPopup, or CopilotSidebar interfaces connected to agents via CopilotKitProvider. - Agent Interaction Hooks: Register frontend tools with useFrontendTool, share app state with useAgentContext, handle interrupts with useInterrupt, and build human-in-the-loop approvals with useHumanInTheLoop. - Runtime Configuration: Stand up CopilotRuntime endpoints in Next.js (Hono) or Express with middleware, CORS, and Intelligence platform threads. - Use Case: You are adding an AI assistant to a Next.js dashboard. Use this Skill to create the /api/copilotkit route with a LangGraphAgent, wrap the app in CopilotKitProvider, register a setTheme frontend tool, and render a sidebar chat. ## Quick Start Use the copilotkit-develop skill to add a CopilotSidebar chat connected to a LangGraph agent in my Next.js app.