Memory Retrieve Node
Overview
The Memory Retrieve Node is a data retrieval component that fetches stored information from memory for use in current workflow executions. This node enables access to previously stored data and context.
Node Type Information
Type | Description | Status |
---|---|---|
Batch Trigger | Starts the flow on a schedule or batch event. Ideal for periodic data processing. | ❌ False |
Event Trigger | Starts the flow based on external events (e.g., webhook, user interaction). | ❌ False |
Action | Executes a task or logic as part of the flow (e.g., API call, transformation). | ✅ True |
This node is an Action node that retrieves data from memory for use in current workflow executions.
Features
Key Functionalities
-
Memories Search: Search memories using natural language queries.
-
Filtering: Apply filters to refine search results and restrict them to particular uniqueId and sessionId.
-
Configurable Results: Control the number of memories returned.
Benefits
-
Contextual Retrieval: Access relevant memories based on similarity.
-
Precision: Fine-tune results using filters.
-
Flexibility: Support for both raw and processed memory formats, allowing the retrieved memory to be passed directly to any AI Node.
What can I build?
-
AI Nodes that can reference past memories for context-aware responses.
-
Knowledge bases with natual language querying capabilities.
-
Personalized recommendation systems based on user's memories.
Setup
Configure the Memory Retrieve Node
- Select the Memory Retrieve Node in your workflow.
- Define your search query.
- Choose the memory collection to search.
- Configure the embedding model.
- Set optional filters and result limits.
- Deploy the project.
Configuration Reference
Parameter | Description | Example Value |
---|---|---|
Search Query | The natural language query to search memories | What are the user's preferences? |
Memory Store | The collection to search for memories | MemoryStore |
Embedding Model Name | Model used for converting search query to vectors | text-embedding-ada-002 |
Limit | Maximum number of memories to return | 3 |
Filters | JSON-based filters to refine search results | 'Set them up using UI condition builder' |
Filter Memory Retrieval
To Apply the Filter in Memory Retrieve Node, Click on the Filters
- Here you can apply condition on
- Session Id
- Meta Data
- Timestamp
- Memory
- Unique Id
Outputs
The node provides two output formats:
- Memories: Processed memory objects ready for use in any AI Node
- Raw Memories: Unprocessed memory data including metadata and embeddings
Low-Code Example
- nodeId: memoryRetrieveNode_951
nodeType: memoryRetrieveNode
nodeName: Memory Retrieve
values:
limit: '3'
filters: |-
{
"operator": "And",
"operands": [
{
"path": [
"uniqueId"
],
"operator": "Equal",
"valueText": "{{triggerNode_1.output.userId}}"
}
]
}
searchQuery: User likes what
memoryCollection: NewMemory
embeddingModelName:
type: embedder/text
model_name: default
credentialId: some id
provider_name: openai
credential_name: NEW PROVIDER
needs:
- memoryNode_858
Output
-rawMemories
: An array of objects representing unprocessed or original memory data retrieved from storage.
-memories
: An array of objects containing processed or formatted memory data retrieved based on the node's query or criteria.
Example Output
{
"rawMemories": [],
"memories": []
}
Using Retrieved Memory in AI Nodes
In the respective AI Node, add memories under Memories inside Additional Properties by clicking the Plus icon.
Common Issues and Debugging
-
Memory Not Being Retrieved
- Verify you're using the same Unique Id used during storage
- Check if the Session Id matches (if using session-specific storage)
- Ensure the Memory Collection name is consistent between add and retrieve nodes
- Validate that the embedding model dimensions match between storage and retrieval
-
Incorrect Results
- Verify the search query is properly formatted
- Check if filters are correctly configured
- Ensure the limit parameter is set appropriately
- Test with simpler queries first to isolate issues
Troubleshooting Steps
-
Check Node Configuration
- Verify all required fields are filled
- Ensure model names are spelled correctly
- Validate JSON format in metadata field
-
Monitor Workflow Logs
- Look for error messages in the execution logs
- Check for timeout or rate limit errors
- Verify successful model API calls
-
Test Memory Operations
- Use the workflow testing feature to verify storage
- Confirm immediate retrieval after storage
- Test with simple data before complex implementations