Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Postgres Chat Memory

ai.memory_postgres · version 1.3 · AI sub-node

Stores chat history in a Postgres table.

Ports

PortKindLabelRequiredMax connections
output 0ai_memory

Credentials

SlotAccepted kindsRequired
postgresproto.postgres, postgresyes

Parameters

NameTypeDefaultRequiredShown whenDescription
sessionIdTypeoptions"fromInput"Session ID. One of fromInput, customKey.
sessionKeystring"={{ $json.sessionId }}"sessionIdType = customKeySession Key.
contextWindowLengthnumber5Context Window Length. How many past exchanges are given to the model.
tableNamestring"n8n_chat_histories"Table Name. Created automatically when it does not exist.

Import

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 typeVersion rangeStatusFixtures
@n8n/n8n-nodes-langchain.memoryPostgresChat1unverified