ai.memory_postgres · version 1.3 · AI sub-node
Stores chat history in a Postgres table.
Port Kind Label Required Max connections
output 0 ai_memory
Slot Accepted kinds Required
postgresproto.postgres, postgresyes
Name Type Default Required Shown when Description
sessionIdTypeoptions "fromInput"Session ID . One of fromInput, customKey.
sessionKeystring "={{ $json.sessionId }}"sessionIdType = customKey Session Key .
contextWindowLengthnumber 5Context Window Length . How many past exchanges are given to the model.
tableNamestring "n8n_chat_histories"Table Name . Created automatically when it does not exist.
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating .
Source type Version range Status Fixtures
@n8n/n8n-nodes-langchain.memoryPostgresChat1unverified