Window Memory
Stores the last N messages in a sliding window buffer, giving AI agents conversation context across messages. Optionally persists memory across workflow runs using workflow state.
Use Window Memory for:
- Prototyping chatbots where you need basic conversation continuity
- Short conversations where recent context is sufficient (customer support, Q&A)
- Lightweight deployments where you don't want external vector database dependencies
For long-term memory with semantic recall, use Qdrant Memory instead.
Window Memory is a sub-node — it connects to an AI Agent's Memory handle, not to the main data flow.
| Setting | Type | Default | Description |
|---|---|---|---|
windowSize | number | 20 | Number of recent messages to keep. Older messages are dropped from the window. |
sessionKey | string | — | Scope key for per-user or per-thread memory. Use bindings like thread:{{ input.body.thread_id }}. |
persistent | boolean | true | When enabled, memory is saved to workflow state (SQLite) and survives workflow restarts. Disable for volatile in-memory only. |
- When the agent starts processing a message, it calls
load()on the memory provider - Window Memory returns the last
windowSizemessages from the session - These messages are prepended to the LLM's conversation context
- After the agent responds, the new user message and assistant response are saved via
save() - If the window exceeds
windowSize, the oldest messages are dropped
Connect Window Memory to an AI Agent for a simple chatbot:
- Add an AI Agent node
- Add a Window Memory node
- Connect Window Memory to the agent's
Memoryhandle (dashed purple edge) - Set
windowSizeto10andpersistenttotrue - Set a
sessionKeybinding to scope memory per user:user:{{ "{{ webhook.body.user_id }}" }}
The agent will remember the last 10 messages per user across workflow runs.
Session keys isolate memory between different users or conversation threads. Without a session key, all messages share one global buffer.
Common patterns:
user:{{ "{{ webhook.body.user_id }}" }}— per-user memorythread:{{ "{{ webhook.body.thread_id }}" }}— per-thread memory- Static value (e.g.
global) — shared memory for all requests
- Window size vs token limits: A large window (50+ messages) can exceed the LLM's context window. Start with 10–20 and increase as needed.
- Persistent mode: When enabled, memory survives workflow restarts but uses workflow state storage. For high-traffic deployments, consider Qdrant Memory instead.
- No semantic search: Window Memory only returns recent messages. It cannot recall relevant information from older conversations. Use Qdrant Memory for semantic recall.
- AI Agent — the agent that uses this memory
- Qdrant Memory — vector store memory with semantic search
- Agent Memory Guide — choosing and configuring memory
