Couchbase Chat Memory
AI-generatedSummary
Provide a Couchbase-backed chat memory for an AI agent, storing message history in a selected bucket, scope, and collection. Select a session ID source and context window length to control which conversation history the model receives.
Inputs
- Session ID (required) — Choose Connected Chat Trigger Node to read
sessionIdfrom the directly connected Chat Trigger, or Define below to provide a session key. With the trigger option, the node defaults to{{ $json.sessionId }}if the session key expression is empty. A missing or blank session ID causes an error. - Key / Session Key From Previous Node (required) — When defining the session ID, enter static text or an expression that resolves to the session ID. When using the connected trigger, the optional expression can select the session ID from prior node data.
- Couchbase Bucket (required) — Select a bucket from the list or enter its name.
- Couchbase Scope (required) — Select a scope from the list or enter its name; the list depends on the selected bucket.
- Couchbase Collection (required) — Select a collection from the list or enter its name; the list depends on the selected bucket and scope.
- Context Window Length — Number of past interactions included in the model's context; defaults to 5.
Output shape
An AI Memory connection for an AI agent, with no regular item output.
Stores each session's messages in a Couchbase document keyed as
chat_history::<sessionId>, appends new messages, and updates its timestamp. Missing history is treated as empty; clearing memory removes the session document. Requires Couchbase API credentials and an existing accessible bucket, scope, and collection.