Memory Storage Block
Persistent data management system
Advanced memory management system for storing, retrieving, and managing persistent data across workflow executions. Supports conversation history, data caching, and intelligent retrieval with filtering options — reach for it whenever a workflow needs to remember state between runs or across turns of a multi-step interaction.
Overview
| Property | Value |
|---|---|
| Type | memory |
| Category | blocks |
| Color | #F64F9E |
When to Use
- Store conversation messages (user, assistant, or system) keyed by a session or thread identifier so an agent can recall prior turns
- Retrieve a single named record with optional limit and sort direction to feed history into a prompt
- Pull all records for a workflow at once, optionally filtered by role type, for auditing or batch processing
- Remove a specific record when a session ends or data must be cleared
- Cache intermediate results between workflow runs to avoid re-computing expensive operations
- Build multi-turn chatbot experiences where context must persist across separate workflow executions
Configuration
Memory Operation
Selects which storage action to perform. Every other field is conditional on this choice.
| Label | id |
|---|---|
| Store New Data | add |
| Retrieve All Records | getAll |
| Fetch Specific Record | get |
| Remove Record | delete |
Default: add.
add — Store New Data
Appends a new message entry to the record identified by id. If a record with that identifier already exists the new data is appended to it.
| Sub-block | id | Type | Required | Notes |
|---|---|---|---|---|
| Record Identifier | id | short-input | Yes | Unique key for the record |
| Message Role | role | dropdown | Yes | See role options below |
| Data Content | content | long-input | Yes | Text to persist |
Role options:
| Label | id |
|---|---|
| Human Input | user |
| AI Response | assistant |
| System Instruction | system |
get — Fetch Specific Record
Retrieves one named record by its identifier, with optional limit and sort controls.
| Sub-block | id | Type | Required | Notes |
|---|---|---|---|---|
| Record Identifier | id | short-input | Yes | Key of record to fetch |
| Retrieval Limit | limit | slider (1–100) | No | Max messages to return; default 10 |
| Sort Order | sortOrder | dropdown | No | See sort options below |
Sort order options:
| Label | id |
|---|---|
| Newest First | desc |
| Oldest First | asc |
getAll — Retrieve All Records
Returns every record stored for the current workflow, with optional limit, sort, and role filter.
| Sub-block | id | Type | Required | Notes |
|---|---|---|---|---|
| Retrieval Limit | limit | slider (1–100) | No | Max messages per record; default 10 |
| Sort Order | sortOrder | dropdown | No | See sort options below |
| Filter by Type | filterType | dropdown | No | See filter options below |
Sort order options:
| Label | id |
|---|---|
| Newest First | desc |
| Oldest First | asc |
Filter type options:
| Label | id |
|---|---|
| All Types | all |
| Human Input Only | user |
| AI Response Only | assistant |
| System Instructions Only | system |
delete — Remove Record
Permanently removes a specific record by identifier.
| Sub-block | id | Type | Required | Notes |
|---|---|---|---|---|
| Record Identifier | id | short-input | Yes | Key of record to remove |
Inputs & Outputs
Inputs:
operation(string) — Memory operation type to execute (add,get,getAll,delete)id(string) — Unique record identifier (required foradd,get,delete)role(string) — Message role classification (user,assistant,system; required foradd)content(string) — Data content to store (required foradd)limit(number) — Maximum number of messages per record to retrieve (used withgetandgetAll)sortOrder(string) — Sort direction for retrieved records (ascordesc; used withgetandgetAll)filterType(string) — Filter records by message role type (all,user,assistant,system; used withgetAll)
Outputs:
memories(json) — Retrieved memory records with metadataid(string) — Processed record identifiercount(number) — Number of records processedsuccess(boolean) — Operation completion status
Tools
Store New Data (memory_add) — POSTs a new message entry (role + content) under the given key for the current workflow. If a record with the same key already exists the entry is appended to it. Required params: id, role, content.
Fetch Specific Record (memory_get) — GETs a single record by key for the current workflow. Supports optional limit (default 10) and sortOrder (asc/desc, default desc) query parameters.
Retrieve All Records (memory_get_all) — GETs all records for the current workflow. Supports optional limit, sortOrder, and filterType query parameters. Returns an array of record objects each containing key, type, data, createdAt, and updatedAt.
Remove Record (memory_delete) — DELETEs a record by key for the current workflow. Permanently removes all entries stored under that identifier.
YAML Example
memory_1:
type: memory
name: "Memory Storage"
inputs:
operation: "add"
id: "{{starter.sessionId}}"
role: "user"
content: "{{starter.message}}"
connections:
outgoing:
- target: agent_1