copilotkit/copilotkit

copilotkit-contribute

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.

Ver código fuente
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

Contributing to CopilotKit

Important: CopilotKit's internal v2 packages use the @copilotkit/* namespace. The public API that users install is @copilotkit/*. When contributing, you work with @copilotkit/* source but users never see that namespace.

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.

  • 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.

Workflow

  1. Fork and clone the CopilotKit/CopilotKit repository.
  2. Install dependencies with pnpm install (requires pnpm v9.x and Node 20+).
  3. Build once with pnpm build to bootstrap all packages.
  4. Create a branch using the naming convention: feat/<ISSUE>-<name>, fix/<ISSUE>-<name>, or docs/<ISSUE>-<name>.
  5. Develop with pnpm dev (watches all packages) or target a specific package with nx run @copilotkit/<pkg>:dev.
  6. Write and run tests with nx run @copilotkit/<pkg>:test. All v2 packages use Vitest.
  7. Lint and format with pnpm run lint --fix && pnpm run format.
  8. Commit using conventional commit format: <type>(<scope>): <subject> (enforced by commitlint).
  9. Push and open a PR against the main branch. CI builds all packages and publishes preview packages via pkg-pr-new.

Before Opening a PR

  • Reach out to the maintainers first for any significant work (file an issue or ask on Discord).
  • Run pnpm run test to verify all tests pass.
  • Run pnpm run build to verify the full build succeeds.
  • Run pnpm run check-prettier to verify formatting.
  • Ensure commit messages follow the <type>(<scope>): <subject> format.

Quick Reference

TaskCommand
Install dependenciespnpm install
Build all packagespnpm build
Dev mode (all)pnpm dev
Dev mode (v2 only)pnpm dev:next
Run all testspnpm run test
Run v2 tests onlypnpm test:next
Run single package testsnx run @copilotkit/core:test
Test with coveragepnpm run test:coverage
Lintpnpm run lint
Formatpnpm run format
Check formattingpnpm run check-prettier
Type checkpnpm run check-types
Package quality checkspnpm run check:packages
Dependency graphpnpm run graph

Key Architecture Points

  • V2 (@copilotkit/*) is the real implementation. V1 (@copilotkit/*) wraps V2.
  • New features always go in V2 packages under packages/v2/.
  • Communication between frontend and runtime uses the AG-UI protocol (SSE-based events).
  • The monorepo uses Nx for task orchestration and pnpm workspaces.

Reference Documents

del mismo repositorio

Más Skills

Todos los Skills
copilotkit
Comunidad

a2ui-renderer

Render A2UI (Agent-to-UI declarative surfaces) in CopilotKit v2. Enable the runtime via CopilotRuntime({ a2ui: {...} }), then enable the provider via . Auto-activates via /info — do NOT manually pass renderActivityMessages. createA2UIMessageRenderer ships from @copilotkit/react-core/v2; low-level primitives (A2UIProvider, A2UIRenderer, createCatalog) ship from @copilotkit/a2ui-renderer. Covers theme customization, createSurface dedup, action-bridge try/finally cleanup. Load when an agent emits A2UI operations (createSurface / updateComponents / updateDataModel), when wiring a2ui on CopilotRuntime, or when styling A2UI surfaces.

instalaciones
2
GitHub Stars
37,3 mil
Actualizado
9 sept
copilotkit
Comunidad

react-core

@copilotkit/react-core — mount the CopilotKit provider (from @copilotkit/react-core/v2) in a Next.js App Router / React Router v7 / TanStack Start / SPA app, drop in CopilotChat/CopilotPopup/CopilotSidebar (v2 chat components ship from react-core/v2 — NOT react-ui, which is CSS-only in v2), access and subscribe to agents with useAgent / useAgentContext / useCapabilities, switch between multiple agents, manage durable Intelligence threads with useThreads, register browser-side tools via useFrontendTool, render tool calls with useRenderTool / useComponent / useDefaultRenderTool, gate execution with useHumanInTheLoop, wire file attachments with useAttachments, configure suggestion pills, and register activity- and custom-message renderers. publicLicenseKey is canonical (publicApiKey is deprecated alias). Load the reference under references/ that matches your task.

instalaciones
2
GitHub Stars
37,3 mil
Actualizado
9 sept
copilotkit
Comunidad

runtime

@copilotkit/runtime — mount a fetch-native CopilotRuntime on any JS server, wire middleware, pick an AgentRunner, instantiate BuiltInAgent (Factory Mode with TanStack AI is the preferred default) or plug in any of 12 external agent frameworks (Mastra, LangGraph, CrewAI Crews/Flows, PydanticAI, ADK, LlamaIndex, Agno, AWS Strands, MS Agent Framework, AG2, A2A), enable Intelligence mode for durable threads + websocket, register server-side tools via defineTool, and wire voice transcription. Uses the fetch-based createCopilotRuntimeHandler primitive — the Express/Hono adapters are discouraged. Load the reference under references/ that matches your task.

instalaciones
2
GitHub Stars
37,3 mil
Actualizado
9 sept
copilotkit
Comunidad

copilotkit-integrations

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.

instalaciones
1
GitHub Stars
37,3 mil
Actualizado
9 sept