For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
PlaygroundDiscordStatusDashboardSign Up >
DocumentationSDK ReferenceGraphiti
DocumentationSDK ReferenceGraphiti
  • SDK Reference
      • GETGet threads
      • POSTStart a new thread.
      • DELDelete thread
      • GETGet user context
      • GETGet messages of a thread
      • POSTAdd messages to a thread
      • POSTAdd messages to a thread in batch
      • GETGet thread summary
LogoLogo
PlaygroundDiscordStatusDashboardSign Up >
SDK ReferenceThread

Get messages of a thread

GET
https://api.getzep.com/api/v2/threads/:threadId/messages
GET
/api/v2/threads/:threadId/messages
1from zep_cloud import Zep
2
3client = Zep(
4 api_key="YOUR_API_KEY",
5)
6client.thread.get(
7 thread_id="threadId",
8 limit=1,
9 cursor=1000000,
10 lastn=1,
11)
1{
2 "messages": [
3 {
4 "content": "string",
5 "role": "norole",
6 "created_at": "string",
7 "metadata": {},
8 "name": "string",
9 "processed": true,
10 "uuid": "string"
11 }
12 ],
13 "row_count": 1,
14 "thread_created_at": "string",
15 "total_count": 1,
16 "user_id": "string"
17}
Returns messages for a thread.
Was this page helpful?
Previous

Add messages to a thread

Next
Built with

Path parameters

threadIdstringRequired
Thread ID

Query parameters

limitintegerOptional
Limit the number of results returned
cursorlongOptional
Cursor for pagination
lastnintegerOptional

Number of most recent messages to return (overrides limit and cursor)

Response

OK
messageslist of objects
A list of message objects.
row_countinteger
The number of messages returned.
thread_created_atstring
The thread creation timestamp.
total_countinteger
The total number of messages.
user_idstring
The user ID associated with this thread.

Errors

404
Not Found Error
500
Internal Server Error