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
AG2Threads

Threads

Manage persistent, resumable conversations with useThreads and the Enterprise Intelligence Platform — list, create, rename, archive, and delete threads with realtime sync across devices.

What is this?#

CopilotKit threads enable persistent, resumable multi-turn conversations. The useThreads hook lists, creates, renames, archives, and deletes threads with realtime synchronization via WebSocket. Threads work with any agent framework — the Enterprise Intelligence Platform stores conversation history server-side, so users can close their browser and pick up where they left off. Thread metadata updates (renames, archives, new threads) are pushed to all connected clients in realtime without polling.

Threads run on the Enterprise Intelligence Platform
Get persistent threads, realtime sync, and observability on the free Developer tier.
Get Intelligence free

When should I use this?#

  • Your app needs multiple saved conversations per user (like a chat history sidebar)
  • Users should be able to resume a prior conversation across sessions or devices
  • You want realtime sync so threads created on one tab appear on another
  • You need to let users organize conversations by renaming or archiving them

Prerequisites#

  • The Enterprise Intelligence Platform
  • An OpenAI API key
  • For the manual path: an existing CopilotKit project on @copilotkit/react-core v1.56+

Implementation#

Next steps#

  • Understand how it works: How Threads & Persistence Work — architecture, event replay model, and WebSocket sync
  • API reference: useThreads — parameters, return values, types
  • Tutorial: Build a Multi-Conversation Chat App — end-to-end walkthrough building a chat app with thread history
On this page
What is this?When should I use this?PrerequisitesImplementationNext steps