CopilotKit
AI Agents & AssistantsAn SDK for building full‑stack agentic applications with generative UI, shared state, and human‑in‑the‑loop workflows.
Features
- Chat UI supporting streaming messages, tool calls, and agent responses
- Backend Tool Rendering – agents can invoke backend tools that return UI components rendered on the client
- Generative UI – agents dynamically generate and update UI at runtime based on intent and state
Recent releases
View all 28 releases →- Dependency bump: @copilotkit/license-verifier 0.2.0 → 0.4.0 in runtime, shared, and root overrides
- @copilotkit/react-native added to release pipeline; ensure installation of the new package alongside other CopilotKit packages
- @copilotkit/react-native: package for React Native apps with lightweight CopilotKitProvider and polyfills
- registerProxiedAgent API in @copilotkit/core to mount frontend tools against a server‑defined runtime agent
- BuiltInAgent MCP config now supports per‑call `getHeaders` resolver for dynamic request headers
Full changelog
CopilotKit v1.57.1
A patch release on the 1.57 line. Adds @copilotkit/react-native for using CopilotKit hooks in React Native apps, ships registerProxiedAgent for mounting frontend tools/context against a single runtime agent, adds a per-call getHeaders resolver to BuiltInAgent's MCP server config, and auto-mounts the IntelligenceIndicator pill when intelligence is configured on the runtime.
Install
npm install @copilotkit/[email protected] @copilotkit/[email protected] @copilotkit/[email protected]
Features
-
@copilotkit/react-native— New package for using CopilotKit in React Native apps. Ships a lightweightCopilotKitProvider(no DOM, CSS, Radix, Lit, or A2UI deps), aninstallStreamingFetch()XHR-based shim that givesresponse.body.getReader()support, and granular polyfills forReadableStream,TextEncoder, crypto,DOMException, andwindow.location. All hooks (useAgent,useFrontendTool,useHumanInTheLoop, etc.) re-export directly fromreact-coreover a shared context. Backed by an extraction ofCopilotKitContextanduseCopilotKitinto a standalone@copilotkit/react-core/v2/contextentry point so cross-platform consumers don't pull web-only deps via the barrel. (#3633)// index.js — entry point, before other imports import "@copilotkit/react-native/polyfills"; import { installStreamingFetch } from "@copilotkit/react-native"; installStreamingFetch(); // App.tsx import { CopilotKitProvider, useAgent } from "@copilotkit/react-native"; -
registerProxiedAgentin@copilotkit/core— New API for mounting a frontend-side agent (with frontend tools, context, render hooks) against a server-defined runtime agent.CopilotKitCore.registerProxiedAgent({ agentId, runtimeAgentId })mints aProxiedCopilotRuntimeAgentunder a local registry id and routes its outbound HTTP requests (/agent/<id>/run,/connect,/stop) to the named runtime agent. Returns{ agent, unregister }foruseEffectcleanup. Throws on duplicateagentId(collisions withagents__unsafe_dev_onlyor anotherregisterProxiedAgentare loud, not silent). Replaces the implicit per-thread agent cloning from earlier work, which has been reverted because it wiped agent state on tool calls — the registry now keeps a single agent per id. (#4629)const { copilotkit } = useCopilotKit(); useEffect(() => { const { unregister } = copilotkit.registerProxiedAgent({ agentId: "chat-1", // local registry id (subscriber bookkeeping) runtimeAgentId: "default", // runtime id (URL routing only) }); return unregister; }, [copilotkit]); // <CopilotChat agentId="chat-1" /> -
Configurable MCP server on
BuiltInAgent—@copilotkit/runtime/v2'sBuiltInAgentMCP config now accepts anauthToken(static Bearer shorthand) and agetHeadersresolver that runs on every outbound HTTP request — initialize,tools/list,tools/call, reconnects. The resolver receivesMCPRequestContext(requestHeaders,input,mcpServerUrl) so headers can be derived per request rather than baked into the client config. The MCP layer now sits directly on@ai-sdk/mcp(MCPClient,MCPTransport,OAuthClientProvider,OAuthTokens, andUnauthorizedErrorre-exported from@copilotkit/runtime/v2); the agent module no longer imports@modelcontextprotocol/sdkdirectly. Side-effect fix: SSE staticheadersnow reach the wire — the previous direct-SDK construction silently dropped them. (#4420)import { BuiltInAgent, INTELLIGENCE_USER_ID_HEADER, } from "@copilotkit/runtime/v2"; new BuiltInAgent({ model: "openai/gpt-4o", mcpServers: [{ type: "http", url: `${process.env.INTELLIGENCE_API_URL}/mcp`, authToken: process.env.INTELLIGENCE_API_KEY!, getHeaders: ({ requestHeaders }) => { const userId = requestHeaders[INTELLIGENCE_USER_ID_HEADER]?.trim(); if (!userId) throw new Error("missing user-id"); return { [INTELLIGENCE_USER_ID_HEADER]: userId }; }, }], }); -
IntelligenceIndicatorauto-mounts in@copilotkit/react-core— When intelligence is configured on the runtime (/inforeturnsintelligence),CopilotChatMessageViewmounts a "Using CopilotKit Intelligence" pill on the canonical message slot — no factory, no provider, norenderCustomMessagesregistration. The indicator self-gates: only the last message of the latest in-flight run with a tool call matchingDEFAULT_TOOL_PATTERNS(currently[/^bash$/]) renders. Per-instance phase machine (spinner→ debouncedcheck→fading→hidden) absorbs step-boundaryRUN_FINISHED → RUN_STARTEDblips. Pill width follows content; gate no longer depends ongetRunIdForMessage; the indicator stays through tool-result interleaving. (#4632)
Dependency hygiene
- Bump
@copilotkit/license-verifier0.2.0 → 0.4.0 — applied inpackages/runtime,packages/shared, and the root pnpmoverridesblock. (#4699)
Build / packaging
@copilotkit/react-nativewired into the release system — added to changesets configuration and the release pipeline so the new package is versioned and published alongside the rest of the monorepo. (9328de4a)
Packages republished at 1.57.1
@copilotkit/runtime, @copilotkit/react-core, @copilotkit/react-ui, @copilotkit/react-native, @copilotkit/core, @copilotkit/shared, @copilotkit/runtime-client-gql, @copilotkit/sdk-js, @copilotkit/voice, @copilotkit/web-inspector, @copilotkit/a2ui-renderer, @copilotkit/react-textarea, and @copilotkit/sqlite-runner.
- Threads tab in `@copilotkit/web-inspector` with Conversation, Agent State, and AG-UI Events sub‑views
- `registerProxiedAgent` API for mounting frontend agents against server‑defined runtime agents
- `IntelligenceIndicator` now auto‑mounts when intelligence is configured
Full changelog
CopilotKit v1.57.0
A minor release on the 1.57 line. The headline is a new Threads tab in the web inspector — backed by a thread-store registry in @copilotkit/core, a useThreads hook, and per-thread inspection endpoints in the runtime — plus registerProxiedAgent for mounting frontend tools/context against a server-defined agent, IntelligenceIndicator auto-mount, and requiresUser for OAuth-gated MCP HTTP servers.
Install
npm install @copilotkit/[email protected] @copilotkit/[email protected] @copilotkit/[email protected]
Features
-
Threads tab in
@copilotkit/web-inspector— Each agent's threads now appear in a dedicated tab with three sub-views: Conversation (historical messages with expandable tool-call blocks), Agent State (lastSTATE_SNAPSHOTpayload), and AG-UI Events (full event stream with payload highlighting). Backed by:ThreadStoreRegistryin@copilotkit/core(keyed byagentId) and a newonAgentRunStartedsubscriber event so the inspector subscribes beforeagent.runAgent()snapshots the subscriber list.useThreadshook in@copilotkit/react-corethat fetches threads and subscribes to a Phoenix WebSocket channel for real-time metadata.- New runtime endpoints
GET /threads/:id/eventsandGET /threads/:id/state, plus list/update/archive/delete handlers, wired through bothInMemoryAgentRunnerand the Intelligence platform's_inspect/threads/:id/{events,state}endpoints.getThreadState()walks per-run compacted events and returns the latestSTATE_SNAPSHOTpayload. - All thread mutations authenticate via
identifyUser(request);userIdin the request body is ignored. - Inspector UI built in Lit, with tab DOM mounted once and toggled via
display:noneso switching sub-views is a CSS swap rather than a re-render.
The tab is publicly accessible and integrates out-of-the-box into [CopilotKit Enterprise Intelligence](https://docs.copilotkit.ai/threads?ref=1.57.0-release-notes).
-
registerProxiedAgentin@copilotkit/core— New API for mounting a frontend-side agent (with frontend tools, context, render hooks) against a server-defined runtime agent. Replaces an earlier per-thread cloning approach, which has been reverted because it wiped agent state on tool calls. The registry now keeps a single agent per id. ([e576bc16](https://github.com/CopilotKit/CopilotKit/commit/e576bc16), reverts [#3525](https://github.com/CopilotKit/CopilotKit/pull/3525))ts copilotkit.registerProxiedAgent({ id: "research", agent: clientAgent }); -
IntelligenceIndicatorauto-mounts in@copilotkit/react-core— When intelligence is configured on the<CopilotKit>provider, the indicator now mounts automatically. No manual placement required. ([678d143b](https://github.com/CopilotKit/CopilotKit/commit/678d143b)) -
requiresUserflag onMCPClientConfigHTTP— The runtime now accepts arequiresUserflag for HTTP MCP clients, signaling that the tool requires an authenticated end user (OAuth flow). Pairs with per-call MCP HTTP header resolution onBuiltInAgent, so headers can be derived per request rather than baked into the client config. ([8a2e6bd3](https://github.com/CopilotKit/CopilotKit/commit/8a2e6bd3), [5ee569e0](https://github.com/CopilotKit/CopilotKit/commit/5ee569e0))
Core fixes (@copilotkit/core)
ThreadStoreRegistryhardening — guard auto-unregister against the initial empty-agents seed; forwardprevStoreon unregister and freezegetAll()snapshots; tighten notify ordering so subscribers don't observe partial state during register/unregister. InternalɵMAX_SOCKET_RETRIESis now exported for tests. ([bd9fe016](https://github.com/CopilotKit/CopilotKit/commit/bd9fe016), [9b7c0517](https://github.com/CopilotKit/CopilotKit/commit/9b7c0517), [f5787e0b](https://github.com/CopilotKit/CopilotKit/commit/f5787e0b), [9fdfe23b](https://github.com/CopilotKit/CopilotKit/commit/9fdfe23b))
React fixes (@copilotkit/react-core)
- Pin-to-send re-anchors on reflow — when chat content reflows underneath the pinned send button, the anchor now recomputes instead of leaving the button visually orphaned. ([4c41270e](https://github.com/CopilotKit/CopilotKit/commit/4c41270e))
- Drop redundant
copilotkit.headersfromuseEffectdeps — prevents needless re-runs when the reference is stable. ([cdffd840](https://github.com/CopilotKit/CopilotKit/commit/cdffd840))
Inspector fixes (@copilotkit/web-inspector)
- Announcement banner — moved into the scrollable area, hardened copy-button helpers, scoped per-button reset timeouts, and consolidated
escapeHtmlinto a module-level helper. ([#4639](https://github.com/CopilotKit/CopilotKit/pull/4639)) - Tab DOM caching — keep tab DOM mounted, cache panel templates, defer off-screen events. Switching between Conversation / Agent State / AG-UI Events is now a CSS visibility swap rather than a re-render. ([e05c5ef1](https://github.com/CopilotKit/CopilotKit/commit/e05c5ef1))
- Tool-call status from parsed args — frontend-rendered generative-UI tools (charts, custom UI) never produce a
role: toolresult message. The inspector now derivesDONEfrom parsed-args presence so they no longer appear stuck inIN_PROGRESS. ([ce004920](https://github.com/CopilotKit/CopilotKit/commit/ce004920)) - Lazy-load events/state with spinner — tab clicks feel instant; the heavy fetch happens after the panel is visible. ([762eb79d](https://github.com/CopilotKit/CopilotKit/commit/762eb79d))
- Live conversation updates — re-fetch on active-agent message emit; silent background re-fetch keeps the panel in sync without flicker. ([94305c09](https://github.com/CopilotKit/CopilotKit/commit/94305c09), [09970072](https://github.com/CopilotKit/CopilotKit/commit/09970072))
- Type / JSDoc tightening — runtime+inspector types aligned with reality after the threads work; data-staleness, error-swallowing, and silent parse-fail paths plugged. ([3d616661](https://github.com/CopilotKit/CopilotKit/commit/3d616661), [daf52a20](https://github.com/CopilotKit/CopilotKit/commit/daf52a20))
Packages republished at 1.57.0
@copilotkit/runtime, @copilotkit/react-core, @copilotkit/react-ui, @copilotkit/core, @copilotkit/shared, @copilotkit/runtime-client-gql, @copilotkit/sdk-js, @copilotkit/voice, @copilotkit/web-inspector, @copilotkit/a2ui-renderer, @copilotkit/react-textarea, and @copilotkit/sqlite-runner.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.