copilotkit-develop

Builds CopilotKit v2 chat interfaces, frontend tools, and runtime endpoints for React applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Integrating AI agents into a React application requires wiring up runtimes, chat components, frontend tools, and interrupt handling across multiple CopilotKit v2 packages, and this Skill provides the exact API patterns and code templates to do it correctly. ## Core Features & Use Cases - Runtime Setup: Create CopilotRuntime endpoints with Hono or Express, register LangGraph agents, and configure middleware, CORS, and transcription. - Chat UI & Tools: Add CopilotChat, CopilotPopup, or CopilotSidebar components, register frontend tools with useFrontendTool, and share app state via useAgentContext. - Interrupts & Rendering: Handle agent interrupts with useInterrupt, build human-in-the-loop approvals with useHumanInTheLoop, and render tool calls with useRenderTool. - Use Case: Add a sidebar chat to a Next.js app that lets an agent highlight spreadsheet cells in the browser and ask the user for approval before executing destructive actions. ## Quick Start Add a CopilotKit sidebar chat connected to my LangGraph agent and register a frontend tool the agent can call in the browser.

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, then render CopilotChat, CopilotPopup, or CopilotSidebar with an agentId. The provider connects to your CopilotRuntime endpoint and the chat component handles message submission and streaming.

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

Use the useFrontendTool hook with a name, description, Zod parameters schema, and a handler function. The agent invokes the tool in the browser, and the handler receives the validated arguments plus a context with the tool call and agent instance.

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

Create a route file that instantiates CopilotRuntime with your agents, then call createCopilotEndpoint with a basePath and export app.fetch as the GET and POST handlers. The endpoint exposes agent run, stop, transcribe, and thread routes.

Does CopilotKit v2 support human-in-the-loop approvals?▼

Yes, useHumanInTheLoop registers a tool that pauses agent execution until the user responds. Its render component receives a respond callback during the executing phase, letting you show approve and reject options before the agent continues.

How do I handle agent interrupts in CopilotKit?▼

Use the useInterrupt hook with a render function that receives the interrupt event and a resolve callback. Call resolve with the user's response to resume the agent, and optionally filter interrupts with the enabled option.

Can I customize CopilotKit chat text and labels?▼

Yes, pass a labels prop to CopilotChat with values like chatInputPlaceholder, welcomeMessageText, and modalHeaderTitle. Layout slots such as input, messageView, and welcomeScreen can also be replaced with custom components.