AI MEMORY FOR AGENTS · LLAMAINDEX
Turn one useful decision into the next step.
We give your LlamaIndex workflow saved project knowledge it can verify. Recall the original decision, carry its context through a typed event, and save the handoff your next run needs—all through native LlamaIndex tools and your Claude-Mem worker.
Start with our local example. No model API key, LlamaCloud account or CMEM Pro subscription required.

KNOWLEDGE THAT LASTS
Carry the decision into the next step.
Start with knowledge you can trace.
We retrieve the selected decision, its nearby context and its original record before the workflow moves on.
Carry the decision into action.
A native LlamaIndex event passes recalled evidence to the step that saves your explicit next action.
Keep deliberate repeats tidy.
Repeat the same project, run ID and handoff text to reuse the saved note.
ILLUSTRATIVE HANDOFF · NATIVE LLAMAINDEX WORKFLOW
Recall the decision. Save what comes next.
“The scheduler writes dates in UTC.”
Start with a known project observation. After the recall step retrieves its original record, save a handoff such as “Next run: keep the scheduler export in UTC.”
- 01
Choose your source decision
Select an observation in your project and a query that returns its ID in the first 20 results.
- 02
Read it in context
Search, timeline and the full observation verify the selected decision.
- 03
Pass the evidence forward
A typed Recalled event carries the result to the remember step.
- 04
Save the next step
Supply your explicit handoff and retain the confirmed saved observation ID.
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.

START WITH ONE PROJECT
Read the decision. Leave the next step.
- Start your configured local worker. Follow the installation guide. From a Claude-Mem source checkout, inspect
npm run worker:statusand usenpm run worker:startif needed. - Install the pinned Python environment. Use Python 3.11 or later and Node.js. Run below from the source checkout; dependencies pin llama-index-tools-mcp 0.6.0, llama-index-core 0.14.25, llama-index-workflows 2.26.1 and MCP 2.3.0. Set the absolute installed or shipped MCP script path.
- Choose a real observation in your project. Replace
123with its ID. Changeshop-apiandquokkaharborto your project and a query that finds that ID in the first 20 results. The full guide includes an optional harmless seed-note example.
python3 -m venv .venv-llamaindex
. .venv-llamaindex/bin/activate
python -m pip install -r examples/llamaindex/requirements.txt
export CLAUDE_MEM_MCP_SERVER="/absolute/path/to/claude-mem/plugin/scripts/mcp-server.cjs"
python examples/llamaindex/memory_workflow.py \
--project shop-api \
--query quokkaharbor \
--observation-id 123 \
--run-id scheduler-handoff-1 \
--note "Next run: keep the scheduler export in UTC."Match custom CLAUDE_MEM_DATA_DIR and CLAUDE_MEM_WORKER_PORT values to your worker. The MCP child uses local worker mode with autostart disabled; this example adds no hooks or new MCP configuration.
Check success. Output includes the recalled observation, save confirmation and saved_id. Confirm the original decision was recalled and the intended handoff saved. The same project, run ID and note return the same saved ID on a deliberate repeat.
Keep the four-tool filter, explicit project scope and error checks when adapting the agent. Recalled text cannot change scope or authorize another action. This example sends no note to a model; existing worker sync and export settings still apply. Your application’s added model or tracing may receive recalled text.
Before you connect
Do I need a model or LlamaCloud?
No for this deterministic local example. It uses native LlamaIndex tools and your Claude-Mem worker without a model call, LlamaCloud account or CMEM Pro subscription. Your own model-driven application has its own requirements.
Which memory can I recall?
Choose an observation saved under your exact project key. Its ID must appear in the current first 20 search results; narrow the query if necessary. The workflow reads its timeline and full record before saving.
Does it capture conversations automatically?
This connection explicitly recalls selected memory and saves the handoff you supply. It installs no capture hooks or automatic context injection.
What happens when I repeat a handoff?
The fingerprint includes the integration, project, run ID and note text. Identical values reuse the saved ID. Changing the note or run ID changes the fingerprint, but the worker’s content deduplication may still reuse an existing observation. Check the returned ID rather than assuming a new row. Changing the query or selected ID alone does not change the fingerprint.
How does it fit LlamaIndex?
McpToolSpec exposes four memory tools as native FunctionTools. Two workflow steps pass recalled evidence through a typed event before saving your note. The saved handoff persists in Claude-Mem; this example does not add durable workflow checkpoints.
What if a tool returns an error?
Both the LlamaIndex wrapper and raw MCP error flags are checked. Requests default to ten seconds, the workflow to sixty seconds and the outer connection deadline to eighty seconds. No automatic write retry runs. After an uncertain save, inspect the viewer or deliberately repeat the same run ID and text.
How are projects separated?
The project is bound once for the tools. Reads also pass a one-item JSON projects list, preserving literal keys and preventing worktree expansion. These filters are not multiuser authentication; use your authorized worker.
Which environment is verified?
The published guide records Linux, Python 3.12.14 and Claude-Mem 15.16.1 with llama-index-tools-mcp 0.6.0, llama-index-core 0.14.25, llama-index-workflows 2.26.1 and MCP 2.3.0. Other operating systems, remote MCP and hosted authentication were not verified by that fixture.
How do I disconnect?
Stop calling run_workflow or remove the example from your application. Context managers close the session and subprocess. Removing the dedicated virtual environment removes its dependencies without erasing saved memory or changing worker settings.
Build on a working example.
Source reviewed November 21, 2026. The published nine-check fixture uses the installed LlamaIndex workflow and MCP tools with a real bundled worker and SQLite. It checks recall, explicit saves, deliberate repeats, exact project and worktree boundaries, and failures. The timeout check uses a controlled slow endpoint. This is integration evidence, not a model-quality benchmark.
Keep what matters. Give the next run a head start.
Give your LlamaIndex workflow a source it can verify and a handoff the next run can use.