본문으로 건너뛰기
cccskills
무료GitHub에 공개

copilotkit-upgrade

Use when migrating a CopilotKit v1 application to v2 -- updating package imports, replacing deprecated hooks and components, switching from GraphQL runtime to AG-UI protocol runtime, and resolving breaking API changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구OpenAI
설치 방법 보기

포함된 파일(5)

  • SKILL.md5.6 KB
  • references/breaking-changes.md10.6 KB
  • references/deprecation-map.md8.9 KB
  • references/v1-to-v2-migration.md15.5 KB
  • sources.md2.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

CopilotKit v1 to v2 Migration Skill

Live Documentation (MCP)

This plugin includes an MCP server (copilotkit-docs) that provides search-docs and search-code tools for querying live CopilotKit documentation and source code. Useful for looking up current v2 API signatures during migration.

  • Claude Code: Auto-configured by the plugin's .mcp.json -- no setup needed.
  • Codex: Requires manual configuration. See the copilotkit-debug skill for setup instructions.

Overview

CopilotKit v2 is a ground-up rewrite built on the AG-UI protocol (@ag-ui/client / @ag-ui/core). Users continue to install and import @copilotkit/* packages -- the v2 changes are exposed through the same package names with updated APIs (new hook names, component names, runtime configuration). The @copilotkit/* namespace is an internal implementation detail that users never interact with.

Migration Workflow

1. Audit Current Usage

Scan the codebase for all v1 imports and API usage:

@copilotkit/react-core    -> hooks, CopilotKit provider, types
@copilotkit/react-ui      -> CopilotChat, CopilotPopup, CopilotSidebar
@copilotkit/react-textarea -> CopilotTextarea (removed in v2)
@copilotkit/runtime       -> CopilotRuntime, service adapters, framework integrations
@copilotkit/runtime-client-gql -> GraphQL client, message types
@copilotkit/shared         -> utility types, constants
@copilotkit/sdk-js         -> LangGraph/LangChain SDK

2. Identify Deprecated APIs

Key hooks and components to find and replace:

v1 APIv2 Replacement
useCopilotActionuseFrontendTool
useCopilotReadableuseAgentContext
useCopilotChatuseAgent + useSuggestions
useCoAgentuseAgent
useCoAgentStateRenderuseRenderToolCall / useRenderActivityMessage
useLangGraphInterruptuseInterrupt
useCopilotChatSuggestionsuseConfigureSuggestions + useSuggestions
useCopilotAdditionalInstructionsuseAgentContext
useMakeCopilotDocumentReadableuseAgentContext
CopilotKit (provider)CopilotKitProvider
CopilotTextareaRemoved -- use standard textarea + useFrontendTool

3. Map to v2 Equivalents

Refer to references/v1-to-v2-migration.md for detailed before/after code examples.

4. Update Package Dependencies

The @copilotkit/* package names stay the same. Update to the latest v2 versions:

@copilotkit/react-core        -> @copilotkit/react (consolidated into one package)
@copilotkit/react-ui           -> @copilotkit/react (consolidated into one package)
@copilotkit/react-textarea     -> removed (no v2 equivalent)
@copilotkit/runtime            -> @copilotkit/runtime (same package, new agent-based API)
@copilotkit/runtime-client-gql -> removed (replaced by AG-UI protocol, re-exported from @copilotkit/react)
@copilotkit/shared             -> @copilotkit/shared (same package)
@copilotkit/sdk-js             -> @copilotkit/agent (new package for agent definitions)

5. Update Runtime Configuration

The v1 CopilotRuntime accepted service adapters (OpenAI, Anthropic, LangChain, etc.) and endpoint definitions. The v2 CopilotRuntime accepts AG-UI AbstractAgent instances directly.

v1 pattern (service adapter + endpoints):

import { CopilotRuntime, OpenAIAdapter } from "@copilotkit/runtime";
const runtime = new CopilotRuntime({ actions: [...] });
// used with copilotKitEndpoint() for Next.js, Express, etc.

v2 pattern (agents + Hono endpoint):

import { CopilotRuntime, createCopilotEndpoint } from "@copilotkit/runtime";
import { BuiltInAgent } from "@copilotkit/agent";
const runtime = new CopilotRuntime({
  agents: { myAgent: new BuiltInAgent({ model: "openai:gpt-4o" }) },
});
const app = createCopilotEndpoint({ runtime, basePath: "/api/copilotkit" });

6. Update Provider

v1:

import { CopilotKit } from "@copilotkit/react-core";
<CopilotKit runtimeUrl="/api/copilotkit">
  {children}
</CopilotKit>

v2:

import { CopilotKitProvider } from "@copilotkit/react";
<CopilotKitProvider runtimeUrl="/api/copilotkit">
  {children}
</CopilotKitProvider>

7. Verify

  • Run the application and check for runtime errors
  • Verify all agent interactions work (chat, tool calls, interrupts)
  • Check that tool renderers display correctly
  • Confirm suggestions load and display

Quick Reference

Conceptv1v2
Package scope@copilotkit/*@copilotkit/* (same scope, updated APIs)
ProtocolGraphQLAG-UI (SSE)
Provider componentCopilotKitCopilotKitProvider
Define frontend tooluseCopilotActionuseFrontendTool
Share app stateuseCopilotReadableuseAgentContext
Agent interactionuseCoAgentuseAgent
Handle interruptsuseLangGraphInterruptuseInterrupt
Render tool callsuseCopilotAction({ render })useRenderToolCall
Chat suggestionsuseCopilotChatSuggestionsuseConfigureSuggestions
Runtime classCopilotRuntime (adapters)CopilotRuntime (agents)
Endpoint setupcopilotKitEndpoint()createCopilotEndpoint()
Agent definitionLangGraphAgent endpointAbstractAgent / BuiltInAgent
Chat componentsCopilotChat, CopilotPopup, CopilotSidebarCopilotChat, CopilotPopup, CopilotSidebar (from @copilotkit/react)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit72026년 5월 27일 업데이트

Use when building custom agent backends, implementing the AG-UI protocol, debugging streaming issues, or understanding how agents communicate with frontends. Covers event types, SSE transport, AbstractAgent/HttpAgent patterns, state synchronization, tool calls, and human-in-the-loop flows.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit72026년 5월 27일 업데이트

Use when contributing to the CopilotKit open-source project — forking, cloning, setting up the monorepo, creating branches, running tests, and submitting pull requests against CopilotKit/CopilotKit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit72026년 5월 27일 업데이트

Use when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures, version mismatches, and AG-UI event tracing.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit72026년 5월 27일 업데이트

Use when building AI-powered features with CopilotKit v2 -- adding chat interfaces, registering frontend tools, sharing application context with agents, handling agent interrupts, and working with the CopilotKit runtime.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit72026년 5월 27일 업데이트

Use when wiring an external agent framework (LangGraph, CrewAI, PydanticAI, Mastra, ADK, LlamaIndex, Agno, Strands, Microsoft Agent Framework, or others) into a CopilotKit application via the AG-UI protocol.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

CopilotKit/Generative-UI-Global-Hackathon-Starter-Kit72026년 5월 27일 업데이트

CopilotKit의 스킬 모두 보기

이 스킬의 문제 신고