memX: long-term memory for agents

memX

A long-term memory plugin that keeps decisions, preferences and task state across sessions and injects only what a query needs

  • 403 ★ on the repository
  • Last commit
  • MIT
Plugin

Broad access

Why this level

  • Hooks record every dialog turn, and the content goes to the chosen model provider to build the memory
  • The npx install pulls fresh code straight from GitHub without pinning a version, and the provider key goes into the config as plain text by default
  • A local service runs in the background on 127.0.0.1:3878, and the memory holds working facts about the project
All reasons and checks

neoli00/memx

Install

Manual install

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-env PROVIDER_API_KEY

Substitute your own provider, address and model. The key is read from the PROVIDER_API_KEY environment variable. Add --dry-run to preview.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Hooks record every dialog turn, and the content goes to the chosen model provider to build the memory
  • The npx install pulls fresh code straight from GitHub without pinning a version, and the provider key goes into the config as plain text by default
  • A local service runs in the background on 127.0.0.1:3878, and the memory holds working facts about the project

This is third-party code. Review the repository files before installing.

What it does

memX keeps an agent's memory across sessions. After a piece of work it records, in structured form, project decisions, user preferences, task status and long source segments linked to the original turn. Before a new query it searches the memory for facts, events, state, relationships and learned patterns and injects only short lines of evidence into the context. Links between projects, repositories, tools, files and blockers are stored as a graph. The memory looks after itself: corrections supersede outdated facts, stable information gains weight, and old task state stops competing with the current one. Repeated observations become collaboration rules with links to their sources. In Claude Code and Codex the memory plugs in through native lifecycle hooks, in OpenClaw through a plugin, and any other MCP client connects to the same local memory layer. The memx_recall, memx_remember, memx_audit and memx_stats tools are hidden from the agent in Claude Code and Codex by default, so writing and recall do not duplicate.

Who it is for. For developers who run long projects in Claude Code, Codex or OpenClaw and are tired of repeating the same decisions and preferences to the agent.

Good fit when

  • The agent forgets architectural decisions in every new session and you have to explain them again
  • A project drags on for weeks and task status and discovered blockers should be remembered between sessions
  • You want user corrections to supersede old facts
  • You want to merge Claude Code and Codex memory into one database: by default the databases are separate and a shared path is set deliberately
  • You are wiring up an unusual MCP client and want to give it the same memory layer

Not a fit when

  • A one-off task with no continuation: the memory will not pay for the setup
  • Dialog content must not go to an external model and you have no local model through Ollama
  • The machine has no Node.js 22.14 or 24: the package will not start on an older Node.js
  • You want a simple notes file in the repository that people read by eye: memX keeps data in its own database

Example request

Recall which database we picked for the project last week and which blockers are left on the migration.

Limitations

Building the memory, planning recall and maintenance need a language model that you configure yourself: the provider openai-compatible, anthropic, google or ollama, an address, a model name and a key. The author advises a fast, low-cost model with reliable JSON output. The key is written to the config as plain text unless you pass it through an environment variable with the --llm-api-key-env flag.

Node.js 22.14 or 24 is required, plus Python 3 and the intfloat/multilingual-e5-small model for local embeddings by default. OpenClaw needs version 2026.3.25 or newer. The commands pull fresh code straight from GitHub, so the package version is not pinned. If port 127.0.0.1:3878 is held by someone else's service, the quickstart stops and you must pass another address with the --memx-url flag.

How to disable. Run npx -y -p github:NeoLi00/memX memx uninstall claude-code, codex or openclaw. The command first backs up the configuration, then removes only memX entries, stops the local service and deletes the plugin and the local marketplace. The --dry-run flag shows the plan without changes.

FAQ

How do I install memX in Claude Code?

Run npx -y -p github:NeoLi00/memX memx quickstart claude-code and pass the model parameters: --llm-provider, --llm-base-url, --llm-model and a key. The command installs the shared config, a local Claude Code plugin marketplace, lifecycle hooks and a managed local service. The --dry-run flag gives a preview.

Which language model does memX need?

Any model reachable through the openai-compatible, anthropic, google or ollama provider. The author recommends a fast, cheap model that answers reliably in JSON. Local Ollama needs no key.

Do Claude Code and Codex share one memory?

Not by default: memory is scoped to the host, and Claude Code and Codex get separate local databases. To merge them you must deliberately override the database path and the actor settings.

Why are the memory tools hidden from the agent?

In Claude Code and Codex the quickstart sets --mcp-tools none. Hooks inject what is needed and record every turn by themselves, and hidden tools keep the agent from duplicating writes and from reading audit data. The --mcp-tools full mode opens the whole set.

How do I connect memX to another MCP client?

Run memx quickstart mcp with the same model parameters. The command starts the local service and prints a ready entry for your client's MCP configuration. In this mode the full tool set is open by default.

Discussion

No questions or reviews yet.

Plugins

A persistent memory plugin: stores observations from agent sessions and injects relevant context into new ones

PluginBroad access104.9KRepository stars

Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones

CLIBroad access2.2KRepository stars
Official

The Supermemory plugin for Claude Code: persistent memory across sessions with automatic prompt recall, conversation capture and a codebase index

PluginBroad access2.8KRepository stars

Shared semantic memory for agents: conversations are saved as markdown and recalled by search across Claude Code, Codex and other agents

PluginExtended access2.8KRepository stars
Editors’ pick

Memory layer for agents: plugins for Claude Code, Codex, Cursor and OpenCode, plus a CLI and SDKs that carry context across sessions

PluginExtended access68.1KRepository stars
Official

Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools

MCP serverExtended access30KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
memX: long-term memory for agents (this entry)no403
MegaMemorynonot required732stores a graph of project concepts and decisions as an MCP server, without hooks that record and inject memory by themselves
SimpleMemyeskey is optional3,856compresses dialogs into atomic facts and ties time to absolute dates

README in short

The README opens with the author's measurements: 94.2% on the LongMemEval-S suite by the R@3 metric (the right result among the top three) and 100% on 30 engineering cases, each longer than 20 turns. It continues with an architecture diagram, an agent support table, a quickstart with the model parameters explained, service management and the clean uninstall procedure. The author moved the detailed architecture to ARCHITECTURE.md.

README badge

Report a problem

Foxx AImemX: long-term memory for agents
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.