AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Memoryx

mcp-luckylo99-memoryx · by luckyLo99

Long-term memory system for AI agents with hybrid retrieval, cognitive decay models, and Hermes Agent integration

No reviews yet
0 installs
25 views
0.0% view→install

Install

$ agentstack add mcp-luckylo99-memoryx

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-luckylo99-memoryx)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Memoryx? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

MemoryX

MemoryX is a long-term memory system for AI agents with hybrid retrieval, multi-layer storage, and cognitive decay models. It provides memory storage, retrieval, and management through a Python API, MCP server, and native Hermes Agent integration.

> Latest: v3.1.0 — Configuration Wizard, install.sh integration, automatic env setup, sole-memory-source strategy. See [CHANGELOG](CHANGELOG.md).

Features

  • Multi-layer memory: working, short-term episodic, long-term semantic, consolidated knowledge, archive
  • Hybrid retrieval: semantic vector + keyword (FTS5/BM25) + temporal + entity relationship + importance + episodic context
  • Cognitive models: Ebbinghaus forgetting curve, Baddeley working memory, dual-process retrieval (System 1 / System 2), predictive coding, cognitive load optimization, procedural memory
  • Storage backend: SQLite with FTS5 full-text search, optional vector database
  • Session isolation: per-session scoping with global fallback
  • Conflict detection: semantic and entity-level conflict detection
  • Memory lifecycle: candidate -> committed -> verified -> superseded with version history
  • Evolutionary trajectory: tracks how a user's preferences, opinions, and facts change over time per entity-slot (e.g. favorite singer 张杰 → 房东的猫) — kept as an append-only timeline rather than a conflict, with Ebbinghaus decay that down-weights but never deletes old nodes
  • MCP server: Model Context Protocol support for external clients
  • Hermes Agent integration: native provider, bridge, and tool interface

Quick Start

Option 1: Install from PyPI (minimal)

pip install memoryx

Option 2: Clone and configure (recommended for full setup)

git clone https://github.com/luckyLo99/memoryx.git
cd memoryx
bash configure_memoryx.sh

The configuration wizard will guide you through:

  1. Checking your Python and SQLite environment
  2. Choosing storage backend (SQLite or LanceDB vector hybrid)
  3. Configuring LLM API (OpenAI, SiliconFlow, or custom) for memory extraction and cognitive reasoning
  4. Configuring Embedding service (if vector storage is enabled)
  5. Choosing integration mode (MCP Server, Hermes Agent, or Standalone API)
  6. Setting the memory source policy — sole memory source or coexist with other memory systems
  7. Toggling advanced modules (cognitive guard, temporal cognition, reflection, tool memory, meta-cognition, palace of memory, observability)
  8. Automatically installing all dependencies and initializing the database
  9. Providing ready-to-use launch commands
# Or use the legacy installer (creates venv and installs deps only, no interactive config):
bash install.sh

Option 3: Manual setup

git clone https://github.com/luckyLo99/memoryx.git
cd memoryx
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .

Verify

python -c "import memoryx; print('ok')"
pytest -q

Memory Source Policy (v3.1.0+)

MemoryX supports two strategies for how it interacts with other memory systems (e.g., Hermes built-in memory, Claude projects, or other agent context stores):

Sole Memory Source (MEMORYX_UNIQUE_MEMORY_SOURCE=true)

When enabled, MemoryX takes over all memory functions:

  • External memory tools and context stores are suppressed
  • Memory extraction runs on every turn
  • MemoryX handles storage, retrieval, and context injection end-to-end
  • No other memory mechanism should inject context into the agent

Use this when you want MemoryX to be the single source of truth for long-term memory and strict memory isolation.

Coexistence Mode (default, MEMORYX_UNIQUE_MEMORY_SOURCE=false)

MemoryX works alongside other memory systems:

  • MemoryX augments rather than replaces existing memory mechanisms
  • Other memory tools and context stores remain active
  • MemoryX extraction runs at the configured frequency
  • The agent receives context from multiple sources

Use this when you want to layer MemoryX's cognitive memory features on top of an existing memory setup, or when evaluating MemoryX alongside your current system.

Hermes Agent Coexistence

MemoryX integrates cleanly with Hermes Agent's built-in memory. In coexistence mode:

| Aspect | Behavior | |--------|----------| | Memory storage | MemoryX stores structured, scored, versioned memories via its provider; Hermes built-in memory continues to work independently | | Context injection | MemoryX injects context through the HermesBrdge; (cognitive guard, narrative reflection, context blocks); Hermes may also inject its own context | | Tool calls | MemoryX intercepts the memory tool call via HermesCompatibilityAdapter; other Hermes memory tools remain unaffected | | Guard decisions | MemoryX's tool guard can block or allow memory operations based on safety and cognitive checks, without interfering with non-memory Hermes tools | | Session lifecycle | MemoryX hooks into Hermes session events and works alongside existing session handlers |

There is no conflict — MemoryX operates at the memory-abstraction layer, while Hermes built-in memory operates at the platform level. They complement each other.

Configuration Wizard Details

The configure_memoryx.sh script (v3.1.0+) is an interactive 5-step wizard:

| Step | What it does | |------|-------------| | 1/5 Check environment | Detects Python 3.11+, verifies SQLite FTS5 support | | 2/5 Configure modules | Interactive prompts for storage, LLM, embedding, integration mode, memory source policy, and advanced modules | | 3/5 Generate .env | Writes MEMORYX_* environment configuration, backs up existing .env | | 4/5 Install dependencies | Creates .venv, installs core/optional deps, runs DB schema, verifies import | | 5/5 Launch | Shows summary, offers to start MemoryX in the chosen mode, prints MCP config |

The wizard is designed to be run once after cloning. It is safe to re-run — it will back up any existing .env and skip already-created virtual environments.

Installation Options

pip install memoryx              # Minimal
pip install memoryx[vector]      # With vector search (LanceDB + sentence-transformers)
pip install memoryx[mcp]         # With MCP server
pip install memoryx[dev]         # Development tools

Or install all extras:

pip install memoryx[vector,mcp,dev]

Hermes Agent Usage

from memoryx.hermes.provider import MemoryXHermesProvider
from memoryx.hermes.bridge import HermesMemoryBridge
from memoryx.storage.repository import MemoryRepository

repo = MemoryRepository("./memory.db")
await repo.open()
provider = MemoryXHermesProvider(
    bridge=HermesMemoryBridge(repository=repo)
)

# Store a memory
result = await provider.handle_tool_call("memory", {
    "action": "add",
    "content": "User prefers Python for data analysis"
})

# Retrieve memories
result = await provider.handle_tool_call("memory", {
    "action": "read",
    "query": "Python"
})

Architecture

User Input -> Hermes Agent
                |
    MemoryXHermesProvider -> HermesMemoryBridge
                                |
                     MemoryCandidateService
                                |
    +---------------------------+---------------------------+
    |                       Storage                          |
    |   MemoryRepository (SQLite FTS5 + optional Vector DB)  |
    +--------------------------------------------------------+
    |                     Retrieval                           |
    |   HybridRetrievalEngine (6-channel scoring + decay)    |
    +--------------------------------------------------------+
    |                  Cognitive Modules                      |
    |   Ebbinghaus | Baddeley | Dual-Process | Predictive    |
    +--------------------------------------------------------+
    |                   Context Injection                     |
    +--------------------------------------------------------+
                                |
                        Agent Response

MCP Server

{
  "memoryx": {
    "command": "python",
    "args": ["-m", "memoryx.mcp.server"],
    "env": {
      "MEMORYX_ENV_FILE": "/path/to/memoryx/.env"
    }
  }
}

Compatible with Claude Code, Gemini CLI, and other MCP clients.

Documentation

| Topic | Location | |-------|----------| | Configuration Wizard | Run bash configure_memoryx.sh | | Hermes Integration | docs/HERMESMEMORYXAUTHORITATIVE.md | | Cognitive Models | docs/cognitive/ | | Pipeline (extraction / consolidation / storage / retrieval / forgetting) | docs/pipeline/ | | Evolutionary trajectory / preference tracking | docs/evolution/ | | Benchmarks & performance contracts | docs/benchmarks.md | | Architecture overview | docs/architecture.md | | API Reference | docs/ | | Changelog | CHANGELOG.md | | Credits | CREDITS.md |

Requirements

  • Python 3.11+
  • SQLite 3.38+ (for FTS5 full-text search)
  • Optional: sentence-transformers (for local vector search)
  • Optional: LanceDB (for vector storage)
  • Optional: MCP Python library (for MCP server)

License

MIT License - see LICENSE for details.

Contributing

See CONTRIBUTING.md for guidelines.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.