m_flow  by FlowElement-ai

Cognitive memory system for relevant retrieval

Created 2 weeks ago

New!

510 stars

Top 61.1% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

M-flow is a knowledge retrieval system designed for AI agents, offering a cognitive memory approach that prioritizes relevance over mere similarity. It addresses the limitations of traditional Retrieval-Augmented Generation (RAG) systems by making the knowledge graph the core retrieval mechanism, enabling more accurate and contextually aware responses. This system benefits developers building sophisticated AI applications by providing a robust and reasoning-based memory component.

How It Works

M-flow fundamentally shifts retrieval from embedding distance to graph-based reasoning. When a query arrives, an initial vector search identifies potential entry points across a four-level "Cone Graph" (Episode, Facet, FacetPoint, Entity). The system then propagates evidence through this graph, scoring knowledge units based on the tightest chain of reasoning connecting them to the query. This path-based approach, distinct from similarity matching, allows M-flow to uncover relevant information even with zero keyword overlap, mimicking human cognitive recall for superior accuracy.

Quick Start & Requirements

  • Primary install: Docker (./quickstart.sh), pip (pip install mflow-ai), or from source (pip install -e .).
  • Prerequisites: Python 3.10–3.13, LLM API keys (e.g., OpenAI). The interactive Playground requires a companion face recognition service and camera access.
  • Links: m-flow.ai, Architecture, Examples.
  • Setup: Docker quickstart is a single command. Playground setup involves cloning an additional repository and downloading models.

Highlighted Details

  • Performance: Claims leading benchmark scores (e.g., 81.8% LLM-Judge on LoCoMo-10 Aligned) against competitors like Cognee Cloud and Zep Cloud.
  • Retrieval Modes: Offers Episodic (primary graph-routed), Procedural, Triplet Completion, Lexical, and Cypher search.
  • Data Support: Ingests 50+ file formats including PDFs, DOCX, HTML, and images.
  • Database Integration: Supports multiple backends: LanceDB, Neo4j, PostgreSQL/pgvector, ChromaDB, KùzuDB, Pinecone.
  • LLM Agnostic: Compatible with OpenAI, Anthropic, Mistral, Groq, Ollama, LLaMA-Index, and LangChain.
  • Features: Includes precise summarization, a Model Context Protocol (MCP) server for IDE integration, and both CLI and Web UI.

Maintenance & Community

The project maintains a comprehensive test suite (963 passed tests) and supports Python 3.10-3.13. Community interaction points include a contact email (contact@xinliuyuansu.com) and the GitHub repository. No dedicated community channels like Discord or Slack are listed.

Licensing & Compatibility

M-flow is licensed under the permissive Apache License 2.0. This license allows for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

Core functionality requires LLM API keys. The interactive Playground feature, while functional, necessitates a separate companion service (fanjing-face-recognition) and careful setup, particularly regarding camera access on non-Linux systems where Docker cannot directly access USB devices, requiring the companion service to run on the host.

Health Check
Last Commit

17 hours ago

Responsiveness

Inactive

Pull Requests (30d)
79
Issues (30d)
2
Star History
510 stars in the last 18 days

Explore Similar Projects

Feedback? Help us improve.