copilotkit-debug

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? CopilotKit applications fail in hard-to-trace ways: runtimes that won't connect, agents that never respond, SSE streams that stall, and frontend tools that silently fail. This Skill provides a structured diagnostic workflow with error code catalogs and AG-UI event tracing to pinpoint root causes quickly. ## Core Features & Use Cases - Structured Diagnostic Workflow: A five-step process covering information gathering, error code matching, AG-UI event tracing, root cause identification, and fix verification. - Complete Error Code Catalog: Reference documents covering v1 CopilotKitErrorCode, v2 CopilotKitCoreErrorCode, TranscriptionErrorCode, and Intelligence platform HTTP errors with resolutions. - Quick Diagnostic Workflows: Step-by-step sequences for common scenarios including runtime connectivity, agent not responding, streaming failures, frontend tool issues, and transcription problems. - Use Case: Your CopilotKit chat connects but the agent never replies. Follow the "Agent Not Responding" workflow to check the /info endpoint, inspect the SSE stream for RunErrorEvent, verify the LLM API key, and validate the BuiltInAgent model string. ## Quick Start Ask the assistant to diagnose why your CopilotKit agent is not responding and have it walk through the runtime connectivity and SSE event stream checks.

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 names with your agentId prop. Then inspect the SSE stream in the browser Network tab for RunErrorEvent or a stalled stream, and check that the LLM provider API key is set.

Why does CopilotKit show a network error or 404 on the runtime?▼

A 404 usually means the basePath in createCopilotEndpoint does not match the runtimeUrl in CopilotKitProvider. Connection refused means the server is not running, while CORS errors require explicit origin and credentials configuration.

How do I trace AG-UI events in a CopilotKit SSE stream?▼

Open the browser Network tab, find the POST to /agent/:id/run, and inspect the text/event-stream response for events like RunStartedEvent, TextMessageChunkEvent, and RunFinishedEvent. You can also add the CopilotKitWebInspector component for real-time event visibility.

Why is my CopilotKit frontend tool not executing?▼

The tool name registered via useFrontendTool must exactly match the name the agent calls, and it must be registered before the agent run starts. Check the SSE stream for ToolCallStartEvent and look for tool_not_found or tool_argument_parse_failed error codes.

Does CopilotKit support Anthropic reasoning models without stalling?▼

Anthropic reasoning tokens emit REASONING_* events that can cause permanent agent stalls if the client does not consume them properly, as tracked in issue #3323. Update to a CopilotKit version with reasoning event handling fixes.

What causes CopilotKit version mismatch errors?▼

Version mismatch errors occur when @copilotkit/runtime, @copilotkit/react, and related packages are on different versions. Run npm ls on all @copilotkit packages and align them to the same version to resolve the VERSION_MISMATCH error.