Skip to main content

Memory stack for AI agents: BM25 + Qdrant + Memgraph + RRF retrieval, Gemini Flash inference layer, 8-stage recall pipeline.

Reason this release was yanked:

Broken dependencies

Project description

mnemostack

Memory stack for AI agents — durable, structured, semantically searchable.

mnemostack is a hybrid memory system combining BM25, vector search (Qdrant), and knowledge graph (Memgraph) with a unified recall pipeline, reranker, and optional inference layer.

Status: 🚧 alpha — under active development.

Features

  • 🧠 Hybrid retrieval — BM25 (exact tokens) + vector (semantic) + graph (relationships), fused via Reciprocal Rank Fusion
  • 🔌 Pluggable embeddings — Gemini, Ollama, or HuggingFace (local GPU), via provider registry
  • 📚 Temporal knowledge graph — facts have valid_from/valid_until so you can query point-in-time state
  • 💬 Answer mode — inference layer synthesizes concise factual answers with source citations and confidence scores
  • 🔄 Consolidation lifecycle — nightly decay, extraction, and promotion of memories
  • 🛡 Graceful degradation — retrieval keeps working if graph is down

Installation

# Clone and install in dev mode
git clone https://github.com/YOUR_ORG/mnemostack.git
cd mnemostack
python3 -m venv .venv && source .venv/bin/activate
pip install -e .

# Optional extras
pip install -e ".[huggingface]"  # local GPU embeddings
pip install -e ".[mcp]"          # MCP server
pip install -e ".[dev]"          # tests + linters

Quick start

Pick an embedding provider

from mnemostack.embeddings import get_provider

# Option A: Gemini (cloud, best quality)
provider = get_provider("gemini")  # reads GEMINI_API_KEY from env

# Option B: Ollama (local, no API key)
provider = get_provider("ollama", model="nomic-embed-text")

# Option C: HuggingFace (local, GPU)
provider = get_provider("huggingface", model="BAAI/bge-large-en-v1.5")

vec = provider.embed("What did we decide about authentication?")
print(f"{provider.name} — dim {provider.dimension}")

Health check

ok, msg = provider.health_check()
print("provider ok" if ok else f"down: {msg}")

Custom provider

Any class that inherits EmbeddingProvider can be registered:

from mnemostack.embeddings import EmbeddingProvider, register_provider

class MyProvider(EmbeddingProvider):
    @property
    def name(self): return "my-provider"
    @property
    def dimension(self): return 512
    def embed(self, text): ...
    def embed_batch(self, texts): ...

register_provider("my-provider", MyProvider)

Design

See ARCHITECTURE.md for detailed design: pipeline stages, Qdrant schema, Memgraph temporal model, consolidation runtime, MCP tools.

Roadmap

  • Embedding provider registry (Gemini / Ollama / HuggingFace)
  • Qdrant wrapper + chunking
  • BM25 + RRF + reranker pipeline
  • Answer mode (Gemini Flash inference)
  • Memgraph wrapper + temporal queries
  • Consolidation runtime (decay, promote, summarize)
  • CLI (mnemostack search, mnemostack index, mnemostack runtime)
  • MCP server (Model Context Protocol for Claude/GPT clients)

License

Apache 2.0 — see LICENSE.

Contributing

Early days. Issues and PRs welcome once API stabilizes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnemostack-0.1.0a1.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnemostack-0.1.0a1-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file mnemostack-0.1.0a1.tar.gz.

File metadata

  • Download URL: mnemostack-0.1.0a1.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mnemostack-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 66da953030ddb6e0536645f7952a01bf7e2e07c00d30596618046b5eaa436ede
MD5 ce46ceebc2bcec29e131bb431810d484
BLAKE2b-256 a99cf2784e1de07e0ca4fff6c7f3cc24dbbe4e09a4a4bee7ba41ab8c4563ce83

See more details on using hashes here.

File details

Details for the file mnemostack-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: mnemostack-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mnemostack-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb39eb6cb88732d16f542ccc0b431dd17dd6082816d7a148ccda09bfa05a934d
MD5 1e78ac998da7e2e293b98efdad8134aa
BLAKE2b-256 18b26d4aba6bf898d6031f5f8545c5283cd5b1db4e4e70b4aca1eb9f4644be6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page