M-Flow Memory Skill for Openclaw

A high-performance memory management system for AI agents utilizing vector search, graph databases, and Karpathy-inspired multi-stage knowledge distillation.

sora-mury
v1.0.0
Apr 5, 2026
0
677
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install m-flow-memory

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install m-flow-memory using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is M-Flow Memory Skill?

The M-Flow Memory Skill is a sophisticated memory framework designed for AI agents within the Openclaw Skills ecosystem. It integrates cutting-edge technologies including Cone Graph, LanceDB for vector search, and Kuzu for graph database management to create a robust long-term memory architecture.

By implementing a Karpathy-style 4-stage management workflow, this skill transforms raw session data into structured, searchable knowledge. It allows agents to maintain context over long periods, perform semantic retrieval, and conduct episodic memory searches, making it an essential component for developers building high-autonomy AI systems.

M-Flow Memory Skill Use Cases

  • Building a persistent knowledge base for LLMs that evolves over time through automated distillation.
  • Enhancing AI agents with episodic memory to recall specific user interactions and session context.
  • Implementing structured knowledge retrieval using a mix of lexical (BM25), episodic (vector), and triplet (graph) searches.
  • Managing large-scale AI session archives with automated linting and deduplication processes.

How M-Flow Memory Skill Works

  1. Data Ingestion: Raw session content or specific knowledge points are added to the memory buffer using the add method.
  2. Knowledge Distillation: The system processes raw data through a 4-stage Karpathy workflow, moving from initial audit to a structured wiki layer.
  3. Indexing: The memorize function triggers the indexing of all unprocessed content into vector and graph databases.
  4. Multi-Modal Retrieval: Users or agents query the memory system using various modes including lexical, episodic (vector), or triplet (relational) searches.
  5. Maintenance: Weekly health checks perform deduplication, merging, and updating of knowledge to ensure database integrity.

M-Flow Memory Skill Setup

To integrate this into your Openclaw Skills environment, ensure you have Ollama running locally and install the specific required dependencies:

# Critical: Use LanceDB version 0.26.0
uv pip install lancedb==0.26.0
# Install M-Flow
pip install m-flow>=0.3.1

Configure your .env file with the following variables:

HF_HUB_OFFLINE=1
LLM_PROVIDER="ollama"
LLM_MODEL="ollama/qwen2.5:14b-instruct-q8_0"
EMBEDDING_PROVIDER="ollama"
VECTOR_DB_PROVIDER=lancedb
GRAPH_DATABASE_PROVIDER=kuzu

M-Flow Memory Skill Data Schema & Taxonomy

The M-Flow Memory Skill organizes data across several layers to ensure high retrieval accuracy within the Openclaw Skills framework:

Layer Format Purpose
Wiki source | content | tags | timestamp Initial structured storage of raw query results
Compile Knowledge Points Distilled insights from session transcripts
M-Flow Vector/Graph Embeddings High-performance search index via LanceDB and Kuzu
Archive Collection Long-term cold storage of historical data

M-Flow Memory Skill Advanced Features

  • Multi-Agent Sharing: Allows multiple agents to interact with and update a shared memory pool via an MCP server.
  • Triple-Mode Search: Support for hybrid retrieval strategies combining BM25, Cone Graph vector search, and Knowledge Graph triplets.
  • Automated Distillation: Built-in logic to automatically extract core knowledge points from messy conversational transcripts.
  • Custom Knowledge Standards: Support for KNOWLEDGE-STANDARDS.md to define how the agent should categorize and validate new information.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*