Introduction
Memory lets you store variables that persist between conversations, workflows, and nodes. Unlike Context (which is only available during the current conversation), Memory keeps data available for future interactions with the user.One memory per user, four ways to reach it. Memory is a single per-user store you access from different surfaces depending on where you are working:
- Builder —
{{$memory.key}}placeholder and$memory.set/get/...methods in code nodes. - Functions —
ctx.memoryclient (see thectx.memoryguide). - AI Agent —
memory_managernative tool (see Native tools). - REST API — endpoints
POST https://gateway.jelou.ai/workflows/v2/memory/users/{get-all|find-one|set}.
Key features
Data types
TTL (Time To Live): Lifetime in seconds of each variable. Once the TTL elapses, the variable is automatically deleted. For example,
3600 = 1 hour, 86400 = 1 day.How long Memory lasts overall
Memory has two independent clocks running at the same time:
Mental rule: if the user writes anything to Memory at least once every 30 days, their memory lives indefinitely. If 30 full days pass without a write, all their memory is wiped. Each variable may still expire earlier due to its own TTL without affecting the rest.
Only writing (
set, setJson, setFile) renews the hashTTL. Reading (get, getJson, getFile) does not count.Saving variables
Using the Variable node
To save variables without code, use the Variable node inside theLogic section. In Variable enter the name and in Value what you want to save; it can be plain text, another variable, or a context value.
Each Variable node allows a maximum of 20 variables. If you need more, use multiple nodes or save the values from a code node.
Using code nodes
For greater control over TTL and complex data types, use the$memory methods in code nodes:
Reading variables
In any node
Inside any node you can access Memory with the syntax{{$memory.variableName}}. For example, if the variables in memory are:
{{$memory.name}}showsJohn{{$memory.lastOrder.status}}showson the way
In code nodes
Use the specific methods according to the data type:Working with files
When saving a file in Memory, you must provide the content in base64, the TTL, and the MIME type:$memory.getFile() you get a FileHandle with three methods to access the content: