Memory

Use the Memory block to store and retrieve messages across workflow runs. Add messages with the same conversation identifier to append to an existing conversation, retrieve one conversation or all memories, and delete memories that are no longer needed.

Usage Instructions

Integrate Memory into the workflow. Can add, get a memory, get all memories, and delete memories.

Actions

Add Memory

Add a new memory to the database or append to existing memory with the same ID.

Input

ParameterTypeRequiredDescription
conversationIdstringNoConversation identifier (e.g., user-123, session-abc). If a memory with this conversationId already exists, the new message will be appended to it.
idstringNoLegacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility.
rolestringYesRole for agent memory (user, assistant, or system)
contentstringYesContent for agent memory

Output

ParameterTypeDescription
successbooleanWhether the memory was added successfully
memoriesarrayArray of memory objects including the new or updated memory
errorstringError message if operation failed

Get Memory

Retrieve memory by conversationId. Returns matching memories.

Input

ParameterTypeRequiredDescription
conversationIdstringNoConversation identifier (e.g., user-123, session-abc). Returns memories for this conversation.
idstringNoLegacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility.

Output

ParameterTypeDescription
successbooleanWhether the memory was retrieved successfully
memoriesarrayArray of memory objects with conversationId and data fields
messagestringSuccess or error message
errorstringError message if operation failed

Get All Memories

Retrieve all memories from the database

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
successbooleanWhether all memories were retrieved successfully
memoriesarrayArray of all memory objects with key, conversationId, and data fields
messagestringSuccess or error message
errorstringError message if operation failed

Delete Memory

Delete memories by conversationId.

Input

ParameterTypeRequiredDescription
conversationIdstringNoConversation identifier (e.g., user-123, session-abc). Deletes all memories for this conversation.
idstringNoLegacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility.

Output

ParameterTypeDescription
successbooleanWhether the memory was deleted successfully
messagestringSuccess or error message
errorstringError message if operation failed