An n8n community node providing advanced PostgreSQL-based chat memory for AI agents, with support for schema isolation, auto table creation, session tracking, user ID handling, working memory persistence with tool integration, and semantic search via RAG. Current stable version 2.3.7, released regularly on npm. Key differentiators include schema support (multi-tenant), automatic schema/table creation, optional session metadata table, and a dedicated Working Memory Tool node for structured memory updates. Requires n8n >=1.0 and PostgreSQL >=9.5.
npm install n8n-nodes-postgres-advanced-memoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import, configure credentials, set memory options, and optionally initialize WorkingMemoryTool.
Add a WorkingMemoryTool node to your workflow and connect it as a tool input to the AI Agent.
Use a unique schema name or table name, or manually drop the existing table before first run.
Update sessionKey option to the new expression syntax: '={{ $json.sessionId }}'.Remove sessionEnabled and rely on sessionKey; if you need a metadata table, set up the separate session tracking options.
Run 'CREATE EXTENSION vector;' on your PostgreSQL database before enabling semantic search.
Start PostgreSQL service and verify connection parameters (host, port, user, password).
Use 'import { MemoryPostgresAdvanced } from ...' (named import) and instantiate with 'new MemoryPostgresAdvanced()'.Use a different table name or schema, or drop the existing table: DROP TABLE IF EXISTS public.n8n_chat_histories CASCADE;
Connect to database and run: CREATE EXTENSION vector; then restart n8n and the workflow.