Threads
Add persistent, resumable agent conversations without building storage, replay, synchronization, and lifecycle infrastructure yourself.
A durable home for every agent conversation#
With Threads, users can close the browser, return on another device, reopen a conversation, and continue from the same event history while active runs reconnect in realtime. Generative UI renders again as part of that history, and multimodal inputs stay stored with the conversation.
Without CopilotKit Threads, your team has to design the storage model, replay historical events and generative UI, persist multimodal inputs, reconnect live streams, synchronize thread lists, coordinate concurrent runs, and build lifecycle APIs before you can ship the conversation experience itself. Enterprise Intelligence handles that infrastructure so you can focus on your agent and product UI.

Why use CopilotKit Threads?#
Threads turn a streamed agent run into a product experience users can leave and return to. They provide:
- durable event history across reloads, sessions, and devices
- seamless replay before a conversation reconnects to a live run
- generative UI restored as part of the conversation history
- multimodal inputs stored alongside the thread that uses them
- realtime thread-list updates without polling
- generated names plus rename, archive, unarchive, delete, and pagination APIs
- thread-level locking that prevents concurrent runs from interleaving events
- the same persistence model across agent frameworks
What CopilotKit handles#
| CopilotKit handles | You control |
|---|---|
| Durable event storage and replay | Your agent's behavior and tools |
| Replay-to-live stream reconnection | The conversation experience and layout |
| Realtime thread metadata synchronization | Which thread actions your users can access |
| Naming, pagination, archive, and delete semantics | Application authorization and permissions |
| Runtime-to-platform event plumbing and thread locks | Mapping to native framework sessions when needed |
| Cloud-hosted or self-hosted platform infrastructure | The deployment model that fits your organization |
How Threads work#
Both UI paths use the same Threads infrastructure. A stable threadId connects the visible conversation to the runtime and its durable event history.
- Your UI opens a conversation with a stable
threadId. CopilotRuntimeruns your agent and sends conversation events to Enterprise Intelligence.- When users return, Enterprise Intelligence replays the stored history, reconnects any live run, and synchronizes thread metadata.
Headless means custom UI, not custom infrastructure
Threads Drawer and Headless Threads use the same persistence, replay, synchronization, and locking infrastructure. Choose Headless Threads when you want to build the interface yourself, not when you want to rebuild the Threads backend.
Choose how to build the UI#
| If you want to... | Choose | Start here |
|---|---|---|
| Ship a mobile-friendly conversation sidebar with switching, new conversations, archive, delete, and pagination already wired to your chat | Threads Drawer | Set up the Threads Drawer → |
| Build a custom layout, workflow, permission model, or thread action UI while CopilotKit continues to handle the backend | Headless Threads | Build a custom thread UI → |
Threads Drawer
Ship a mobile-friendly conversation sidebar with switching, new conversations, archive, delete, and pagination already wired to your chat.
Set up the Threads Drawer →Headless Threads
Build a custom layout, workflow, permission model, or thread action UI while CopilotKit continues to handle the backend.
Build a custom thread UI →Bring existing conversations#
Threads capture new CopilotKit conversations once your app uses Enterprise Intelligence. If you already have persisted Google ADK or LangGraph conversations, follow the Import Thread History guide to bring supported history into the same thread store. Users can then resume imported and new conversations through the same UI.
CopilotKit Threads are separate from native framework session or checkpoint stores. Your backend can keep a stable mapping when the agent framework also needs its own conversation identifier.
Next steps#
- Understand the architecture: Threads & Persistence Architecture — event replay, live reconnection, synchronization, locking, and lifecycle behavior
- Use the hosted platform: Cloud-Hosted Enterprise Intelligence — create and manage the project where your app stores threads and runtime credentials
- Run it in your infrastructure: Self-Hosting Enterprise Intelligence — operate the Threads platform in your own Kubernetes environment
- Look up the API: useThreads reference — parameters, lifecycle methods, pagination, and return types