AI Agents

Agent Memory

Memory lets AI agents recall information across multiple workflow runs, enabling truly contextual and personalised automations.

Memory Types

🔷 Session Memory (Short-term)

Stores conversation history within a single execution. Automatically managed — no configuration needed. Ideal for multi-turn chat workflows.

🔷 Key-Value Memory (Long-term)

Store and retrieve named facts:

// Write
{ "key": "user_preference_{{ $json.userId }}", "value": "dark_mode" }

// Read
{ "key": "user_preference_{{ $json.userId }}" }

Backed by Redis or PostgreSQL. Values persist indefinitely (configurable TTL).

🔷 Vector Memory (Semantic)

Store text as embeddings and retrieve the most semantically similar entries:

  1. Add an Embeddings node to convert text → vector
  2. Connect to a Vector Store (Pinecone, Qdrant, or built-in pgvector)
  3. In your agent, add a Vector Retrieval tool — the agent calls it automatically when it needs context

Best for: knowledge bases, document Q&A, customer history retrieval.

Setting Up Memory in a Workflow

  1. Add a Memory node before your AI Agent
  2. Connect it to the agent's Memory input
  3. Choose the memory type and storage backend
  4. The agent will automatically read from and write to memory

Memory Scoping

Control who can access memory with a scope key:

ScopeKey Pattern
Per useruser:{{ $json.userId }}
Per sessionsession:{{ $json.sessionId }}
Globalglobal:knowledge-base
Per tenanttenant:{{ $env.TENANT_ID }}