copilotkit-develop

Implements CopilotKit v2 chat interfaces, frontend tools, and runtime endpoints in React applications.

Updated May 9, 2026
One-click install
npx skills add https://github.com/SebastienGt/LivingMargin-Google-Deepmind-Hackathon --skill copilotkit-develop-sebastiengt
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: copilotkit-develop
Source: https://github.com/SebastienGt/LivingMargin-Google-Deepmind-Hackathon/tree/main/.cursor/skills/copilotkit-develop
Command: npx skills add https://github.com/SebastienGt/LivingMargin-Google-Deepmind-Hackathon --skill copilotkit-develop-sebastiengt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @copilotkit/react, @copilotkit/runtime, @ag-ui/langgraph, zod, and includes references (resource) components.

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.

Frequently Asked Questions about copilotkit-develop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a CopilotKit chat interface to a React app?▼

Wrap your app in CopilotKitProvider with a runtimeUrl pointing to your endpoint, then render CopilotChat, CopilotPopup, or CopilotSidebar with an agentId. The provider handles the connection to the runtime and agent.

How do I register a frontend tool the CopilotKit agent can call?▼

Use the useFrontendTool hook with a name, description, a Zod parameters schema, and a handler function. The agent can then invoke the tool in the browser, and the hook re-registers when the name, availability, or dependencies change.

How do I set up a CopilotKit runtime endpoint in Next.js?▼

Create app/api/copilotkit/[[...path]]/route.ts, instantiate CopilotRuntime with your agents, call createCopilotEndpoint with basePath /api/copilotkit, and export app.fetch as the GET, POST, PATCH, and DELETE handlers.

Does CopilotKit v2 support Express servers?▼

Yes, createCopilotEndpointExpress returns an Express router with all CopilotKit routes mounted under your basePath. Mount it with app.use() after creating a CopilotRuntime with your agents.

How do I handle agent interrupts for human approval in CopilotKit?▼

Use useInterrupt with a render function that receives the interrupt event and a resolve callback, or useHumanInTheLoop for a tool that pauses execution until the user responds via a rendered UI with a respond callback.

Can I customize CopilotKit chat text and labels?▼

Yes, pass a labels prop to CopilotChat with keys like chatInputPlaceholder, welcomeMessageText, and modalHeaderTitle. Slot-based props also let you replace sub-components such as the input, message view, and welcome screen.