copilotkit

Diagnose and implement CopilotKit v2 runtime, React hooks, and AG-UI transport wiring.

1|Updated Sep 15, 2026
One-click install
npx skills add https://github.com/amoai-tech/mdeai --skill copilotkit-amoai-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: copilotkit
Source: https://github.com/amoai-tech/mdeai/tree/main/.claude/skills/copilotkit
Command: npx skills add https://github.com/amoai-tech/mdeai --skill copilotkit-amoai-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? CopilotKit APIs change frequently and version mismatches between v1 and v2 surfaces cause subtle runtime failures. This Skill grounds every CopilotKit task in the installed MDE packages (1.55.2) and pinned official upstream documentation instead of stale memory or latest-main examples. ## Core Features & Use Cases - Runtime and React wiring: Owns the same-origin /api/copilotkit route, v2 provider/hooks from @copilotkit/react-core/v2, and stable provider props. - AG-UI and frontend tools: Aligns CopilotKit tool/action names with Mastra tool-map keys and validates tool result streaming and generative UI rendering. - CLI verification and debugging: Runs npx [email protected] verify --json before manual debugging and classifies failures across wiring, transport, and Mastra bridge boundaries. - Use Case: When a Mastra search tool executes but its CopilotKit card never renders, use this Skill to check the action-name contract, AG-UI result flow, and the rendered browser path. ## Quick Start Use the copilotkit skill to diagnose why the /api/copilotkit stream returns 500 after a runtime change.

Frequently Asked Questions about copilotkit

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

FAQPage Schema
How do I debug a CopilotKit runtime that returns 500 errors?

Run npx [email protected] verify --json first to check wiring before manual debugging. Then inspect the /api/copilotkit route, installed v2 runtime code, and AG-UI event flow while preserving auth and rate-limit behavior.

Why does a Mastra tool execute but the CopilotKit card never render?

The CopilotKit action or tool render name must match the Mastra tool-map key, not a createTool() id. Verify the tool-action name mapping, AG-UI result handling, and the rendered browser path rather than relying on tool unit tests alone.

What is the difference between CopilotKit v1 and v2 imports?

v2 is current and imports from the /v2 subpath such as @copilotkit/react-core/v2. The package root is the deprecated v1 surface that still resolves, so mixing them fails silently at runtime instead of at import time.

Can I copy CopilotKit main-branch examples into an app on version 1.55.2?

No. Check the installed package version and pinned official sources first, because latest-main examples may use APIs that differ from 1.55.2. Preserve the v2 import surface and same-origin runtime contract when adapting examples.

What does the CopilotKit CLI verify command not cover?

The verify command does not cover tool execution, event ordering and streaming, or state synchronization. A passing wiring check must be followed by targeted tests and browser evidence for tool results and rendered generative UI.

When should a CopilotKit issue be handed to the Mastra skill instead?

CopilotKit owns the browser-facing transport, provider, and tool registration boundary. Agent definitions, tool implementations, workflows, memory, persistence, and HITL semantics belong to the Mastra skill, and product-domain rules belong to domain skills.