> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-beta.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server.

# Threads

## Overview

Threads represent a conversation. Each User can have multiple threads, and each thread is a sequence of chat messages.

Chat messages are added to threads using [`thread.add_messages`](/adding-messages), which adds the messages to the thread history and ingests them into the user's Context Graph. The user Context Graph contains data from all of that user's threads.

## Relationship Between Users and Threads

`threadIds` are arbitrary identifiers that you can map to relevant business objects in your app, such as users or a conversation a user might have with your app. Before you create a thread, make sure you have created a user first.

## Automatic graph warming

When you create a new thread, Zep sends a warm-up request for the user's Context Graph in the background. This request prepares the graph data for retrieval.

The operation runs asynchronously and does not block the thread creation response. Zep sends this request when you create a thread for a user with an existing graph.

For manual graph warming, see [Warming the User Cache](/performance#warming-the-user-cache).

## Next Steps

Now that you understand how Threads work, you can:

* Learn about [Users and User Graphs](/users-and-user-graphs)
* Discover how to [add messages to threads](/adding-messages)
* Learn how to [retrieve context for your agent](/retrieving-context)
* Read per-thread [Thread summaries](/thread-summaries)
* Understand more about the [graph](/graph-overview)
* Use [Documents](/documents) to group graph episodes the way threads group messages