M-flow Cognitive Memory Engine

A graph-driven RAG paradigm that scores evidence paths for human-like associative recall.

This agent's GitHub repository has not been publicly accessible since 2026-11-20 — usually because the author made it private or deleted it. The stars, install steps and FARS review below reflect the last public version and may no longer work.
GitHub repo no longer public Quick start ↓ Compare alternatives
Source repo
FlowElement-xinliuyuansu/m_flow (no longer public)
Stars (last seen)
★ 4.5k
Last updated
4mo ago
FARS reviewed
Nov 08, 2026
License
Apache-2.0
Primary language
Python

At a glance

How it runs
CLILibrary / SDKSelf-hosted service
Works with
Universal · cross-platformOpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python 3.10+DockerShell / CLINetwork accessLocal filesystem
Typical use
AI assistants that need to remember user preferences and workflows across sessions for later reference.
Not a fit if
  • Individuals unwilling to run Docker, databases, and multiple services
  • Users wanting face-aware memory without a camera or the extra face service

What does this agent do, and when should you use it?

M-flow is a bio-inspired cognitive memory engine that organizes knowledge in a four-layer cone graph (Episode → Facet → FacetPoint → Entity) and retrieves via graph-routed Bundle Search. Unlike traditional RAG relying on vector similarity, M-flow makes the graph itself the scoring engine: vector search only opens entry points, and final relevance is determined by evidence propagation along typed, semantically weighted edges, with each knowledge unit scored by the strongest chain of reasoning connecting it to the query. The repository includes the core Python library (m_flow), a FastAPI backend, a CLI (mflow), a Next.js web console, an MCP server, and adapters for multiple databases (LanceDB, Neo4j, PostgreSQL/pgvector, ChromaDB, KùzuDB, Pinecone) and LLM providers (OpenAI, Anthropic, Mistral, Groq, Ollama, etc.). It is released under Apache 2.0 and comes with 963 passing tests.

M-flow ingests data from 50+ file formats (PDFs, DOCX, HTML, Markdown, images, audio), performs chunking, parsing, coreference resolution (resolving pronouns to concrete antecedents before indexing), and builds a knowledge graph with embeddings. Queries are served via the query() method or mflow search command, using graph-routed Bundle Search: vector search casts a wide net across granularities (Episode, Facet, FacetPoint, Entity), then graph propagation traverses edges with semantic descriptions (edge_text) in a cost-aware manner, finally scoring each Episode by its strongest evidence path. It also offers face-aware memory partitioning through integration with a face-recognition service, procedural memory extraction, and an MCP server to expose memory as tools.

  1. AI assistants that need to remember user preferences and workflows across sessions for later reference.
  2. Team knowledge bases answering specific event questions like "Why was Maria upset at Monday's standup?".
  3. Developers wanting to augment existing RAG systems with graph structure beyond vector similarity.
  4. Multi-user environments (e.g., home or office) needing per-user memory partitioned by speaker and routed automatically.
  5. Researchers evaluating GraphRAG approaches on benchmarks like LoCoMo and LongMemEval.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install mflow-ai
Environment variables
LLM_API_KEY
Install notes cover
Windows · Docker

How do you install or deploy this agent?

One-command Docker setup: git clone https://github.com/FlowElement-xinliuyuansu/m_flow.git && cd m_flow && ./quickstart.sh (Windows users use quickstart.ps1). Or install via pip: pip install mflow-ai then set export LLM_API_KEY="sk-...". From source: git clone ... && cd m_flow && pip install -e ..

How do you use this agent?

In Python:

import asyncio, m_flow
async def main():
    await m_flow.add("M-flow builds persistent memory for AI agents.")
    await m_flow.memorize()
    results = await m_flow.query("How does M-flow work?")
    for item in results.context:
        print(item)
asyncio.run(main())

Or via CLI: mflow add "...", mflow memorize, mflow search "query" --query-type EPISODIC, mflow -ui starts the web console.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Graph-routed Bundle Search outperforms traditional RAG in benchmarks (81.8% on LoCoMo-10 vs Supermemory's 64.4%).
  • Unified multi-granularity retrieval in one graph avoids user burden of choosing a memory layer.
  • Semantic edges (edge_text) carry natural-language meaning, enhancing interpretability.
  • Supports multiple databases and LLM providers, offering flexibility.
  • Coreference resolution improves retrieval accuracy in conversational memory.
Limitations
  • Higher complexity in end-to-end retrieval pipeline compared to simple vector retrieval.
  • Benchmarks depend on specific models (gpt-5-mini/gpt-4o-mini); actual performance may vary.
  • Face recognition integration requires an additional service (fanjing-face-recognition) and a camera.
  • Some features (e.g., Playground) require extra configuration for production deployment (Docker, networking).

How does this agent compare with similar options?

In LoCoMo-10 and LongMemEval benchmarks, M-flow is compared against memory/GraphRAG systems like Cognee, Zep, Supermemory, and Mem0, showing higher LLM-Judge scores.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
M-flow Cognitive Memory Engine This agent 57 · Major gaps CLIFree + model costs ★ 4.5k 4mo ago Python OpenAI API · Claude API
ApeRAG 43 · Major gaps Self-hosted serviceFree + model costs ★ 1.3k 1mo ago Python —
Mnemosyne 71 · Some gaps CLIFree ★ 3.7k 1d ago Python Codex · Claude Code
SimpleMem: Efficient Lifelong Memory for LLM Agents 47 · Major gaps Library / SDKFree + model costs ★ 3.9k 4mo ago Python ChatGPT · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
57/ 100 5-point scale 2.9 / 5
Trust 11/29
Reliability 6/14
Adaptability 14/18
Convention 15/18
Effectiveness 7/13
Verifiability 4/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

The packet describes the main data paths through ingestion, memory building, retrieval, local databases, and optional external LLM and face-recognition services, and lists delete and prune tools. The Skill instructs agents to search silently and save conversation content at the end, without explaining user confirmation, sensitive-data filtering, retention, or recovery; prune resets all memory. Least privilege, confirmation, sensitive-data handling, external effects, and rollback are therefore only partially addressed. Dependency ranges and a vulnerability-reporting path are documented, but no dependency audit evidence is supplied. Author metadata and repository references provide limited attribution, but do not verify publisher identity or clearly establish maintenance responsibility.

Reliability6 / 14 · 2.1/5

The README, package configuration, and development notes describe a substantial component and setup structure, including database, LLM, and Docker dependencies. The README claims 963 tests passed, while the packet includes only test excerpts and commands, so that result cannot be verified statically. Documentation varies in CLI startup instructions, supported-version scope, and product description; failure handling is evidenced mainly by a few CLI messages. Consistency and failure messaging receive partial credit.

Adaptability14 / 18 · 3.9/5

The packet identifies concrete audiences and scenarios across developers, researchers, agent memory, MCP, CLI, multiple databases and LLMs, and broad, topical, atomic, and entity queries. The Skill specifies memory triggers and some exclusions, while the README distinguishes the primary episodic mode from a simpler triplet mode. However, the Skill also calls for silent search before every answer, and boundaries, false-trigger handling, and environment-specific limitations are not fully explained. Docker, Windows, macOS/Linux, and local deployment instructions support varied environments.

Convention15 / 18 · 4.2/5

The README covers architecture, layout, installation, execution, deployment, examples, testing, and contribution. AGENTS.md reads as guidance for coding assistants and contributors rather than runtime instructions for the memory product. Apache-2.0 metadata matches the supplied license. The Skill is duplicated in two locations, and the packet has no clear release changelog. A supported-version table and contact/reporting path offer some maintenance information, but ownership and update commitments remain limited. Some limitations are stated, including longer context, Docker camera access, and mode-specific use, but coverage is incomplete.

Effectiveness7 / 13 · 2.7/5

The product combines vector retrieval, a layered knowledge graph, and evidence-path scoring into memory tools that an agent can use, with Python, CLI, MCP, and UI interfaces. The README supplies benchmark tables and scenario examples, but these are project claims and the packet does not independently substantiate the results. Full setup can require Docker, API credentials, and optional database or face-recognition components; the documentation also says more precise summarization produces longer context. Cost-benefit tradeoffs are only partly explained.

Verifiability4 / 8 · 2.5/5

Architecture and usage claims have some support across the README, Skill, package metadata, and test instructions; test commands and a security-reporting route are identifiable. The packet lacks complete test results, benchmark raw data, and implementation files needed to corroborate major performance claims. Benchmark tables include comparison conditions but not their underlying evidence in the supplied material, and the boundary between factual description and promotional inference is unclear. These limits preclude high scores.

Risks and how to mitigate them
  • The OpenClaw Skill directs silent search before every answer and saving meaningful conversations; confirm user awareness, sensitive-data handling, retention, and deletion procedures before deployment.
  • The Skill exposes prune as a full memory reset, but the packet does not describe recovery; confirm its scope and backup arrangements before use.
  • The README's test count and benchmark performance are project claims that cannot be independently verified from this static packet.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 0d585cda2f58
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/m-flow.svg)](https://followagents.com/en/agents/m-flow)
<a href="https://followagents.com/en/agents/m-flow"><img src="https://followagents.com/badge/m-flow.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.3.4 M-flow v0.3.4
    Release notes excerpt
    M-flow v0.3.4 Critical Fixes - Remove max_tokens parameter incompatible with GPT-5 series — all LLM calls were failing - Fix session/conversation history crash — compress_text(str) type mismatch replaced with correct summarize_text(str) High Priority Fixes - Fix audio processing (create_transcript → transcribe_audio method name) - Fix image processing (transcribe_image → describe_image method name) - Fix UUID serialization in search results, cache adapters, and graph property encoding - Fix _hash_sensitive dead code causing telemetry data corruption …
    View on GitHub ↗

FAQ

Is M-flow compatible with my existing database?
It supports LanceDB, Neo4j, PostgreSQL/pgvector, ChromaDB, KùzuDB, and Pinecone.
Do I need a GPU?
No, but vector search and LLM inference require network access and valid API keys (e.g., OpenAI).
How can I integrate M-flow into my IDE?
Run the MCP server (cd m_flow-mcp && uv run python src/server.py --transport sse) to expose memory as MCP tools.
Can it handle multi-user isolation?
Yes, face-aware memory partitioning is available through an optional service.
Was this page helpful?
GitHub repo no longer public Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts