memX: self-learning, self-maintaining memory plugin for AI agents; native support for claude code, codex, and openclaw
$ npx -y skills add NeoLi00/memX --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
Repo: NeoLi00/memX
What's inside
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.
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 of openai-compatible,
anthropic, google, or ollama.--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, or
http://127.0.0.1:11434 for 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_KEY if 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.
For Codex and Claude Code, native hooks are the default lifecycle path for automatic recall and
turn capture. Quickstart installs the native plugin, writes the shared memX config, starts or
refreshes the managed local memX service, and keeps MCP memory tools hidden with --mcp-tools none
by default. This prevents duplicate recall/write and prevents the agent from reading audit data as a
side channel. Use --mcp-tools full only when you intentionally want the agent to see the complete
MCP tool set. Generic MCP quickstart stays full by default because it has no native lifecycle
hooks. Default native memories are also host-scoped, so Codex and Claude Code do not share the same
local database unless you deliberately override the database path and actor settings.
If http://127.0.0.1:3878 is already used by an unmanaged memX-compatible service, quickstart stops
instead of silently reusing it. Stop the old service or pass a free local URL, for example
--memx-url http://127.0.0.1:3888.
This installs the shared memX config, a local Claude Code plugin marketplace, native lifecycle hooks, and the managed local memX service in one run.
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-key
This installs the shared memX config, a local Codex plugin marketplace, native lifecycle hooks, and the managed local memX service in one run.
npx -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-key
npx -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-key
Use this path for MCP clients that do not have a native memX lifecycle adapter. Quickstart writes the shared memX config, starts the managed local memX service, and prints a ready-to-copy MCP server config.
npx -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-key
npx -y -p github:NeoLi00/memX memx service status
npx -y -p github:NeoLi00/memX memx service restart
npx -y -p github:NeoLi00/memX memx service stop
Use the same --home, --memx-url, and --memx-secret values that you used during quickstart when
you manage a non-default install.
Each uninstall command backs up the target config first, then removes only memX-owned entries.
Claude Code and Codex cleanup also stop the managed local service, uninstall the native plugin,
remove the local marketplace, and delete the generated marketplace snapshot.
OpenClaw cleanup also removes stale memx / memory-memx slot, allow, and entry references, then
best-effort uninstalls both current and legacy 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-code
Add --dry-run to preview, or --config /path/to/config when using a non-default config path.
.agents/
plugins/
marketplace.json
.claude-plugin/
plugin.json
.codex-plugin/
marketplace.json
plugin.json
.gitignore
.mcp.json
ARCHITECTURE-ch.md
ARCHITECTURE.md
assets/
agent-logos/
claude-code.png
codex.png
openclaw.png
memx-agent-support-zh.svg
memx-agent-support.svg
memx-architecture-zh.svg
memx-architecture.svg
memx-cover-en.svg
memx-cover.svg
memx-detailed-architecture-zh.svg
memx-detailed-architecture.svg
memx-overview-zh.svg
memx-overview.svg
dist/
.runtime/
index.d.mts
index.mjs
sentence_transformers_embedder.py
src/
bin/
memx-hook.d.mts
memx-hook.mjs
memx-mcp.d.mts
memx-mcp.mjs
memx-server.d.mts
memx-server.mjs
memx.d.mts
memx.mjs
cli/
registerCli.mjs
config.mjs
db/
client.d.mts
client.mjs
migrations.mjs
repositories/
abstractionRepo.mjs
auditRepo.mjs
beliefRepo.mjs
chunkRepo.mjs
eventRepo.mjs
factRepo.mjs
graphRepo.mjs
maintenanceRepo.mjs
sourceSegmentRepo.mjs
stateRepo.mjs
strategyRepo.mjs
taskRepo.mjs
vectorRepo.d.mts
vectorRepo.mjs
host/
connect.d.mts
connect.mjs
hookPayload.d.mts
hookPayload.mjs
hookRunner.mjs
httpServer.mjs
mcpProtocol.d.mts
mcpProtocol.mjs
mcpStdio.mjs
nativeMemoryBypass.mjs
quickstart.d.mts
quickstart.mjs
service.d.mts
service.mjs
serviceManager.d.mts
serviceManager.mjs
standaloneConfig.mjs
standaloneQuickstart.d.mts
standaloneQuickstart.mjs
transcript.mjs
uninstall.d.mts
uninstall.mjs
identity.mjs
index.d.mts
index.mjs
multilingualLexicon.mjs
pipeline/
abstractionJobs.mjs
abstractionPromotion.mjs
abstractionRefinement.mjs
agentEndMessages.mjs
attributeSlots.mjs
authority.mjs
beliefAggregation.mjs
bootstrapFilter.mjs
candidateGeneration.mjs
classify.mjs
consolidate.mjs
constants.mjs
entityAliases.mjs
entityProfile.mjs
entityResolver.mjs
evidenceAssembler.mjs
evidenceCoverage.mjs
extract.mjs
graphPathEngine.mjs
heartbeatFilter.mjs
judgeModelConfig.d.mts
judgeModelConfig.mjs
llmBudgetAudit.mjs
maintenanceBatch.mjs
maintenanceContract.mjs
memoryObjects.mjs
memoryObjectsHelpers.mjs
memoryObjectsProjection.mjs
messageText.mjs
normalize.mjs
outcomeHypotheses.mjs
policy.mjs
projectIdentity.mjs
queryCompiler.mjs
reasoner.d.mts
reasoner.mjs
retrieve.mjs
retrieveTracing.mjs
semantic/
heuristics.mjs
textSimilarity.mjs
semantics.mjs
signalLedger.mjs
sourceRefs.mjs
sourceSegments.mjs
sourceSegmentSemanticExtraction.mjs
sourceWeighting.mjs
stateLifecycle.mjs
strategyHypotheses.mjs
taskJudge.mjs
taskSummary.d.mts
taskSummary.mjs
turnCapture.mjs
turnScheduler.mjs
turnSemanticCompiler.d.mts
turnSemanticCompiler.mjs
vectorDocMetadata.mjs
write.mjs
plugin-tools.mjs
runtime.mjs
search/
backends/
embeddingBackend.d.mts
embeddingBackend.mjs
ftsBackend.mjs
hybrid.mjs
lexical.mjs
security/
escaping.mjs
injection.mjs
pii.mjs
scopes.mjs
support.mjs
timeouts.mjs
tooling.mjs
types.d.mts
types.mjs
index.d.mts
index.mjs
hooks/
hooks.json
hooks.codex.json
hooks.json
index.ts
LICENSE
openclaw.plugin.json
package.json
README-ch.md
README.md
scripts/
clean-dist.mjs
write-dist-wrappers.mjs
skills/
memx/
SKILL.md
src/
bin/
memx-hook.ts
memx-mcp.ts
memx-server.ts
memx.ts
cli/
registerCli.ts
config.ts
db/
client.ts
migrations.ts
repositories/
abstractionRepo.ts
auditRepo.ts
beliefRepo.ts
chunkRepo.ts
eventRepo.ts
factRepo.ts
graphRepo.ts
maintenanceRepo.ts
sourceSegmentRepo.ts
stateRepo.ts
strategyRepo.ts
taskRepo.ts
vectorRepo.ts
host/
connect.ts
hookPayload.ts
hookRunner.ts
httpServer.ts
mcpProtocol.ts
mcpStdio.ts
nativeMemoryBypass.ts
quickstart.ts
service.ts
serviceManager.ts
standaloneConfig.ts
standaloneQuickstart.ts
transcript.ts
uninstall.ts
identity.ts
index.ts
multilingualLexicon.ts
pipeline/
abstractionJobs.ts
abstractionPromotion.ts
abstractionRefinement.ts
agentEndMessages.ts
attributeSlots.ts
authority.ts
beliefAggregation.ts
bootstrapFilter.ts
candidateGeneration.ts
classify.ts
consolidate.ts
constants.ts
entityAliases.ts
entityProfile.ts
entityResolver.ts
evidenceAssembler.ts
evidenceCoverage.ts
extract.ts
graphPathEngine.ts
heartbeatFilter.ts
judgeModelConfig.ts
llmBudgetAudit.ts
maintenanceBatch.ts
maintenanceContract.ts
memoryObjects.ts
memoryObjectsHelpers.ts
memoryObjectsProjection.ts
messageText.ts
normalize.ts
outcomeHypotheses.ts
policy.ts
projectIdentity.ts
queryCompiler.ts
reasoner.ts
reflect.ts
retrieve.ts
retrieveTracing.ts
route.ts
semantic/
heuristics.ts
textSimilarity.ts
semantics.ts
signalLedger.ts
sourceRefs.ts
sourceSegments.ts
sourceSegmentSemanticExtraction.ts
sourceWeighting.ts
stateLifecycle.ts
strategyHypotheses.ts
taskJudge.ts
taskSummary.ts
turnCapture.ts
turnScheduler.ts
turnSemanticCompiler.ts
vectorDocMetadata.ts
write.ts
plugin-tools.ts
runtime.ts
search/
backends/
embeddingBackend.ts
ftsBackend.ts
hybrid.ts
sentence_transformers_embedder.py
lexical.ts
security/
escaping.ts
injection.ts
pii.ts
scopes.ts
support.ts
timeouts.ts
tooling.ts
types.ts
tests/
agent-end-selection.test.mjs
chinese-lexical-retrieval.test.mjs
embedding-worker-lifecycle.test.mjs
evidence-packet-selection.test.mjs
host-service-context.test.mjs
lifecycle-regressions.test.mjs
llm-only-entities.test.mjs
local-embedding-worker.test.mjs
maintenance-resume.test.mjs
multi-agent-adapters.test.mjs
prompt-injection.test.mjs
quickstart.test.mjs
service-cli.test.mjs
setup-config.test.mjs
standalone-quickstart.test.mjs
uninstall.test.mjs
tsconfig.json
types/
openclaw-plugin-sdk-core.d.ts
openclaw-plugin-sdk-process-runtime.d.tsFAQ
memx is a Claude Code plugin with 1 hand-picked skill for data work, indexed on Flowy. Install it with the command on its page. It includes memx. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.