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:
- Add an Embeddings node to convert text → vector
- Connect to a Vector Store (Pinecone, Qdrant, or built-in pgvector)
- 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
- Add a Memory node before your AI Agent
- Connect it to the agent's Memory input
- Choose the memory type and storage backend
- The agent will automatically read from and write to memory
Memory Scoping
Control who can access memory with a scope key:
| Scope | Key Pattern |
|---|---|
| Per user | user:{{ $json.userId }} |
| Per session | session:{{ $json.sessionId }} |
| Global | global:knowledge-base |
| Per tenant | tenant:{{ $env.TENANT_ID }} |