Get Memory
AI-generatedSummary
Retrieve conversation memory data from the specified session and storage backend, with options to control which fields and format the output data.
Inputs
- Session ID (required) — The unique identifier for the conversation session whose memory is to be retrieved.
- Storage Backend (required) — The type of storage backend to use for retrieving the memory (In-Memory, Redis, PostgreSQL, or SQLite).
- TTL (Time To Live) — Expiration time in seconds for Redis storage; 0 indicates the memory never expires.
- Table Name — Name of the database table to use for PostgreSQL or SQLite storage.
- Database File Path — Path to the SQLite database file, if using SQLite backend.
- Memory Window Size — Maximum number of messages to keep in the memory window for retrieval.
- Pruning Step Size — Number of messages to prune at once when exceeding the window size.
- Max Storage Messages — Maximum number of messages to keep in the storage backend.
- Output Options — Settings to control output format, included metadata fields, use of users map, and pruning behavior.
- Get Memory Mode (required) — Whether to retrieve the full memory object or only specific selected fields.
- Fields to Get — Specific top-level memory fields to include in output when using 'Get Specific Fields' mode.
- Log Level — Verbosity level of logs generated during operation execution.
Output shape
A single item containing the retrieved memory data in a structured format or as a formatted list of chat messages.
Output format and included metadata depend on Output Options. If 'Get Specific Fields' mode is selected, only chosen fields will be present. Logs can be set from debug to error level. The memory retrieved reflects the state from the specified session in the chosen storage backend.
Examples
Example 1: Retrieve full conversation memory from Redis backend for a session
Specify Session ID, set Storage Backend to Redis, configure TTL if desired, leave Get Memory Mode as 'Get Full Memory'. Optionally customize output options to control metadata inclusion and formatting.
Example 2: Retrieve only specific fields of conversation memory from SQLite
Provide Session ID, select SQLite as Storage Backend with file path and table name, choose 'Get Specific Fields' as Get Memory Mode, then select desired fields to retrieve. Adjust output options and log level as needed.