M Flow
A self-hosted AI memory engine with Ollama support that retrieves connected facts and events. Runs in Python or Docker under Apache 2.0.
M Flow is a self-hosted memory engine for developers whose AI agents need to recall past conversations and work preferences. It runs in Python or Docker and supports Ollama for local model use, alongside providers such as OpenAI and Anthropic. Choosing a cloud provider sends model requests to that service.
Its retrieval ranks memories by the connections that support an answer. A precise detail can lead back to the discussion it belongs to, while a question about a person or tool can pull context from several events. Results include the event and its related facts for a downstream LLM to compose an answer.
The memory capabilities cover several kinds of context:
- Event recall links summaries, topics, individual facts and named entities in one searchable graph.
- Pronoun resolution connects references such as "she" or "that company" to named entities across conversation turns.
- Procedural memory captures recurring workflows, decision rules and formatting preferences for later interactions.
- Optional fanjing-face-recognition integration keeps separate memory datasets for people identified by a camera.
M Flow accepts documents, images and audio. It supports storage backends including LanceDB, Neo4j and PostgreSQL/pgvector, and provides a web console with graph visualization. Its MCP server exposes memory tools to compatible IDEs; LangChain and LLaMA-Index are also supported integrations. The Python code is open source under Apache 2.0.