copilotkit-debug

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

7|3|Updated May 8, 2026
One-click install
npx skills add https://github.com/CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit --skill copilotkit-debug-copilotkit
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: copilotkit-debug
Source: https://github.com/CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit/tree/main/.cursor/skills/copilotkit-debug
Command: npx skills add https://github.com/CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit --skill copilotkit-debug-copilotkit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Debugging CopilotKit integrations is difficult because failures can originate in the runtime, the agent, the SSE event stream, frontend tool registration, 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. - Quick Diagnostic Workflows: Step-by-step guides for common scenarios including runtime not connecting, agent not responding, streaming failures, frontend tool issues, and transcription errors. - Use Case: Your CopilotKit chat connects but the agent never responds. Use this Skill to check the /info endpoint, inspect the SSE stream for RunErrorEvent, verify the LLM API key, and match the error to a known GitHub issue. ## 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 from the /agent/:id/run request for RunErrorEvent or missing events. Common causes include missing LLM API keys, invalid model strings, and reasoning event stalls with Anthropic models.

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

CORS errors occur when the runtime's CORS configuration does not match the client origin. Set an explicit origin in createCopilotEndpoint when using credentials, and pass credentials="include" in CopilotKitProvider. Check the preflight OPTIONS request in the Network tab.

Why does CopilotKit show AGENT_NOT_FOUND errors?▼

AGENT_NOT_FOUND means the agentId prop in CopilotChat or useAgent does not match any key in the runtime's agents map. Agent names are case-sensitive. Query the /info endpoint to list registered agents and compare with your client configuration.

Does CopilotKit support tracing AG-UI events during debugging?▼

Yes, CopilotKit provides the Web Inspector component from @copilotkit/web-inspector for real-time AG-UI event visibility. You can also inspect the raw SSE stream in the browser Network tab, where each event appears as a data line in the text/event-stream response.

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 error. Check for RunErrorEvent before the cutoff and consider Intelligence mode for long-running agent interactions.

How do I fix CopilotKit version mismatch errors?▼

VERSION_MISMATCH errors occur when @copilotkit/* packages are on different versions. Run npm ls @copilotkit/runtime @copilotkit/react @copilotkit/core to check installed versions and align all CopilotKit packages to the same release.