LibreAI / AI Agents / m_flow
// agents · FlowElement-xinliuyuansu/m_flow

m_flow

M-flow is a bio-inspired cognitive memory engine for AI agents — a graph alternative to flat RAG

★ 4.5k stars⑂ 258 forksApache-2.0updated 2026-09
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

m_flow is an open-source ai agents project by FlowElement-xinliuyuansu (FlowElement-xinliuyuansu/m_flow on GitHub). It has 4,514 GitHub stars and 258 forks, is released under the Apache-2.0 license, and was last updated on GitHub on 1 September 2026.

GitHub stars
4,514
Forks
258
License
Apache-2.0
Last updated on GitHub
1 September 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Decide your data

    Gather the conversations, documents, or files you want the memory engine to learn from.

  2. Install M-flow

    Install from PyPI with pip or uv.

  3. Configure an LLM

    Point M-flow at an LLM (for example an OpenAI-style API) used for ingestion and query.

  4. Ingest and query

    Add your data, then ask a question and compare episodic versus triplet-completion retrieval.

// features

Why people love it

Four-layer cone graph

Episodes decompose into facets, facet points, and entities, so retrieval can start at the right level of abstraction.

Evidence-path scoring

Answers are ranked by the strongest chain of weighted evidence, not just embedding similarity.

Coreference-aware ingestion

Pronouns and references are resolved at write time, so related facts join the same chains.

Five retrieval modes

Episodic, Procedural, Triplet Completion, Lexical, and Cypher modes for different question types.

Procedural memory

Remembers how tasks were done, not only facts that were stated.

Broad ingestion and MCP

50+ file formats supported, plus MCP integration for agent clients.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Clone the project and enter its directory for a source install.

    git clone https://github.com/FlowElement-xinliuyuansu/m_flow.git
    cd m_flow
  2. Install from PyPI

    Install the published package (or `pip install -e .` from the clone).

    pip install mflow-ai
  3. Ingest and query

    Use the Python API documented in the README to add data and run your first query.

    # see README for the exact ingest/query API calls
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains M-flow?

FlowElement (flowelement.ai) develops M-flow as an open-source project.

Is M-flow free?

Yes, Apache-2.0 licensed. You provide the LLM used for ingestion and querying.

Does it need a paid API key?

It needs an LLM for ingestion/query — typically your own API key for an OpenAI-style provider, as configured per the README.

How does it compare to GraphRAG or a vector store?

Vector stores retrieve similar chunks; GraphRAG builds entity graphs. M-flow's cone graph adds graded abstraction layers and scores answers by evidence-path strength with coreference resolved at ingestion.

How do I get started?

Run `pip install mflow-ai`, configure your LLM, ingest a small dataset, and try the Episodic and Triplet Completion modes from the README examples.

// keep exploring

Similar tools

AI Agents

memvid

A serverless, single-file memory layer for AI agents - replace complex RAG pipelines

★ 16.6k starsApache-2.0
View guide →
AI Agents

Memary

The open-source memory layer for autonomous agents — knowledge-graph memory that emulates human memory

★ 2.7k starsMIT
View guide →
AI Agents

MemOS

Self-evolving memory OS for LLMs and agents: persistent graph memory, hybrid retrieval, skill reuse.

★ 11.8k starsApache-2.0
View guide →
Agents

danghuangshang

Multi-agent court inspired by ancient China: specialized agents debate and decide.

★ 2.7k starsMIT
View guide →
AI Agents

ReMe

A memory management kit for agents — remember me, refine me.

★ 3.6k starsApache-2.0
View guide →
Agents

agentic-context-engine

Make your agents learn from experience with a dedicated context engine.

★ 2.6k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if m_flow is not the right fit.

Get m_flow

Free and open — grab the source, star the repo, and start creating.