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
      • POSTAdd Session
      • GETGet Session.
      • GETGet Sessions
      • GETGet Session Memory
      • GETGet Messages for Session
      • POSTAdd Memory to Session
      • DELDelete Session
LogoLogo
PlaygroundDiscordStatusDashboardSign Up >
SDK ReferenceMemory

Get Session Memory

GET
https://api.getzep.com/api/v2/sessions/:sessionId/memory
GET
/api/v2/sessions/:sessionId/memory
$curl https://api.getzep.com/api/v2/sessions/sessionId/memory \
> -H "Authorization: <apiKey>"
1{
2 "context": "string",
3 "facts": [
4 "string"
5 ],
6 "messages": [
7 {
8 "content": "string",
9 "role_type": "norole",
10 "created_at": "string",
11 "metadata": {},
12 "processed": true,
13 "role": "string",
14 "token_count": 1,
15 "updated_at": "string",
16 "uuid": "string"
17 }
18 ],
19 "metadata": {},
20 "relevant_facts": [
21 {
22 "content": "string",
23 "created_at": "string",
24 "fact": "string",
25 "uuid": "string",
26 "expired_at": "string",
27 "invalid_at": "string",
28 "name": "string",
29 "rating": 1.1,
30 "source_node_name": "string",
31 "target_node_name": "string",
32 "valid_at": "string"
33 }
34 ],
35 "summary": {
36 "content": "string",
37 "created_at": "string",
38 "metadata": {},
39 "related_message_uuids": [
40 "string"
41 ],
42 "token_count": 1,
43 "uuid": "string"
44 }
45}
Returns a memory for a given session.
Was this page helpful?
Previous

Get Messages for Session

Next
Built with

Path parameters

sessionIdstringRequired
The ID of the session for which to retrieve memory.

Query parameters

lastnintegerOptional
The number of most recent memory entries to retrieve.
minRatingdoubleOptional
The minimum rating by which to filter relevant facts.

Response

OK
contextstring
Memory context containing relevant facts and entities for the session. Can be put into the prompt directly.
factslist of strings

Deprecated: Use relevant_facts instead.

messageslist of objects

A list of message objects, where each message contains a role and content. Only last_n messages will be returned

metadatamap from strings to any
Deprecated
relevant_factslist of objects
Most relevant facts to the recent messages in the session.
summaryobject

Deprecated: Use context string instead.

Errors

404
Not Found Error
500
Internal Server Error