Skip to content

AI MEMORY FOR AGENTS · HAYSTACK

Your next pipeline starts with what you already know.

We turn useful decisions into project knowledge your Haystack workflow can return to. Save a result worth keeping, retrieve its original record in a later run, and pass the context into the next component when it matters.

Start with our local example. No model API key, deepset account or CMEM Pro subscription is needed for this demonstration.

KNOWLEDGE THAT LASTS

Keep the answer within reach.

Keep the decision, not just the current run.

We store the result you choose so a later pipeline can retrieve it.

Return to the original record.

We provide the search index, nearby timeline and selected note’s full details as separate outputs.

Make memory a deliberate pipeline step.

Add our native ProjectMemory component and connect its details output where your application needs context.

ILLUSTRATIVE DECISION · NATIVE PIPELINE

A useful result today. A head start tomorrow.

“Use the violet region for the retrieval service.”

Save the decision explicitly, then use its confirmed observation ID in a later pipeline run. A growing project does not make that known decision unreachable: retrieve it even when newer notes have moved it beyond the current search page.

  1. 01

    Save a useful result

    Choose the project, title and decision worth preserving.

  2. 02

    Keep its confirmed ID

    Use the observation ID acknowledged by the worker.

  3. 03

    Recall it in a later run

    Retrieve the index, nearby timeline and full details through the native pipeline.

  4. 04

    Put the knowledge to work

    Connect the details output to the next component when that context matters.

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

START WITH ONE PROJECT

Keep one decision. Recall it in a later run.

  1. Start your configured local worker. Follow the installation guide. Check npx claude-mem status and start it with npx claude-mem start if needed.
  2. Use the pinned example. From a source checkout, run below with Python 3.11 or newer and Node.js. The virtual environment pins haystack-ai 3.5.0, mcp-haystack 2.1.1 and MCP 2.3.0.
  3. Point to your installed MCP script. Replace the absolute path below. Match any custom CLAUDE_MEM_DATA_DIR and CLAUDE_MEM_WORKER_PORT to your worker. The example uses local worker mode with autostart disabled.
  4. Keep the acknowledged ID. After saving, replace 123 in the recall command with the returned observation ID. Use the same project for both commands.
cd examples/haystack
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -r requirements.txt
export CLAUDE_MEM_MCP_SERVER="/absolute/path/to/claude-mem/plugin/scripts/mcp-server.cjs"
export HAYSTACK_TELEMETRY_ENABLED=false
python memory_pipeline.py save checkout-service \
  "Haystack release decision" \
  "Use the violet region for the retrieval service."
# Replace 123 with the observation ID acknowledged above.
python memory_pipeline.py recall checkout-service \
  "Haystack release decision" 123

Check success. Save acknowledges an observation ID. Recall prints the index, timeline and full details; confirm the details contain the violet-region decision. Identical project, title and text reuse the saved identity on a deliberate repeat.

Add ProjectMemory() with pipeline.add_component and supply its project, query and observation ID through Pipeline.run. Connect its typed details output to a later component when relevant. No additional document store is needed for this example.

Keep the four-tool filter and explicit project scope when adapting the component. Treat recalled text as reference material, not permission to change accounts or invoke tools. Existing worker sync and export settings still apply.

Before you connect

Does this require an LLM or paid account?

No for this local example. It needs no model API key, deepset account or CMEM Pro subscription. Downstream model components have their own provider and cost requirements.

Can I retrieve an older known note?

Yes. Use its observation ID within the selected project. The note does not need to appear in the current search index page.

Does it automatically record conversations?

No. Saves are explicit and retrieval is on demand. The example installs no capture hooks or automatic context injection.

What happens if I repeat a save?

The exact project, title and text determine the save fingerprint. Identical inputs reuse the saved identity; changed inputs produce a distinct note. The fingerprint is not encryption.

What happens on failure?

The CLI exits unsuccessfully with a generic error. Discovery and individual invocations have ten-second deadlines; transport retries are disabled. A timed-out save may have committed: repeat identical project, title and text to reuse its identity.

How are projects separated?

Calls carry the selected project; reads also use a one-item JSON projects list to preserve exact keys and prevent worktree expansion. Project selection is not cross-user authentication. Each account should use its own authorized worker.

Where does my note go?

Explicit notes are stored as supplied. This example does not process transcript privacy tags. Existing worker indexing, sync and export settings apply. A downstream model receives retrieved text if your application sends it.

Which environments are verified?

The published guide records Linux verification with Python 3.12.9, Node.js 24.22.1, Claude-Mem 15.16.1, haystack-ai 3.5.0, mcp-haystack 2.1.1 and MCP 2.3.0. macOS, Windows and deepset-hosted deployments are not verified by that fixture.

How do I disconnect?

Stop using the component and remove its isolated dependencies. No host configuration needs restoring. Saved notes remain in Claude-Mem; manage demonstration notes separately in the viewer.

Build on a working pipeline.

Source reviewed November 21, 2026. The published seven-test fixture uses native Haystack packages, the bundled MCP server and a real SQLite worker. It covers repeat saves, selected-note recall, project boundaries, known notes beyond the current search page, attribution and failures. This is integration evidence, not a model-quality benchmark.

Keep the result. Give the next run a head start.

Give your Haystack workflow project knowledge it can return to and build on.