Lightweight long-term memory system for local/edge AI agents
Reason this release was yanked:
rename to FlockMem
Project description
MiniMem ๐ง
Lightweight local-first memory system for AI agents โจ
English | ็ฎไฝไธญๆ
MiniMem is a lightweight, local-first long-term memory system designed for AI agents. It is also built as a memory infrastructure layer for multi-agent collaboration. With edge deployment in mind, it runs with a minimal memory footprint under 50MB, making it suitable for resource-constrained environments ๐ฅ๏ธ
Why MiniMem? ๐ก
- ๐งฑ Multi-Agent Memory Infrastructure - One shared memory substrate across agents, runtimes, and workflows
- ๐ Local-first - No cloud dependencies, runs entirely on your device
- ๐ Hybrid Retrieval - Text + Vector + Graph search with citation traces
- ๐ง Structured + Episodic Memory - Entities, relationships, and conversation memories in one system
- โก Lightweight - Under 50MB memory usage, suitable for edge devices
- ๐ Integration-ready - REST API + MCP bridge + OpenClaw plugin
- ๐ One-click Install - Get started in seconds
Key Positioning: Memory Infrastructure for Multi-Agent Collaboration
MiniMem is not just a memory store for a single assistant. It provides:
- Shared memory infrastructure for multiple agents via REST, MCP, and plugin bridges
- Controlled collaboration boundaries with role-based, shared-group, and per-user memory strategies
- Retrieval traces and citations for auditability and easier debugging
- Local-first deployment with predictable cost, data ownership, and operational simplicity
Quick Start โก
One-click Install
pip:
pip install minimem-agent
minimem
npm:
npm install openclaw-plugin-minimem
openclaw plugin:
openclaw plugins install openclaw-plugin-minimem
openclaw plugins enable minimem-memory
Local install (kept):
| Platform | Command |
|---|---|
| ๐ช Windows | powershell -ExecutionPolicy Bypass -File scripts/install.ps1 -RunAfterInstall |
| ๐ง Linux | bash scripts/install.sh --run |
| ๐ macOS | bash scripts/install.sh --run |
Or use the launcher:
# Windows
start_minimem.bat
# Linux/macOS
bash scripts/start.sh
Manual Install
pip install -e .
minimem
Access the UI ๐
Open your browser:
http://127.0.0.1:20195/ui
๐ Default Credentials:
admin/admin123
Features ๐ฏ
| Feature | Description |
|---|---|
| ๐ Memory Storage | Store and manage conversation memories |
| ๐ Semantic Search | Find relevant memories using vector similarity |
| ๐ธ๏ธ Graph Search | Explore entity relationships in knowledge graph |
| ๐ฌ Chat with Memory | Context-aware conversations with retrieval traces |
| โ๏ธ Runtime Config | Change providers and settings on-the-fly |
API Overview ๐ก
For complete API documentation, see API Reference
# Health check
GET /health
# Store memory
POST /api/v1/memories
# Search memories
GET /api/v1/memories/search
# Chat with context
POST /api/v1/chat/simple
# Graph queries
GET /api/v1/graph/search
GET /api/v1/graph/neighbors
MCP Integration ๐
MiniMem now includes a standalone MCP bridge server for cross-agent integration:
- Server path:
integrations/minimem-mcp/server.py - Skill path:
skills/minimem-mcp-integration
Run the MCP bridge:
python skills/minimem-mcp-integration/scripts/run_minimem_mcp.py
Generate a client config snippet:
python skills/minimem-mcp-integration/scripts/generate_mcp_config.py
Run MCP integration test:
pytest -q tests/test_minimem_mcp_server.py
Package the MCP skill as a distributable artifact:
python C:/Users/user/.agents/skills/skill-creator/scripts/package_skill.py skills/minimem-mcp-integration dist
Packaged artifact:
dist/minimem-mcp-integration.skill
Environment variables (optional):
MINIMEM_BASE_URL(default:http://127.0.0.1:20195)MINIMEM_USER_IDMINIMEM_GROUP_IDMINIMEM_BEARER_TOKENorMINIMEM_BASIC_USER+MINIMEM_BASIC_PASSWORD
OpenClaw Plugin Integration
MiniMem also provides a lightweight OpenClaw plugin bridge:
- Plugin path:
integrations/openclaw-plugin - Plugin manifest:
integrations/openclaw-plugin/openclaw.plugin.json - Plugin doc:
integrations/openclaw-plugin/README.md - Policy template:
integrations/openclaw-plugin/examples/AGENTS.memory-policy.md
Core capabilities:
- write dialogue / bot profile / context compression into MiniMem
- retrieve memory by strategy (
keyword/vector/hybrid/rrf/agentic) - return
context_for_agentfor prompt injection - optional auto capture (
agent_end) and auto inject (before_agent_start) - role-based / shared / per-user group strategies
One-command install:
powershell -ExecutionPolicy Bypass -File integrations/openclaw-plugin/install.ps1
bash integrations/openclaw-plugin/install.sh
Or install distributed plugin package:
openclaw plugins install openclaw-plugin-minimem
openclaw plugins enable minimem-memory
Advanced entry example:
{
"path": "C:/MiniMem-main/MiniMem/integrations/openclaw-plugin",
"enabled": true,
"config": {
"baseUrl": "http://127.0.0.1:20195",
"groupStrategy": "per_role",
"sharedGroupId": "shared:team",
"autoSenderFromAgent": true,
"autoInjectOnStart": true,
"autoCaptureOnEnd": true
}
}
Architecture ๐๏ธ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MiniMem UI โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ REST API โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโค
โ Retrieval โ Extraction โ
โ (Fusion) โ (Atomic Facts) โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโค
โ Vector DB โ Graph Store โ
โ (LanceDB) โ (Local Persistent) โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโค
โ SQLite (Metadata) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Memory Tiering (L0 -> L2)
MiniMem uses progressive memory tiers to balance simplicity, recall quality, and retrieval performance:
| Tier | Name | Core Storage | Retrieval Role |
|---|---|---|---|
L0 |
Plain Text | SQLite (episodic_memory) |
Full-fidelity source of truth, keyword/metadata recall |
L0.5 |
Vector-Text (Hot) | Local vector cache (jsonl + snapshot) |
Fast local semantic recall and restart-safe warm cache |
L1 |
Vector (Persistent) | LanceDB (memory_vector_index) |
ANN-style semantic retrieval for higher-importance memories |
L2 |
Graph | Local graph triples store | Structured relation recall and graph expansion |
Retrieval Flow
- Query enters policy/selector layer.
- Keyword + vector recall run in hybrid mode (
L0+L0.5+L1). - Graph evidence from
L2is merged when enabled. - Final hits are reranked and rendered with query-aware citation snippets.
Configuration โ๏ธ
Set environment variables to configure providers:
# Chat provider
LITE_CHAT_PROVIDER=openai
LITE_CHAT_MODEL=gpt-4o-mini
# Embedding provider
LITE_EMBEDDING_PROVIDER=openai
LITE_EMBEDDING_MODEL=text-embedding-3-small
# Graph module (optional)
LITE_GRAPH_ENABLED=true
# Retrieval profile
LITE_RETRIEVAL_PROFILE=agentic
# Hybrid vector persistence (partial to LanceDB)
LITE_VECTOR_LANCEDB_ENABLED=true
LITE_VECTOR_LANCEDB_MIN_IMPORTANCE=0.72
# Admin protection for sensitive config APIs
LITE_ADMIN_TOKEN=change-me
LITE_ADMIN_ALLOW_LOCALHOST=true
# Retrieval latency/recall tuning (edge-side)
LITE_SEARCH_BUDGET_FACTOR=4
LITE_SEARCH_MIN_PROBE_K=12
LITE_KEYWORD_CONFIDENT_BEST_SCORE=9.0
LITE_KEYWORD_CONFIDENT_KTH_SCORE=2.8
LITE_SEMANTIC_VECTOR_BUDGET_CAP=32
LITE_SEMANTIC_KEYWORD_BUDGET_CAP=16
LITE_QUERY_EMBED_CACHE_SIZE=256
LITE_QUERY_EMBED_CACHE_TTL_SEC=900
- Sensitive endpoints (
/api/v1/config/raw,/api/v1/model-config*) acceptAuthorization: Bearer <LITE_ADMIN_TOKEN>orX-API-Key. - When
LITE_ADMIN_TOKENis empty, localhost access is allowed by default (LITE_ADMIN_ALLOW_LOCALHOST=true).
Default local storage location (when LITE_DATA_DIR is not set):
- Windows:
%LOCALAPPDATA%\\MiniMem - Linux/macOS:
$XDG_DATA_HOME/minimemor~/.local/share/minimem
Tech Stack ๐ ๏ธ
- FastAPI - Modern async web framework
- SQLite - Local structured data
- LanceDB - High-performance vector database
- Local Graph Store - Persistent triple storage and graph retrieval
Acknowledgments ๐
MiniMem builds on the shoulders of giants โค๏ธ
- EverMemOs - Original inspiration for agent memory systems
- LanceDB - Developer-friendly vector database
- SQLite - The most used database in the world
License ๐
MIT License - see LICENSE for details.
Made with โค๏ธ for AI agents everywhere ๐ค
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minimem_agent-0.1.3.tar.gz.
File metadata
- Download URL: minimem_agent-0.1.3.tar.gz
- Upload date:
- Size: 149.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc934bc4a253d6e2022708413879e73d4b44dcea633158922443cb9c6a18e004
|
|
| MD5 |
be9441238e71ebe909e1e560bb186caa
|
|
| BLAKE2b-256 |
90297abb6540f883f904c5c6a6f3e8ef5674417182304a47a91c46527ff5b8bb
|
File details
Details for the file minimem_agent-0.1.3-py3-none-any.whl.
File metadata
- Download URL: minimem_agent-0.1.3-py3-none-any.whl
- Upload date:
- Size: 139.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43cd64df12b64b52fde0ce9a1624a3c727329e3c3491d6fb8d8d313d722d9d1e
|
|
| MD5 |
e823573120cb53bf4ef713aff2b2dd5d
|
|
| BLAKE2b-256 |
1040002320a668da6b1e7cb9a1b41538638a19b0b6e773cd2cadb497c5ba021a
|