Skip to content

AI MEMORY FOR AGENTS · N8N

Give your n8n workflows a memory to build on.

We give your workflows a lasting place to save project decisions and find them again. Import our example, save a note, confirm it reached Claude-Mem, and retrieve the exact record when you need it.

For self-hosted n8n and a Claude-Mem worker on the same workstation.

KNOWLEDGE THAT LASTS

Keep what matters beyond the execution.

Keep the decision after the run ends.

We store the project note you explicitly send, so useful knowledge is available beyond one execution.

Find relevant project knowledge.

Search within the configured project before selecting the details you need.

Verify the memory you saved.

Our example retrieves the saved record by its receipt ID and stops if the save is not confirmed.

ILLUSTRATIVE NOTE · REAL WORKFLOW

A useful decision survives the run.

“A restore must reject snapshots missing required worker tables.”

Save this example project decision, then follow its receipt back to the original record. The bundled workflow uses this sequence:

  1. 01

    Save the selected note

    Send the chosen text, title and project to our local worker.

  2. 02

    Require a confirmed save

    Continue only when the worker returns success: true.

  3. 03

    Search this project

    Find observations using the configured query and project filter.

  4. 04

    Retrieve the receipt ID

    Read the exact record identified by the Save response, with the same project filter.

No confirmed save? Stop before recall. Search does not select the retrieved ID; Retrieve uses the ID from Save.

START WITH ONE PROJECT

Import once. Prove one memory. Then build on it.

  1. Start your installed Claude-Mem worker. Follow the installation guide. Read CLAUDE_MEM_WORKER_PORT in ~/.claude-mem/settings.json for the port. If unset, the documented macOS/Linux default is 37700 + (your user ID % 100). Confirm the actual port with curl -s http://127.0.0.1:PORT/api/health.
  2. Import the example once. Save the workflow JSON as memory.workflow.json. Import it, list workflows and use the returned ID. Reuse that imported workflow for later runs.
n8n import:workflow --input memory.workflow.json
n8n list:workflow

Set the Configure fields

baseUrl

Your actual local worker origin, including its port. The example’s 37700 is a placeholder.

project

The exact Claude-Mem project name to save and search.

text

The note you explicitly choose to save.

title

A short, descriptive title for that note.

query

The search terms for the selected project.

Keep credentials out of the URL and note. Use harmless test content for your first run.

n8n execute --id YOUR_IMPORTED_ID --rawOutput

Check the result, not just the exit code. The execution status must be success, and Retrieve must contain the expected ID, project and text. n8n’s CLI can exit zero after a workflow error.

AI memory in production

70 days of work. One searchable memory.

Alessandro used our open-source engine across three machines for 70 days. His customized deployment captured the decisions, fixes and discoveries behind the work—and published the data.

Observations captured
22,718
Bug fixes recorded
1,262
Decisions recorded
757

See how he made that knowledge searchable. Then give your own agents a memory to build on.

Claude-Mem’s mascot files a note in a shared card catalogue connected to three computers.
Alessandro’s published field study · March–May 2026

Before you connect

Does this install a custom node?

No. We use n8n’s built-in HTTP Request, If and Stop And Error nodes. Import the workflow and configure your local worker connection.

Will it capture every execution?

No. The example saves the note you choose and runs only when explicitly triggered. It is inactive when imported and contains no schedule or automatic capture. Running it again sends another explicit save request.

Can I use n8n Cloud or a separate container?

This guide covers self-hosted n8n on the same workstation as the worker. In a container, 127.0.0.1 points to that container. Hosted n8n and container-to-host networking are outside this tested setup.

Do I need model credits for the example?

The importable workflow makes no model-provider calls. Any model steps you add and your broader worker configuration have separate requirements.

What happens to the data?

The note follows your existing Claude-Mem storage, privacy and sync settings. n8n can retain returned memory in execution history under its own retention settings. This local worker connection does not add a multi-user authorization boundary. Keep credentials out of the URL and note.

Why did the workflow stop?

Inspect Save’s response: success must be true before recall continues. For connection errors, check that the worker is running and baseUrl has the correct port. Each HTTP request has a five-second timeout; the workflow has a 30-second limit and no retry setting.

How do I disconnect?

Leave the workflow inactive, remove only that imported workflow, and manage its execution history separately. Disconnecting does not delete existing Claude-Mem memories or change unrelated workflows.

Follow the working example.

The source includes a repeatable smoke check using the actual n8n importer and execution engine. It checks the saved record, project filtering, unconfirmed saves and offline-worker failures with synthetic notes.

Give the next run a useful starting point.

Save a decision your workflow can find again.