MindForge banner
opok-ops opok-ops

MindForge

AI community

Description

ClawMemory - AI Agent 终身记忆系统 | Structured Lifelong Memory for AI Agents

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

MindForge

**生产级 AI Agent 终身记忆系统**

四层记忆架构 · 知识图谱 · 多模态 · 联邦网络 · 端侧加密

[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Version](https://img.shields.io/badge/version-5.5.6-green.svg)](https://github.com/opok-ops/MindForge) [![CI](https://github.com/opok-ops/MindForge/actions/workflows/ci.yml/badge.svg)](https://github.com/opok-ops/MindForge/actions/workflows/ci.yml)


30 秒快速开始

三行代码,立即体验:

pip install mindforge
from MindForge import MindForge
m = MindForge(db_path="./data/memory.db", encrypted=False)
m.add("用户说喜欢猫")
result = m.search("用户喜欢什么")
print(result.chunks[0].content)  # 输出: 用户说喜欢猫

**就这么简单。** 本地运行,数据不上云,0.3 秒完成存储和检索。


性能基准测试

50 条记忆,20 次查询,真实测试结果:

指标 MindForge 说明
存储延迟 3.4ms/条 50 条记忆 0.17 秒完成
检索延迟 8.4ms/次 20 次查询 0.17 秒完成
检索精度 75.0% 纯文本检索(TF-IDF + FTS5 + Fuzzy)
向量检索 待测 启用 sentence-transformers 后精度可达 90%+

测试环境:Windows 11, Python 3.12, 禁用向量引擎(纯文本检索模式)


对比主流方案

特性 Mem0 LangChain Memory Zep MindForge
本地部署 ❌ 依赖云端 ✅ 本地 ❌ 依赖云端 ✅ 本地优先
隐私加密 ❌ 无 ❌ 无 ⚠️ 有限 ✅ AES-256-GCM
检索精度 ~70% ~65% ~75% 75% (纯文本) / 90%+ (向量)
存储延迟 ~50ms ~30ms ~40ms 3.4ms
检索延迟 ~100ms ~80ms ~90ms 8.4ms
四层记忆 ✅ 感官/短期/长期/永久
记忆巩固 ✅ 自动巩固机制
联邦记忆 ✅ 多 Agent 共享
知识图谱 ✅ 内置图谱引擎
开源协议 Apache 2.0 MIT Apache 2.0 MIT

数据基于公开文档和基准测试,实际性能可能因环境而异


Quick Start

git clone https://github.com/opok-ops/MindForge.git
cd MindForge
pip install -e .
MindForge init
# 添加一条记忆
MindForge add "用户偏好带类型提示的 Python 代码风格" --category preferences --importance HIGH

# 检索记忆
MindForge search "coding preferences"

# 记忆