English · 中文 · Architecture
memX turns completed work into structured, searchable, self-maintained memory, then injects only the evidence an agent needs for the current query. It connects natively to Codex, Claude Code, and OpenClaw, and reaches any MCP-compatible client through the same local memory layer.
| Suite | Scope | R@3 success rate |
|---|---|---|
| LongMemEval-S | Long-context memory retrieval | 94.2% |
| Real engineering cases | 30 cases, each with 20+ turns | 100% |
| Codex | native + hooks + MCP | |
| Claude Code | native + hooks + MCP | |
| OpenClaw | native + hooks | |
| MCP | MCP clients | any MCP-compatible client |
Requirements: Node.js 22.14+ or Node 24. OpenClaw installs require OpenClaw 2026.3.25+. Python 3 is needed only for the default local embedding runtime.
The README commands use the GitHub package spec. A fresh run pulls current GitHub code, so installs
do not wait for an npm publish. To use the npm release channel later, replace
github:NeoLi00/memX with @neoli00/memx.
Fill in these values before running a command:
--llm-provider: the provider adapter memX should call. Choose one ofopenai-compatible,anthropic,google, orollama.--llm-base-url: the base URL for that provider. Examples:https://api.openai.com/v1,https://api.anthropic.com/v1,https://generativelanguage.googleapis.com/v1beta, orhttp://127.0.0.1:11434for Ollama.--llm-model: the model memX uses for memory compilation, recall planning, and maintenance. Pick a fast, low-cost model with reliable JSON output.--llm-api-key: the API key for the provider. Use--llm-api-key-env PROVIDER_API_KEYif you want the config to reference an environment variable instead of storing plaintext. For local Ollama, omit the key.
The default embedding setup is local sentence-transformers-local with
intfloat/multilingual-e5-small. Add --embedding-provider and --embedding-model only when you
want to override that default. Use --dry-run to preview the files and exec-form commands before
writing anything.
npx -y -p github:NeoLi00/memX memx quickstart claude-code \
--llm-provider openai-compatible \
--llm-base-url https://llm.example.com/v1 \
--llm-model fast-memory-model \
--llm-api-key sk-your-provider-keynpx -y -p github:NeoLi00/memX memx quickstart codex \
--llm-provider openai-compatible \
--llm-base-url https://llm.example.com/v1 \
--llm-model fast-memory-model \
--llm-api-key sk-your-provider-keynpx -y -p github:NeoLi00/memX memx quickstart openclaw \
--llm-provider openai-compatible \
--llm-base-url https://llm.example.com/v1 \
--llm-model fast-memory-model \
--llm-api-key sk-your-provider-keynpx -y -p github:NeoLi00/memX memx quickstart mcp \
--llm-provider openai-compatible \
--llm-base-url https://llm.example.com/v1 \
--llm-model fast-memory-model \
--llm-api-key sk-your-provider-keyFor Claude Code, Codex, and generic MCP clients, start the shared local service after configuration:
npx -y -p github:NeoLi00/memX memx-serverEach uninstall command backs up the target config first, then removes only memX-owned entries.
OpenClaw cleanup also removes stale memx / memory-memx slot, allow, and entry references, then
best-effort uninstalls the plugin files if OpenClaw can still see them.
npx -y -p github:NeoLi00/memX memx uninstall openclaw
npx -y -p github:NeoLi00/memX memx uninstall codex
npx -y -p github:NeoLi00/memX memx uninstall claude-codeAdd --dry-run to preview, or --config /path/to/config when using a non-default config path.
- Remember work over time: project decisions, user preferences, task status, long source segments, and raw evidence stay linked to the original turn.
- Connect related things: projects, repos, tools, files, resources, blockers, and outcomes can be represented as entities and graph edges.
- Learn collaboration patterns: repeated evidence can become reusable guidance without losing its supporting sources.
- Maintain itself: corrections can supersede older facts, stable evidence can be promoted, and stale task state stops competing with current state.
- Recall compact evidence: facts, events, state, chunks, relationships, resources, and learned patterns are searched together, then injected as small evidence lines.