Skip to main content

Multi-agent collaborative memory OS

Project description

MIT License Python 3.9+ MCP GitHub stars

MemALL

Multi-agent Memory OS — 本地优先的 AI Agent 持久化记忆系统

38 MCP tools · 10-layer memory lifecycle · Self-evolving pipeline · Knowledge graph · Multi-agent shared memory

English · 中文


✨ What is MemALL?

MemALL gives AI Agents memory that persists across sessions, tools, and agents. Install it, connect it to Claude Desktop / Cursor / Cline / any MCP client, and your agents stop starting from scratch every conversation.

pip install memall-os          # install (lightweight, no AI models)
pip install memall-os[full]    # install + viz + FAISS
pip install memall-os[rerank]  # install + cross-encoder reranking (HEAVY: ~1.8GB, requires PyTorch)
memall init                    # initialize
memall start                   # start services
# → MCP ready at http://127.0.0.1:9876/mcp
# → MCP ready at stdio (add to your mcp.json)

Then in any MCP client:

{
  "mcpServers": {
    "memall": {
      "command": "memall",
      "args": ["serve"]
    }
  }
}
# /capture "Decided to go open-source: MIT license, GitHub-first distribution"
# /retrieve "pricing decision"
# → finds the memory above, plus its context, timestamp, and relations

🔥 Why MemALL?

🧠 10-Layer Memory Lifecycle

Not just "store and retrieve". Every memory has a semantic level:

Level Meaning Example
P0/P1/P2 Planning "Ship v0.1.0 by June 23"
L1 Raw fact "User reported login bug"
L3 Business idea "MemPort — cross-platform memory migration"
L4 Decision "Use FastAPI, not Flask"
L5 Discussion Multi-agent debate with convergence
L6 Self-reflection "What went well/badly this session"
L9 Distillation "10k conversations → 200 knowledge nodes"
L10 System insight Cross-domain pattern detection

22-step auto pipeline enriches → classifies → time-slices → reflects → distills → integrates. No manual CRUD needed.

🔗 Knowledge Graph

Memories are connected by typed edges (refines, cites, contradicts, supersedes). Traverse from "bug #123" to "fix PR #456" to "retrospective L6 reflection" in one hop.

/capture "Bug #123: OOM on large datasets"
/connect 123 456 --relation "resolved_by"
/traverse 123
→ finds #456 (fix), #789 (regression test), #912 (L6 reflection)

🤝 Multi-Agent Shared Memory

Claude, opencode, Codex, WorkBuddy — all reading from and writing to the same memory base. Cross-agent queries are a single MCP call.

/fed_query "architecture decision last week" agent_name="claude"
→ returns cross-agent results with source attribution

🔄 Self-Evolving Pipeline

MemALL doesn't just store — it improves itself:

  1. L6 Reflection — auto-reviews work quality, identifies patterns, corrects mistakes
  2. L9 Distillation — compresses raw conversations into structured knowledge
  3. Forget & Adaptive — TTL-based decay, low-value cleanup, automatic re-indexing
  4. OODA Loop — Observe → Orient → Decide → Act, no human intervention

🏠 100% Local

SQLite + FTS5 + vector search. Zero cloud dependency. Your data stays on your machine.


🛠️ 38 MCP Tools

Category Tools
Memory CRUD capture, retrieve, update, smart_store, store_batch
Knowledge Graph connect, traverse, timeline
Search vector_search, FTS5 full-text search, hybrid_search (FTS5+vec0 RRF, optional cross-encoder[¹])
Session session_start, session_end, session_summary
Identity & Persona persona, persona_profile, identity, ask
Discussion & Decision discussion_create, discussion_respond, discussion_status, trace
Federation fed_query, fed_publish, fed_conflicts, fed_inject, fed_extract
Hub Sync hub_connect, hub_sync
Pipeline & Evolution run_pipeline, reflect_interact, forget, adaptive, index_rebuild
Security & Ops security, ops, gateway, db
Onboarding onboarding
Export/Import export, import, sync

🚀 Quick Start

# 1. Install
pip install memall-os

# 2. Initialize
memall init
memall start

# 3. Connect your MCP client
# Add to your mcp.json:
# {
#   "mcpServers": {
#     "memall": { "command": "memall", "args": ["serve"] }
#   }
# }

# 4. Start remembering
/capture "Project X: decided to use FastAPI, reason: async support"
/capture "Fixed OOM bug in NLP pipeline — root cause: vector dimension mismatch"
/retrieve "FastAPI decision"

Or clone from source:

git clone https://github.com/j19800/MemALL
cd memall
pip install -e .

📊 Why Not Competitors?

Feature MemALL Mem0 Letta Zep
Memory model 10 layers (P0-L10) user/session agent/memory-block session/summary
Knowledge graph ✅ Native + traversal
Self-evolving pipeline ✅ 22-step auto
Multi-agent shared ✅ Federation Same agent only
Decision tracking ✅ Arc lifecycle
Discussion convergence ✅ Multi-agent auto
Protocol MCP (native) REST API REST + gRPC REST API
Local-first ✅ SQLite ❌ Cloud PostgreSQL ❌ Cloud
Open source ✅ MIT ⚠️ Partial ⚠️ Partial

📁 Project Structure

src/memall/
├── cli/          # CLI (40+ commands)
├── core/         # SQLite / NLP / vector search
├── api/          # FastAPI REST (35 routes)
├── mcp/          # MCP adapter (38 tools)
├── pipeline/     # 22-step auto pipeline
├── graph/        # Knowledge graph
├── federation/   # Cross-device memory sync
├── plugins/      # Dashboard / export / scheduler
└── migrations/   # DB migrations

📝 Roadmap

  • v0.1.0 — Core MCP server, 38 tools, CLI, PyPI package
  • v0.2.0 — Web dashboard, user system, Pro tier gating
  • v0.3.0 — Cloud sync, team collaboration, API gateway

🤝 Contributing

PRs welcome! See CONTRIBUTING.md for guidelines.


📄 License

MIT License. See LICENSE for details.

[¹] Cross-encoder reranking requires pip install memall-os[rerank] (downloads PyTorch + ~560MB model on first use). Core search works without it using RRF fusion of FTS5 + vec0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memall_os-0.1.4.tar.gz (609.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memall_os-0.1.4-py3-none-any.whl (384.9 kB view details)

Uploaded Python 3

File details

Details for the file memall_os-0.1.4.tar.gz.

File metadata

  • Download URL: memall_os-0.1.4.tar.gz
  • Upload date:
  • Size: 609.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for memall_os-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ba89a8e2cb31220efd9951b6fcd260fd4603421d29bdc9369df5a782ec58d997
MD5 5c8a6f52c46ab0ae157dcccf05291444
BLAKE2b-256 7de1d7b1f73fd7912eab510218c9c6644a0afb28f9e359e88a00068e0e894409

See more details on using hashes here.

File details

Details for the file memall_os-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: memall_os-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 384.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for memall_os-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0994cadf5d36b586eecb640167f1c559e074d0a3719408a4157dec33d0ecb352
MD5 b5867edf5469c8a342bb62a3e61200be
BLAKE2b-256 8fda3b9409be5836de96c4987569b0d39d8ae3ce91db5c48bfea119f1ac1c2ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page