930aaeb
CopilotKitDocs
  • Docs
  • Integrations
  • Reference
Get Started
QuickstartCoding Agents
Concepts
ArchitectureGenerative UI OverviewOSS vs Enterprise
Agentic Protocols
OverviewAG-UIAG-UI MiddlewareMCPA2A
Build Chat UIs
Prebuilt Components
CopilotChatCopilotSidebarCopilotPopup
Custom Look and Feel
CSS CustomizationSlots (Subcomponents)Fully Headless UIReasoning Messages
Multimodal AttachmentsVoice
Build Generative UI
Controlled
Tool-based Generative UITool RenderingState RenderingReasoning
Your Components
Display ComponentsInteractive Components
Declarative
A2UIDynamic Schema A2UIFixed Schema A2UI
Open-Ended
MCP Apps
Adding Agent Powers
Frontend ToolsShared State
Human-in-the-Loop
HITL OverviewPausing the Agent for InputHeadless Interrupts
Sub-AgentsAgent ConfigProgrammatic Control
Agents & Backends
Built-in Agent
Backend
Copilot RuntimeFactory ModeAG-UI
Runtime Server AdapterAuthentication
AG2
Shared state
Reading agent stateWriting agent state
Readables
Observe & Operate
InspectorVS Code Extension
Troubleshooting
Common Copilot IssuesError Debugging & ObservabilityDebug ModeAG-UI Event InspectorHook ExplorerError Observability Connectors
Enterprise
CopilotKit PremiumHow the Enterprise Intelligence Platform WorksHow Threads & Persistence WorkObservabilitySelf-Hosting IntelligenceThreads
Deploy
AWS AgentCore
What's New
Full MCP Apps SupportLangGraph Deep Agents in CopilotKitA2UI Launches with full AG-UI SupportCopilotKit v1.50Generative UI Spec SupportA2A and MCP Handshake
Migrate
Migrate to V2Migrate to 1.8.2
Other
Contributing
Code ContributionsDocumentation Contributions
Anonymous Telemetry
AG2VS Code Extension

VS Code Extension

Live preview your CopilotKit render hooks, A2UI catalog components, and AG-UI event stream — without leaving VS Code.

The CopilotKit VS Code extension is a three-in-one workbench for iterating on CopilotKit features inside your editor. Install it once and you get three sidebars under the CopilotKit activity-bar icon:

  • CopilotKit Hooks — discover every useCopilotAction, useRenderTool, useCoAgentStateRender, etc. in your workspace, and live-preview their render components with auto-generated form controls.
  • A2UI Catalog — live preview of your A2UI catalog components with fixture-driven scenarios and hot-reload on save.
  • AG-UI Inspector — a real-time, color-coded, filterable stream of every AG-UI event your runtime emits.

No localhost server, no browser tab, no agent run required for the first two — you can iterate on rendering and UI structure entirely offline.

Install#

Install the extension#

Open VS Code, go to Extensions (Ctrl+Shift+X / Cmd+Shift+X), search for CopilotKit, and click Install. Or from a terminal:

code --install-extension copilotkit.copilotkit

Open the CopilotKit activity bar#

Click the CopilotKit icon in the Activity Bar on the left edge of VS Code. Three sidebar views expand underneath it, in this order:

  1. CopilotKit Hooks
  2. A2UI Catalog
  3. AG-UI Inspector

Each is a self-contained tool — pick the one that matches what you're working on.

Hook Explorer#

You have a file that calls useCopilotAction, useRenderTool, or any other render-capable CopilotKit hook, and you want to iterate on the render prop. The CopilotKit Hooks sidebar lists every call-site in your workspace; clicking one opens a live preview panel where the render output is driven by a form built from your hook's declared parameters.

Extra niceties:

  • A ▶️ Preview Component CodeLens sits directly above every render-hook call in your editor — one click opens the preview for exactly that site.
  • A </> button on each sidebar row jumps to the source file.
  • Cross-file hook switches auto-recover — a forced render-prop crash in one hook doesn't strand the whole webview.
Info

Full walkthrough, hook coverage table, and limitations: Hook Explorer.

A2UI Catalog#

You have a file that exports an A2UI catalog via createCatalog (or imports @copilotkit/a2ui-renderer). The A2UI Catalog sidebar lists every catalog file in your workspace, plus any named fixtures you've defined alongside them. Clicking a component opens a live preview; edit the file and the preview updates on save while preserving interaction state.

Find your catalog files#

Open the A2UI Catalog sidebar. Each row is a catalog file (discovered by scanning for @copilotkit/a2ui-renderer imports). Rows with fixture files expand to show named scenarios; rows without one get an auto badge and render with a default empty surface.

Hover any row to reveal a </> button that jumps to the source — on fixture rows, it jumps to the named fixture key inside the fixture file.

Preview a component#

Click a component row to open the preview. If the component has fixtures, click the row to expand and pick a fixture — otherwise the click previews directly. Edit the file and save — the preview rebundles and re-renders automatically.

Add fixtures#

Fixtures are named test-data scenarios. Create a fixture file next to your component:

MyComponent.fixture.json:

{
  "default": {
    "surfaceId": "preview",
    "messages": [
      { "beginRendering": { "surfaceId": "preview", "root": "root" } },
      { "surfaceUpdate": { "surfaceId": "preview", "components": [] } }
    ]
  },
  "empty state": {
    "surfaceId": "preview",
    "messages": []
  }
}

Each top-level key is a named fixture. Switch between them from the fixture dropdown inside the preview panel.

Info

The extension validates fixture files on save and surfaces structural warnings (missing surfaceId, invalid messages, unknown component types) as in-editor diagnostics.

AG-UI Inspector#

You're running a CopilotKit runtime and something in an agent interaction is off — a tool call isn't firing, a state delta is wrong, or the run ends before the UI settles. The AG-UI Inspector sidebar opens a dedicated SSE connection to your runtime's /cpk-debug-events endpoint and renders every event in a filterable, color-coded stream. Click any event row to expand the full JSON payload.

Info

Full walkthrough, event-type color reference, and production guard details: AG-UI Event Inspector.

On this page
InstallInstall the extensionOpen the CopilotKit activity barHook ExplorerA2UI CatalogFind your catalog filesPreview a componentAdd fixturesAG-UI Inspector