copilotkit-debug

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Debugging CopilotKit integrations is hard because failures can originate in the runtime, the agent, the SSE event stream, frontend tool registration, CORS, or version mismatches between packages. This Skill provides a structured diagnostic workflow that maps symptoms to root causes using error code catalogs 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. - Error Code Catalog: Complete reference for v1 CopilotKitErrorCode, v2 CopilotKitCoreErrorCode, and TranscriptionErrorCode with causes and resolutions. - AG-UI Event Tracing: Documents expected event sequences (RunStarted, TextMessage, ToolCall, StateSnapshot, RunFinished) and known failure patterns like reasoning event stalls. - Use Case: Your CopilotKit chat connects but the agent never responds. The Skill walks you through checking the /info endpoint, inspecting the SSE stream in the Network tab, verifying the agent registration, and matching the error to known GitHub issues. ## Quick Start Use the copilotkit-debug skill to diagnose why my CopilotKit agent is not responding to chat messages.

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 for the /agent/:id/run request in the browser Network tab. A stream with only RunStartedEvent indicates a stalled agent, often caused by a missing LLM API key or reasoning event handling issues.

How do I fix CopilotKit CORS errors in the browser?▼

CORS errors occur when the runtime and frontend are on different origins without proper configuration. Set an explicit origin and credentials in createCopilotEndpoint's cors option, and pass credentials="include" to CopilotKitProvider when using HTTP-only cookies.

What causes the AGENT_NOT_FOUND error in CopilotKit?▼

AGENT_NOT_FOUND means the agentId passed to CopilotChat or useAgent does not match any key in the runtime's agents map. Check the /info endpoint response to list registered agents and ensure names match exactly, since matching is case-sensitive.

Why does my CopilotKit stream cut off before finishing?▼

Premature stream termination is usually caused by hosting platform timeouts, such as Vercel's 30-second serverless limit, or an uncaught agent exception. Check for a RunErrorEvent before the cutoff and consider Intelligence mode for long-running agents.

Does CopilotKit support LangGraph agents with Python?▼

Yes, via LangGraphAgent from @ag-ui/langgraph, but the Python SDK dispatches events with a copilotkit_ prefix that ag-ui-langgraph does not expect, causing emitted state and messages to be silently dropped. This is tracked as GitHub issue #3519.

Why is my useFrontendTool not executing when the agent calls it?▼

The tool name must exactly match what the agent calls, and the tool must be registered before the agent run starts. Check the SSE stream for ToolCallStartEvent; if present without a ToolCallResultEvent, the execute handler likely threw or the component is not mounted.