After this lesson, you will be able to: Implement short-term and long-term memory in n8n and Make.com so your agent remembers past interactions.
Out of the box, agents have amnesia between sessions. Memory is the bridge, short-term (recent chat) and long-term (cross-session facts). This lesson upgrades the n8n and Make agents we built earlier with both memory types using Postgres, Airtable, and a vector store.
Short-term, last N messages of this conversation. Cheap, simple, fits in the prompt. n8n's 'Window Buffer Memory' node does this. Long-term, persistent facts across sessions. Stored in a database or vector store and retrieved when relevant.
1. In your n8n AI Agent workflow, replace 'Window Buffer Memory' with 'Postgres Chat Memory'.
2. Connect a Postgres database (Neon free tier works, paste the connection string into n8n credentials).
3. The session ID field, set to the user's email or a chat session ID. n8n auto-creates the table.
4. Now every conversation is stored persistently. The agent recalls past chats per session ID.
1. In your Make scenario, before the AI module, add an 'Airtable. Search Records' module. Filter by user ID.
2. Pass the matching records into the AI prompt: 'Here is what we know about this user: {{records}}. Now respond to: {{message}}.'
3. After the AI module, add an 'Airtable. Update Record' module to write any new facts the AI extracted back to Airtable.
Memory adds latency and cost. If your agent doesn't need to recall past interactions (one-shot tasks like 'translate this text'), skip it. Memory is for relationship-style interactions: support, coaching, personal assistants.
Sign in and purchase access to unlock this lesson.