@stackflo-labs/n8n-nodes-retainr
v0.4.1
Published
n8n community node for retainr.dev — AI agent memory persistence API. Store, search, and retrieve semantic memories for AI agents across workflow runs.
Maintainers
Readme
@stackflo-labs/n8n-nodes-retainr
n8n community node for retainr.dev — the AI agent memory persistence API.
Give your n8n AI agents long-term memory that persists across workflow runs. Store facts, preferences, and context, then retrieve them with semantic search — so your agents remember what matters.
Features
| Operation | Description | |-----------|-------------| | Store | Save a memory with namespace, tags, metadata, TTL, and deduplication | | Search | Semantic similarity search across stored memories | | Get Context | Retrieve pre-formatted memory context ready for LLM system prompts | | List | Browse memories with filters (namespace, tags) | | Delete | Remove memories by namespace | | Get Workspace Info | View plan usage, API keys, and workspace details |
Installation
n8n Cloud & Desktop
- Go to Settings > Community Nodes
- Click Install
- Enter the exact package name:
@stackflo-labs/n8n-nodes-retainr - Click Install and restart if prompted
Self-hosted n8n (UI)
- Go to Settings > Community Nodes > Install
- Enter
@stackflo-labs/n8n-nodes-retainr - Click Install
Requires N8N_COMMUNITY_PACKAGES_ENABLED=true in your environment (set by default in Docker).
Self-hosted n8n (manual / Docker volume)
# If you mount a custom node directory or manage packages directly:
cd /home/node/.n8n
npm install @stackflo-labs/n8n-nodes-retainrThen restart n8n.
Setup
- Sign up at retainr.dev and get your API key
- In n8n, go to Credentials > New > Retainr API
- Paste your API key (
rec_live_...) — each key is scoped to one workspace - The default Base URL (
https://api.retainr.dev) works out of the box
How it works
Workspace → Namespace hierarchy:
- Workspace: Your organization, determined by the API key
- Namespace: Groups memories by customer, tenant, or any identifier (e.g.,
customer:alice,project:onboarding)
Every memory operation accepts a Namespace field. Use it to keep each customer's memories separate within your workspace.
Usage Examples
Store a memory after a conversation
- Add the Retainr node after your AI Agent
- Set Resource to
Memory, Operation toStore - Map the conversation summary to the Content field
- Set Namespace to the customer identifier (e.g.,
customer:alice)
Inject memory context into an LLM prompt
- Add a Retainr node before your AI Agent
- Set Operation to
Get Context - Use the incoming message as the Query
- Set the same Namespace to retrieve that customer's memories
- Pass the
contextoutput into your LLM's system prompt
Deduplicate similar memories
Use the Dedup Threshold field (e.g., 0.95) when storing. If a sufficiently similar memory already exists, it will be updated instead of duplicated.
AI Agent Tool
This node has usableAsTool enabled — you can use it directly as a tool inside n8n's AI Agent node, letting the agent decide when to store or recall memories autonomously.
API Documentation
Full API reference: retainr.dev/docs
