Memory

AI memory through your existing API call

Add a memory parameter to your chat completion request and your AI remembers users across sessions.

Memory
POST /v1/chat/completions
{
"model":"google/gemma-4-31b-it"
"messages":[
0:{
"role":"system"
"content":"You are a thoughtful personal assistant."
}
1:{
"role":"user"
"content":"What should I get my girlfriend for her birthday?"
}
]
"max_tokens":1024
"sansa":{
"memory":{
"user_id":"usr_8f3a"
}
}
}
{
"model":"google/gemma-4-31b-it"
"choices":[
0:{
"index":0
"message":{
"role":"assistant"
"content":"You said she's been really into knitting lately, a high-quality yarn set or a pattern book could be a great pick."
}
"finish_reason":"stop"
}
]
"sansa":{
"memory":{
"recalled":[
0:{
"id":"mem_b4d8"
"fact":"User's girlfriend recently started knitting as a hobby"
}
]
"stored":[
0:{
"id":"mem_c5e9"
"fact":"User is looking for a birthday gift for girlfriend"
}
]
}
}
"usage":{
"prompt_tokens":186
"completion_tokens":54
"total_tokens":240
}
}
One field in your request body. That's it.

LATENCY

<50ms

RETENTION

90d

MEMORIES

Unlimited
Integration

One field. Persistent memory.

Add user_id or agent_id to the sansa.memory object and every model call starts remembering. Without having to set up a vector database, an embedding pipeline, or retrieval code.

svg
svg
How it works

Learns from conversations

Before each request, Sansa searches the memory store for that user_id or agent_id and injects relevant facts into context. After the model responds, new information is extracted and stored automatically.

Memory API

Your data, your rules

Use the Memory API to get more control over stored memories to build admin dashboards, handle deletion requests, or pre-populate context before a user's first conversation.

svg-animation

Your all-in-one AI backend.

Get started for free.