MemX Memory for OpenClaw
Long-term agent memory with self-learning, self-maintenance, and relationship-aware recall.
Contact: neoliriven@gmail.com
English · 中文 ·
Architecture
MemX is a local-first long-term memory plugin for OpenClaw. It helps agents keep working with you
across days, projects, decisions, corrections, and evolving preferences.
What it adds: stable work memory, task state, relationship recall, learned habits, automatic
cleanup, and compact evidence injection.
What it can do
Remember work over time
MemX keeps the useful parts of long conversations: project decisions, user preferences, task status,
important events, and raw evidence. Long inputs and long agent replies are split into linked segments
so precise slices can be recalled without losing the original turn.
Connect related things
MemX includes relationship-aware memory. It can keep track of how projects, repos, tools, people,
resources, blockers, and outcomes relate to each other. When the same object is mentioned with
different names, MemX can use aliases and identity evidence to keep the memory connected.
Example: if a project is later called "Raven API", "the auth repo", or just "Raven", MemX can keep
those references tied together when the evidence supports it.
Learn from repeated collaboration
MemX can notice stable patterns across repeated work. For example, it can learn that you prefer small
reversible patches, that a certain project needs API checks before UI work, or that a recurring task
usually follows the same review flow.
These learned patterns remain tied to supporting evidence. They are not loose summaries with no
source.
Maintain itself
MemX continuously keeps memory usable:
- repeated evidence can become a stable memory;
- corrected information can replace older information;
- old task state can stop competing with current state;
- high-level summaries can point back to raw evidence;
- noisy control turns such as OpenClaw heartbeat checks are ignored.
The result is a memory store that evolves with the work instead of becoming a stale transcript.
Recall useful evidence
When the agent needs memory, MemX does not dump everything into the prompt. It searches across
facts, events, state, chunks, relationships, resources, and learned patterns, then builds compact
evidence lines for the current question.
The agent sees what matters now, with enough source context to answer reliably.
Evaluation signal
In the current internal long-running engineering-memory replay suite, MemX reached 100% recall of
the expected memory evidence. That means the expected evidence was written, retrievable, and
available to prompt injection in the tested scenarios.
OpenClaw quickstart
Requirements: OpenClaw 2026.3.25+ with Node.js 22.14+ or Node 24. Python 3 is required only
when you use local embeddings.
memx quickstart openclaw is OpenClaw-specific. It writes OpenClaw's config, installs the
OpenClaw memory plugin, assigns plugins.slots.memory, restarts the Gateway, and runs the MemX
doctor check. Codex, Claude Code, and generic MCP agents use the multi-agent adapters
section instead.
The shortest DeepSeek example is:
npx -y -p @neoli00/memory-memx memx quickstart openclaw --api-key sk-your-deepseek-key
If you need the current GitHub main before a new npm package is published, use the same command
with the GitHub package spec:
npx -y -p github:NeoLi00/openclaw-memx memx quickstart openclaw --api-key sk-your-deepseek-key
This is only a provider example. MemX can use any OpenAI-compatible provider that OpenClaw can call.
For a generic provider, pass the provider endpoint and choose one main agent model plus one fast,
low-cost semantic compiler model:
npx -y -p @neoli00/memory-memx memx quickstart openclaw \
--preset custom \
--provider-id my-provider \
--base-url https://llm.example.com/v1 \
--agent-model my-main-model \
--memx-model my-fast-model \
--api-key sk-your-provider-key
The embedding defaults are:
- Embedding provider:
sentence-transformers-local
- Embedding model:
intfloat/multilingual-e5-small
- Local embedding Python:
~/.openclaw/memx/.venv/bin/python
The quickstart creates the local embedding venv, installs sentence-transformers and torch,
installs the MemX plugin with openclaw plugins install @neoli00/memory-memx, writes the MemX
config, restarts the Gateway, and runs openclaw memx doctor --deep.
To avoid putting the API key directly in ~/.openclaw/openclaw.json, store an env SecretRef
instead: