n8n + Memanto
How It Works
Memanto authenticates with Moorcheh on the server using
MOORCHEH_API_KEY. n8n nodes do not send an Authorization header. The only header you pass from n8n is X-Session-Token for memory operations.Prerequisites
- n8n (self-hosted or cloud)
- Memanto server accessible from your n8n instance, with
MOORCHEH_API_KEYconfigured in its environment
Step 1: Start Memanto Server
On your server or locally:If n8n is running in the cloud or Docker, expose Memanto via a public URL or use a tunnel like ngrok.
Core Workflow Patterns
Pattern 1: Activate Session + Remember
Use this at the start of a workflow to open a session and store context. Node 1 — Activate Session (HTTP Request)
This returns a
session_token. Reference it in later nodes via:
Pattern 2: Recall Context
Retrieve relevant memories before making an LLM call or sending a response. Node — Recall (HTTP Request)
The response contains a
memories array. Access the first result with:
Pattern 3: AI-Powered Answer from Memory
Let Memanto answer a question directly using its built-in RAG: Node — Answer (HTTP Request)
Returns
answer — a grounded response based on stored memories, no external LLM call needed.
Example: Customer Support Workflow
This workflow receives a customer message via webhook, recalls past context, and sends a personalized reply.POST /api/v2/agents/{{ $json.customer_id }}/activate
Using the customer ID as the agent ID gives each customer their own isolated memory.
Recall Context — POST /api/v2/agents/{{ $json.customer_id }}/recall with body { "query": "{{ $json.message }}", "limit": 5 }
Code Node — Format Prompt
POST /api/v2/agents/.../remember with body { "content": "<message + reply>", "type": "fact" }
Memory Types in n8n
Set thetype field in the Remember body to categorize what you store:
Sessions in Long-Running Workflows
Memanto auto-renews sessions that are near expiry on memory requests, so most workflows can simply reuse the token from the activation step. There is no separate/session/extend endpoint.
For scheduled or long-lived workflows, the simplest pattern is to activate a fresh session at the start of each run rather than persisting the token between executions:
401 Unauthorized, re-run the Activate Session node and continue with the new token.