Favicon of M Flow

M Flow

A self-hosted AI memory engine that ranks context through graph connections. Supports Ollama and cloud LLM providers, with an Apache 2.0 license.

M Flow is a self-hosted memory engine for developers building AI agents and applications that need to recall earlier conversations, facts, and workflows. Its distinguishing feature is how it selects context: vector search finds possible matches, then a knowledge graph ranks them by the evidence connecting them to the query. It's open source under Apache 2.0 and runs as a Python library or a Docker service.

The graph links events and summaries to individual facts and named entities. A question about a small detail can retrieve the wider event that explains it, while a question about a person can connect information across conversations. Results include related context for an LLM to use in its answer. M Flow also resolves pronouns before indexing, so a later reference to "she" can remain connected to the person named earlier. Its procedural memory captures habits, decision rules, and formatting preferences for use in future interactions.

It accepts PDFs, DOCX, HTML, Markdown, images, and audio. Ollama provides a local model option; supported cloud providers include OpenAI, Anthropic, Mistral, and Groq, so the choice of backend determines whether model requests go to an external service. Storage options include LanceDB, Neo4j, PostgreSQL with pgvector, and ChromaDB. An MCP server exposes memory to IDEs, and a local web console lets you inspect the knowledge graph. Optional integration with fanjing-face-recognition routes conversations into separate memory datasets for recognized people.

Similar to M Flow