Skip to main content

Agent Memory Node

The Agent Memory Node provides a mechanism for persistent memory storage, allowing the Sequential Agent workflow to retain the conversation history state.messages and any custom State previously defined across multiple interactions

This long-term memory is essential for agents to learn from previous interactions, maintain context over extended conversations, and provide more relevant responses.

Where the data is recorded

By default, Flowise utilizes its built-in SQLite database to store conversation history and custom state data, creating a "checkpoints" table to manage this persistent information.

Understanding the Agent Memory Node

The Agent Memory Node serves as the intermediary between the conversational workflow and the database, tracking the conversation history and custom state information for specific chat sessions.

  • It assigns a unique session ID to each conversation, allowing multiple chats to be managed simultaneously.
  • It manages changes in State (conversation history and custom State) throughout the workflow's execution, tracking these changes and committing them to the database.
  • It retrieves the latest State from the database for a chat session, ensuring continuity between conversations.

Inputs

RequiredDescription
Memory OptionsNoA configuration object to customize how memory is managed (e.g., database connections).

Outputs

The Agent Memory Node has no direct outputs. Instead, it connects to the Start Node as its input, providing memory functionality to the entire Sequential Agent workflow.

How the memory is used

When a user interacts with an Agent in which the Start Node is connected to an Agent Memory Node, a unique session ID is generated to identify the conversation. Each time the user engages with the workflow, the conversation history and any custom State are:

  1. Retrieved from the database using the conversation's session ID.
  2. Updated to include the latest user inputs and agent responses.
  3. Committed back to the database for future use.

This allows the workflow to provide contextually relevant responses based on the complete conversation history, even for interactions spanning multiple sessions over extended periods.

Best Practices

Leverage memory for personalization

Use the Agent Memory Node to store preferences, language patterns, and interaction history to tailor responses to individual users over time.

Balance context and performance

When working with large conversation histories, consider implementing strategies to manage context window limitations, such as summarizing or focusing on relevant portions of the conversation history.