Memscend Memory
AI-generatedSummary
Manage conversational memories within a session using the Memscend AI memory service by retrieving contextually relevant or recent memories and saving new conversation inputs and outputs.
Inputs
- Session ID (required) — Unique identifier for the conversation session, used to isolate memories with a session-specific tag.
- User ID — Identifier for the user to whom memories are attributed; defaults to Session ID if omitted.
- Scope — Category for the memories such as Facts, Preferences, Persona, or Constraints to organize stored data.
- Tags — Comma-separated tags to categorize memories; session-specific tag added automatically.
- Search Mode — Method to retrieve memories: "Semantic" retrieves contextually relevant memories via vector similarity, while "Recent" returns the most recent memories chronologically.
- Top K Results — Maximum number of memories to fetch and include in the AI agent's context (1 to 50).
- Memory Key — The data key under which retrieved memories are exposed to the AI agent in the workflow.
- Return Messages — Choose whether to return memories as structured message objects (true) or as a plain text string (false).
- Input Key — The field name in input data containing user queries to save as conversation context.
- Output Key — The field name in output data containing AI responses to save as conversation context.
- Advanced Options.TTL (Days) — Time-to-live in days for each memory; 0 means memories are kept indefinitely.
- Advanced Options.Time Decay Weight — For semantic search, a weight between 0.0 and 1.0 balancing relevance (lower values) vs recency (higher values).
- Advanced Options.Idempotency Key — Unique key to prevent duplicate memories for the same content; recommended to use a workflow-specific value like execution ID.
Output shape
a single object containing the memory context keyed under the user-defined Memory Key
The output includes either an array of structured message objects or a single concatenated string representing the conversation memory context, depending on the Return Messages setting. The memories are filtered by session, user, scope, tags, and search criteria selected. This memory context can then be passed to AI agents for conversational understanding or continuation.
Examples
Example 1: Retrieve the 10 most semantically relevant conversation memories for session "abc123" with tag "support", returning messages as structured objects, using TTL of 7 days and saving user input/output under keys "userInput" and "agentResponse".
Set Session ID to "abc123", Tags to "support", Top K Results to 10, Search Mode to Semantic, Return Messages to true, TTL to 7, Input Key to "userInput", Output Key to "agentResponse".