FlowElement-ai/m_flow

A bio-inspired cognitive memory engine — a new paradigm for Graph RAG.

What it solves

Traditional RAG systems often rely on simple vector similarity, which can find keywords that are semantically close but contextually irrelevant. M-flow addresses this by treating retrieval as a reasoning and association problem rather than just a proximity match, ensuring that retrieved information is connected through a coherent chain of evidence.

How it works

M-flow organizes knowledge into a four-layer hierarchical "Cone Graph":

  • Episode: Bounded semantic focuses like incidents or decisions.
  • Facet: Topical cross-sections of an Episode.
  • FacetPoint: Atomic assertions or facts.
  • Entity: Named objects (people, tools, metrics) linked across episodes.

Instead of just matching vectors, the system uses the graph as a scoring engine. A query finds an entry point (an anchor) via vector search, and then the system propagates evidence along semantically weighted edges. The final result is an "Episode bundle" scored by the strongest, lowest-cost path of reasoning connecting the query to the information.

Who it’s for

  • AI Agent Developers: Building agents that require persistent, long-term episodic and procedural memory.
  • Enterprise Knowledge Management: Systems needing to resolve complex dependencies and coreferences (e.g., knowing that "she" refers to "Maria") to maintain context across long conversations.
  • Developers building multi-user systems: Utilizing face-aware memory partitioning to isolate user data via biometric identity.

Highlights

  • Graph-led retrieval: Uses path-cost optimization over a structured graph rather than flat similarity ranking.
  • Coreference resolution: Resolves pronouns into concrete entities during ingestion to prevent retrieval gaps.
  • Multi-granularity support: Allows queries to enter at any level (Entity, Facet, or Episode) and navigate the hierarchy.
  • Procedural memory: Captures abstract patterns, workflows, and decision rules for reusable knowledge.
  • Extensive integration: Supports 50+ file formats and multiple databases including Neo4j, LanceDB, and PostgreSQL.