github CopilotKit/CopilotKit v1.57.0

latest releases: v1.60.2, archive/docs-retired-2026-06-17, bot/v0.0.2...
one month ago

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/react-core@1.57.0 @copilotkit/react-ui@1.57.0 @copilotkit/runtime@1.57.0

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 (last STATE_SNAPSHOT payload), and AG-UI Events (full event stream with payload highlighting). Backed by:

    • ThreadStoreRegistry in @copilotkit/core (keyed by agentId) and a new onAgentRunStarted subscriber event so the inspector subscribes before agent.runAgent() snapshots the subscriber list.
    • useThreads hook in @copilotkit/react-core that fetches threads and subscribes to a Phoenix WebSocket channel for real-time metadata.
    • New runtime endpoints GET /threads/:id/events and GET /threads/:id/state, plus list/update/archive/delete handlers, wired through both InMemoryAgentRunner and the Intelligence platform's _inspect/threads/:id/{events,state} endpoints. getThreadState() walks per-run compacted events and returns the latest STATE_SNAPSHOT payload.
    • All thread mutations authenticate via identifyUser(request); userId in the request body is ignored.
    • Inspector UI built in Lit, with tab DOM mounted once and toggled via display:none so 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).

  • registerProxiedAgent in @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](e576bc16), reverts [#3525](#3525))

    ts copilotkit.registerProxiedAgent({ id: "research", agent: clientAgent });

  • IntelligenceIndicator auto-mounts in @copilotkit/react-core — When intelligence is configured on the <CopilotKit> provider, the indicator now mounts automatically. No manual placement required. ([678d143b](678d143b))

  • requiresUser flag on MCPClientConfigHTTP — The runtime now accepts a requiresUser flag for HTTP MCP clients, signaling that the tool requires an authenticated end user (OAuth flow). Pairs with per-call MCP HTTP header resolution on BuiltInAgent, so headers can be derived per request rather than baked into the client config. ([8a2e6bd3](8a2e6bd3), [5ee569e0](5ee569e0))

Core fixes (@copilotkit/core)

  • ThreadStoreRegistry hardening — guard auto-unregister against the initial empty-agents seed; forward prevStore on unregister and freeze getAll() snapshots; tighten notify ordering so subscribers don't observe partial state during register/unregister. Internal ɵMAX_SOCKET_RETRIES is now exported for tests. ([bd9fe016](bd9fe016), [9b7c0517](9b7c0517), [f5787e0b](f5787e0b), [9fdfe23b](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](4c41270e))
  • Drop redundant copilotkit.headers from useEffect deps — prevents needless re-runs when the reference is stable. ([cdffd840](cdffd840))

Inspector fixes (@copilotkit/web-inspector)

  • Announcement banner — moved into the scrollable area, hardened copy-button helpers, scoped per-button reset timeouts, and consolidated escapeHtml into a module-level helper. ([#4639](#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](e05c5ef1))
  • Tool-call status from parsed args — frontend-rendered generative-UI tools (charts, custom UI) never produce a role: tool result message. The inspector now derives DONE from parsed-args presence so they no longer appear stuck in IN_PROGRESS. ([ce004920](ce004920))
  • Lazy-load events/state with spinner — tab clicks feel instant; the heavy fetch happens after the panel is visible. ([762eb79d](762eb79d))
  • Live conversation updates — re-fetch on active-agent message emit; silent background re-fetch keeps the panel in sync without flicker. ([94305c09](94305c09), [09970072](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](3d616661), [daf52a20](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.

Don't miss a new CopilotKit release

NewReleases is sending notifications on new releases.