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.
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-corev1.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
