copilotkit-debug

Diagnose CopilotKit runtime, agent, streaming, and tool execution failures.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? CopilotKit integrations fail in many opaque ways: the runtime is unreachable, agents never respond, SSE streams stall, frontend tools never execute, or transcription errors appear without context. This Skill provides a structured diagnostic workflow that maps symptoms to root causes using CopilotKit's error code systems and AG-UI event tracing. ## Core Features & Use Cases - Structured Diagnostic Workflow: A five-step process covering information gathering, error code lookup, AG-UI event tracing, root cause identification, and fix verification. - Complete Error Code Catalog: Reference documentation for V1 CopilotKitErrorCode, V2 CopilotKitCoreErrorCode, TranscriptionErrorCode, and Intelligence platform HTTP errors, each with causes and resolutions. - AG-UI Event Tracing: Documented event flow patterns for successful runs, tool calls, state sync, reasoning tokens, and error scenarios to compare against live SSE streams. - Use Case: Your CopilotChat connects but the agent never responds. Follow the "Agent Not Responding" workflow: verify the agent via the /info endpoint, inspect the SSE stream for RunErrorEvent, check the LLM API key, and match the error code against the catalog. ## Quick Start Ask the assistant to diagnose why your CopilotKit agent is not responding or why the runtime connection is failing, providing any error messages from the browser console or server logs.

Frequently Asked Questions about copilotkit-debug

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

FAQPage Schema
How do I debug a CopilotKit agent that is not responding?▼

First verify the agent is registered by querying the /info endpoint, then inspect the SSE stream from the /agent/:id/run request in the browser Network tab. A stream with only RunStartedEvent usually indicates a missing LLM API key or a stalled tool call.

Why does CopilotKit show a runtime connection or 404 error?▼

A 404 means the basePath in createCopilotEndpoint does not match the runtimeUrl in CopilotKitProvider, or the runtime server is not mounted at that path. Connection refused means the server is not running on the expected host and port.

How do I fix CORS errors with the CopilotKit runtime?▼

The runtime allows all origins without credentials by default. If you need cookies, set an explicit origin with credentials: true in createCopilotEndpoint and pass credentials="include" to CopilotKitProvider, since wildcard origins cannot be used with credentials.

Why is my CopilotKit frontend tool not executing?▼

Check that useFrontendTool is registered with the exact case-sensitive tool name before the agent run starts. Inspect the SSE stream for ToolCallStartEvent; if ToolCallResultEvent never appears, the execute handler likely threw or the component is not mounted.

What causes CopilotKit version mismatch errors?▼

VERSION_MISMATCH occurs when @copilotkit/* packages are on different versions. Run npm ls @copilotkit/runtime @copilotkit/react @copilotkit/core and align all packages to the same version.

Why does the CopilotKit stream stall with Anthropic reasoning models?▼

Reasoning events (REASONING_*) can cause permanent stalls if the client event handler does not consume them properly, a known issue tracked as GitHub issue #3323. Updating to a version with reasoning event handling fixes resolves it.