Package Information
Released: 10/1/2025
Downloads: 1,334 weekly / 4,705 monthly
Latest Version: 1.0.7
Author: hypocrite
Documentation
Smart Memory for n8n
A flexible, configuration-driven memory management node for n8n that supports multiple storage backends and chat types.
Features
- Chat-Type Aware: Different handling for private chats vs group chats
- Smart User Mapping: Configure how user names are displayed
- Multiple Storage Backends: In-memory, Google Sheets, Redis
- Configurable Assistant Identity: Customize how the assistant is identified
- Optional Features: Reply context, semantic/episodic memory extraction
- Token Efficient: Only stores essential information
Installation
- Clone this repository
- Install dependencies:
npm install - Build the node:
npm run build - Start n8n with the node:
n8n start --nodes ./dist
Usage
Basic Setup
- Add the "Smart Memory" node to your workflow
- Configure the basic settings:
- Memory Window Size: Number of messages to keep in memory
- Assistant Role: How the assistant should be identified (e.g., "Assistant", "Bot")
- User Display Name Expression: Expression to combine user name fields
- Storage Backend: Choose where to store memory data
Advanced Configuration
User Field Mapping
The node allows flexible mapping of user fields:
// Default display name expression
={{ $json.message.from.first_name + " " + $json.message.from.last_name }}
// Alternative expressions
={{ $json.message.from.username }}
={{ $json.customFields.displayName }}
={{ "User" + $json.message.from.id }}