copilotkit-debug

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? CopilotKit integrations fail in opaque ways: runtimes refuse connections, agents never respond, SSE streams stall mid-run, and frontend tools silently fail. This Skill provides a structured diagnostic workflow that maps symptoms to root causes using error code catalogs, AG-UI event tracing, and known GitHub issue patterns. ## 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 sequences for common scenarios including runtime connectivity, unresponsive agents, streaming failures, frontend tool issues, and transcription errors. - Use Case: Your CopilotKit chat connects but the agent never responds. Follow the "Agent Not Responding" workflow to check the /info endpoint, inspect the SSE stream for RunErrorEvent, verify the LLM API key, and match the model string format. ## Quick Start Ask the agent to diagnose why your CopilotKit agent is not responding, providing the error message from your browser console and 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 curling the /info endpoint and comparing the agent name with your agentId prop. Then inspect the SSE stream in the browser Network tab for RunErrorEvent or a stalled stream, and check server logs for missing LLM API keys or invalid model strings.

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

CopilotKit CORS errors occur when the runtime origin config does not match your frontend. By default all origins are allowed without credentials; if you need cookies, set an explicit origin with credentials: true in createCopilotEndpoint and pass credentials="include" to CopilotKitProvider.

Why does my CopilotKit SSE stream stop before finishing?▼

Premature stream termination is usually caused by hosting platform timeouts (Vercel defaults to 30s), an uncaught agent exception, or client disconnection. Check for a RunErrorEvent before the cutoff and consider Intelligence mode for long-running agents.

What does the AGENT_NOT_FOUND error mean in CopilotKit?▼

AGENT_NOT_FOUND means the agentId passed to CopilotChat or useAgent does not match any key in the runtime's agents map. Agent names are case-sensitive, so query the /info endpoint to list registered agents and align the names exactly.

Why is my CopilotKit frontend tool not being called?▼

Frontend tools fail when the tool name does not exactly match what the agent calls, the useFrontendTool hook is not mounted before the run starts, or the execute handler throws. Check the SSE stream for ToolCallStartEvent and look for tool_not_found or tool_handler_failed error codes.

Does CopilotKit support LangGraph agents with the Python SDK?▼

Yes, via LangGraphAgent, but there is a known issue (#3519) where the Python SDK dispatches events with a copilotkit_ prefix that ag-ui-langgraph does not recognize, causing emitted state and messages to be silently dropped. Updating ag-ui-langgraph or patching the event name mapping resolves it.