Templates / Store persistent AI agent memory with Claude, Voyage AI, Postgres, and Redis

Store persistent AI agent memory with Claude, Voyage AI, Postgres, and Redis

Ready for 3.0

by Oneclick AI Squad ✓ · 14 views · created 2026-09-29 · Internal Wiki, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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).

  1. Normalize Chat Input (Code): runs custom JavaScript code
  2. Set Maintenance Configuration (Edit Fields (Set)): sets 4 fields: decayFactor, decayAfterDays, minImportanceToKeep…
  3. Normalize Forget Input (Code): runs custom JavaScript code
  4. If: checks a condition and branches into true / false
  5. Decay Unused Memory Importance (Postgres): run a query
  6. If: checks a condition and branches into true / false
  7. Set Configuration Parameters (Edit Fields (Set)): sets 16 fields: anthropicApiUrl, chatModel, extractionModel…
  8. Respond with Validation Error (Respond to Webhook): sends the response back to the webhook caller
  9. Prune Stale Memories (Postgres): run a query
  10. Delete Memories in Postgres (Postgres): run a query

…plus 27 more steps. See the full node list below.

Services it uses

RedisPostgres

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)

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…

Excerpt from Oneclick AI Squad's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.