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

Add Memory to Session

POST
https://api.getzep.com/api/v2/sessions/:sessionId/memory
POST
/api/v2/sessions/:sessionId/memory
$curl -X POST https://api.getzep.com/api/v2/sessions/sessionId/memory \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "messages": [
> {
> "content": "string",
> "role_type": "norole"
> }
> ]
>}'
1{
2 "context": "string"
3}
Add memory to the specified session.
Was this page helpful?
Previous

Delete Session

Next
Built with

Path parameters

sessionIdstringRequired
The ID of the session to which memory should be added.

Request

A Memory object representing the memory messages to be added.
messageslist of objectsRequired
A list of message objects, where each message contains a role and content.
fact_instructionstringOptional
Deprecated
ignore_roleslist of enumsOptional
Optional list of role types to ignore when adding messages to graph memory. The message itself will still be added, retained and used as context for messages that are added to a user's graph.
return_contextbooleanOptional
Optionally return memory context relevant to the most recent messages.
summary_instructionstringOptional
Deprecated

Response

An object, optionally containing memory context retrieved for the last message
contextstring

Errors

500
Internal Server Error