Store persistent AI agent memory with Claude, Voyage AI, Postgres, and Redis
Ready for 3.0What this workflow does
This workflow has 41 nodes and runs when an HTTP POST request hits its webhook URL (plus 3 other triggers). Along the way it connects Redis and Postgres.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 3 other triggers).
- Normalize Chat Input (Code): runs custom JavaScript code
- Set Maintenance Configuration (Edit Fields (Set)): sets 4 fields: decayFactor, decayAfterDays, minImportanceToKeep…
- Normalize Forget Input (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- Decay Unused Memory Importance (Postgres): run a query
- If: checks a condition and branches into true / false
- Set Configuration Parameters (Edit Fields (Set)): sets 16 fields: anthropicApiUrl, chatModel, extractionModel…
- Respond with Validation Error (Respond to Webhook): sends the response back to the webhook caller
- Prune Stale Memories (Postgres): run a query
- Delete Memories in Postgres (Postgres): run a query
…plus 27 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - Edit Fields (Set)
n8n-nodes-base.set - Redis
n8n-nodes-base.redis - HTTP Request
n8n-nodes-base.httpRequest - Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick overview This workflow provides persistent AI agent memory by combining Redis session history, PostgreSQL + pgvector long-term storage, Voyage AI embeddings, and Anthropic Claude for chat and memory extraction, with webhooks for chat and forgetting…