What problem does it solve? Building AI-powered chat features with CopilotKit v2 requires knowing the correct hooks, components, and runtime setup across its React, Core, and Runtime packages. This Skill provides the exact API patterns, code examples, and reference documentation needed to wire up agents, tools, and chat UIs correctly on the first attempt. ## Core Features & Use Cases - Chat UI Setup: Add CopilotChat, CopilotPopup, or CopilotSidebar components connected to an agent via CopilotKitProvider. - Agent Interaction APIs: Register frontend tools with useFrontendTool, share app state with useAgentContext, handle interrupts with useInterrupt, and build approval flows with useHumanInTheLoop. - Runtime Configuration: Stand up CopilotRuntime endpoints in Next.js (Hono) or Express, with middleware, CORS, and Intelligence platform threads. - Use Case: You need the agent to render a custom chart in chat when it calls a tool. Use the useRenderTool pattern from this Skill to register a renderer keyed to the tool name with status-based UI. ## Quick Start Ask the agent to add a CopilotKit sidebar chat connected to your agent and register a frontend tool it can call.