This release adds 3 notable features for engineering teams evaluating rollout.
✓ No known CVEs patched in this version
Topics
+12 more
Summary
AI summaryUpdates Build / packaging, https://github.com/CopilotKit/CopilotKit/pull/4720, and threadId across a mixed release.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Feature | Medium |
CopilotKit React Native v2 API parity with chat UI components and native useAttachments hook over expo-document-picker/expo-file-system. CopilotKit React Native v2 API parity with chat UI components and native useAttachments hook over expo-document-picker/expo-file-system. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Anonymous interaction telemetry events (banner_viewed, banner_clicked, threads_tab_clicked) in @copilotkit/web-inspector with UUID v4 distinct ID and env-var gating. Anonymous interaction telemetry events (banner_viewed, banner_clicked, threads_tab_clicked) in @copilotkit/web-inspector with UUID v4 distinct ID and env-var gating. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
position prop on CopilotSidebar to anchor left or right, defaults to right for backward compatibility. position prop on CopilotSidebar to anchor left or right, defaults to right for backward compatibility. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Feature | Medium |
followUp option in useComponent forwarded to disable automatic follow-up turn like hand-rolled frontend tool. followUp option in useComponent forwarded to disable automatic follow-up turn like hand-rolled frontend tool. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Performance | Medium |
All x-* headers forwarded across SDKs from browser through AG-UI to LLM call. All x-* headers forwarded across SDKs from browser through AG-UI to LLM call. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
Same-thread reconnect no longer resets agent state, preventing duplicate inspector events and "Message not found" toasts under React effect churn. Same-thread reconnect no longer resets agent state, preventing duplicate inspector events and "Message not found" toasts under React effect churn. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Bugfix | Medium |
iOS streaming crash in CopilotKit React Native fixed by deferring callbacks to JS thread and agentId consistency wired through. iOS streaming crash in CopilotKit React Native fixed by deferring callbacks to JS thread and agentId consistency wired through. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Bugfix | Medium |
Filter role: "reasoning" from inbound messages in LangGraphAgent.run to avoid converter errors on reasoning summaries. Filter role: "reasoning" from inbound messages in LangGraphAgent.run to avoid converter errors on reasoning summaries. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
Express 4 + 5 router compatibility fixed by replacing {*splat} wildcard with RegExp routes. Express 4 + 5 router compatibility fixed by replacing {*splat} wildcard with RegExp routes. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
LangGraph wrapper re-defaults streamSubgraphs: true to preserve subagent streaming. LangGraph wrapper re-defaults streamSubgraphs: true to preserve subagent streaming. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Refactor | Medium |
CopilotKit AgentCore runner added to monorepo release scope with sharedVersion true. CopilotKit AgentCore runner added to monorepo release scope with sharedVersion true. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
Full changelog
CopilotKit v1.57.2
A patch release on the 1.57 line. Brings @copilotkit/react-native to full v2 API parity with chat UI components and a native useAttachments hook over expo-document-picker/expo-file-system, adds a position prop on the v2 CopilotSidebar and a followUp option on useComponent, ships anonymous interaction telemetry on @copilotkit/web-inspector (env-var-gated, propagated through the runtime), widens SDK header forwarding from x-aimock-* to all x-* prefixes, and fixes a thread-switch state-reset bug that produced duplicate inspector events and "Message not found" toasts under React effect churn.
Install
npm install @copilotkit/[email protected] @copilotkit/[email protected] @copilotkit/[email protected]
Features
-
@copilotkit/react-nativefull v2 API parity — Ships the v2 chat-component suite for React Native: a headlessCopilotChat(withuseCopilotChatContextandsubmitMessage(InputContent[])), aCopilotPopupfloating overlay with FAB, aCopilotModal, and aCopilotSidebar. Native file attachments arrive via a newuseAttachmentshook backed byexpo-document-picker+expo-file-systemand aNativeFileInputdescriptor (uri/name/size/mimeType) that replaces the webFileobject;NativeAttachmentsConfigmirrors the sharedAttachmentsConfig(onUpload,onUploadFailed,accept,maxSize).CopilotKitProvidernow accepts a dynamicheadersfunction and acredentialsprop, and the package re-exports 15+ types from the v2 headless layer (includingInterruptEvent,ReactFrontendTool,ReactHumanInTheLoop).expo-document-picker(≥12) andexpo-file-system(≥17) are optional peer deps. (#4750)import { CopilotKitProvider, CopilotChat, useAttachments, } from "@copilotkit/react-native"; function Chat() { const attachments = useAttachments({ config: { enabled: true, maxSize: 20 * 1024 * 1024 }, }); return <CopilotChat attachments={attachments} />; } -
positionprop onCopilotSidebar— The v2CopilotSidebarcan now anchor to either side of the viewport. The prop flips the fixed anchor, the border side, the off-screen translate direction, and the body push margin (marginInlineStartvsmarginInlineEnd) so the layout mirrors correctly, andCopilotSidebarViewpasses a position-aware className override into the toggle slot so the floating FAB mirrors with the panel (left-6 + right-auto, merged viatailwind-mergeso the defaultright-6is dropped). Defaults to"right"for backward compatibility. (#4710)<CopilotSidebar position="left" defaultOpen /> -
followUpoption inuseComponent—useComponentwrapsuseFrontendToolbut was silently droppingfollowUp. The option is now forwarded through so a registered component renderer can disable the automatic follow-up turn the same way a hand-rolled frontend tool does. (#4897)useComponent({ name: "renderProfile", parameters: z.object({ userId: z.string() }), render: ProfileCard, followUp: false, }); -
Anonymous interaction telemetry in
@copilotkit/web-inspector— The inspector now fires three V1 funnel events directly from the browser tohttps://telemetry.copilotkit.ai/ingest—oss.inspector.banner_viewed,oss.inspector.banner_clicked, andoss.inspector.threads_tab_clicked— with a UUID v4 distinct ID persisted inlocalStorageand sent both in the POST body and as theX-CopilotKit-Telemetry-Idheader (the ingest lambda parses the header for de-aliasing). Banner CTA links are decorated with?posthog_distinct_id=<uuid>so the destination site canposthog.alias()and close thebanner_viewed → banner_clicked → signup_attributedfunnel. Telemetry can be disabled at the runtime layer via theCOPILOTKIT_TELEMETRY_DISABLEDorDO_NOT_TRACKenv var —RuntimeInfo.telemetryDisabledpropagates throughAgentRegistryandCopilotKitCore, gatingtrack(), the URL-param decoration, and the first-run console disclosure. A privacy settings cog (replacing the earlier privacy tab) exposes the in-product opt-out. Properties are scoped to event metadata only — no message content, agent state, prompts, completions, or banner markdown — and a negative test pins the wire shape. (#4719)# opt out at the runtime COPILOTKIT_TELEMETRY_DISABLED=1 npm run dev # or DO_NOT_TRACK=1 npm run dev -
All
x-*headers forwarded across SDKs —@copilotkit/sdk-jsand@copilotkit/sdk-pythonpreviously forwarded onlyx-aimock-*; the allowlist now matchesextractForwardableHeaders()in@copilotkit/runtimeand propagates everyx-*prefixed header from the browser through AG-UI to the LLM call. Lets any customx-*header (auth shims, request scoping, A/B flags) reach the model layer without a runtime patch. (#4773)
Fixes
-
@copilotkit/core: same-thread re-connect no longer resets agent state —RunHandler.connectAgentpreviously calledagent.setMessages([]),agent.setState({}), and theIntelligenceAgentdelegate'sclearReconnectCursoron every connect — including the 3–5 effect-dep churn re-connects React fires per thread switch. That forced the realtime gateway to replay the topic's full event history on every churn re-connect, producing both halves of the bug: duplicatecpki_event_idrows in the inspector AG-UI Events tab and intermittent "Message not found" toasts when the nextrunAgentfired with an emptyagent.messages.RunHandlernow tracks_lastConnectedThreadIdand gates the state-reset + cursor-clear on the threadId actually changing — same-thread churn re-connects preserve local messages/state and the gateway resumes fromlastSeenEventId; actual thread switches still wipe local state and request a full replay.IntelligenceAgent.connect()no longer auto-clears the cursor (caller-owned now);ProxiedCopilotRuntimeAgentexposesclearReplayCursor(threadId)that delegates to the Intelligence agent (no-op for non-Intelligence runtime modes). Supersedes #4720, which introduced a dispatcher dedup that broke the A → B → A restore-replay path. (#4740) -
@copilotkit/runtime/langgraph: filterrole: "reasoning"from inbound messages —@ag-ui/langgraph's converter only handlesuser/assistant/system/tooland throws"message role is not supported."on anything else. Agents that stream reasoning summaries (OpenAI Responses API +reasoning={summary: "detailed"}) emit AG-UI messages withrole: "reasoning"that the client replays in the next turn'sinput.messages, so the converter crashed before the model was ever called and the second pill click in a multi-turn thread produced anINCOMPLETE_STREAMerror. CopilotKit'sLangGraphAgent.runsubclass now stripsrole: "reasoning"frominput.messagesbefore delegating tosuper— the narrowest fix at the runtime/AG-UI boundary, only the inbound message list is filtered so the outbound event stream still carries reasoning summaries to the client and the<ReasoningBlock>slot keeps rendering on the active turn. (#4780) -
Express 4 + 5 router compatibility — The Express adapter used the
{*splat}wildcard syntax introduced in Express 5, which Express 4 rejects on mount. Replaced the string-based wildcard patterns withRegExproutes that work on both major versions. Same PR pins@types/reactto19.1.8at the workspacepnpmoverride (and on thechat-with-your-dataexample) —@types/react19.2.x breaksrechartsclass-component types with"JSX element class does not support attributes because it does not have a 'props' property."(#4447) -
LangGraph wrapper re-defaults
streamSubgraphs: true—@ag-ui/langgraph0.0.31+ flipped thestreamSubgraphsdefault fromtruetoundefined, which silently broke subagent streaming. The CopilotKitLangGraphAgent.runwrapper now enriches the input'sforwardedPropswithstreamSubgraphs: trueas the default while preserving any explicit user override via??. (#4446) -
@copilotkit/react-native: iOS streaming crash + agentId consistency — The XHR-based streaming-fetch shim's callbacks were running on the network thread, which crashed iOS on tear-down. Callbacks now defer to the JS thread. TheagentIdprop is wired through for consistency with the web SDK, andCopilotKitProvideraccepts a dynamicheadersfunction and acredentialsprop.
Build / packaging
@copilotkit/agentcore-runnerwired into monorepo release scope — The AWS Bedrock AgentCore-compatible agent runner was added to the repo earlier but never registered inrelease.config.json, sorelease / create-prandrelease / publishskipped it. It is now in the monorepo scope (sharedVersion=true) and ships at1.57.2alongside its siblings (e.g.@copilotkit/sqlite-runner). (#4705)
Packages republished at 1.57.2
@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, @copilotkit/sqlite-runner, and @copilotkit/agentcore-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.
Share this release
About CopilotKit
The Frontend Stack for Agents & Generative UI. React + Angular. Makers of the AG-UI Protocol
Related context
Related tools
Beta — feedback welcome: [email protected]