Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Minimem

FreeNot checked

๐Ÿง  AI Agent ็š„ไธญๅคฎ่ฎฐๅฟ†ๆœๅŠก โ€” L1โ†’L4ๅ››ๅฑ‚่ฎฐๅฟ†้‡‘ๅญ—ๅก” + Dream Engine + Karpathy Compile + MCPๅ่ฎฎ

GitHubEmbed

About

๐Ÿง  AI Agent ็š„ไธญๅคฎ่ฎฐๅฟ†ๆœๅŠก โ€” L1โ†’L4ๅ››ๅฑ‚่ฎฐๅฟ†้‡‘ๅญ—ๅก” + Dream Engine + Karpathy Compile + MCPๅ่ฎฎ

README

Status License Node TypeScript

๐Ÿง  MiniMem

A Self-Hosted Personal Memory System โ€” The Central Memory for AI Agents

MiniMem gives AI agents persistent, structured, and retrievable memory. Built for single-machine self-hosting (sqlite + 127.0.0.1 + single API token), it uses a L1โ†’L4 four-layer memory pyramid and a Dream Engine to automatically distill raw experiences into structured knowledge during nightly sleep cycles. Multi-tenant / JWT / domain isolation is deferred to v0.3+ โ€” see roadmap.


โœจ Features

  • ๐Ÿงฉ L1โ†’L4 Memory Pyramid โ€” From raw experiences to mental models, layered compression with increasing abstraction
  • ๐ŸŒ™ Dream Engine โ€” 4-phase nightly pipeline: Audit โ†’ Compile (Knowledge Compile) โ†’ Dream โ†’ Cleanup
  • ๐Ÿ“ Knowledge Compile โ€” LLM-driven knowledge synthesis: generates bi-directionally linked knowledge pages with version history
  • ๐Ÿ”— MCP Protocol โ€” Native Model Context Protocol support (stdio + Streamable HTTP)
  • ๐Ÿงญ Vector Retrieval โ€” In-memory HNSW index + FTS5 full-text search + conditional indexing
  • ๐Ÿ“ฆ Surface Files โ€” Agent-readable Markdown files (me/soul/work/social/life profiles)
  • ๐Ÿ’ก Inspiration Engine (experimental) โ€” Cross-domain memory collision for creative sparks
  • ๐Ÿ”„ Version Control โ€” Snapshots + branching + rollback for safe memory evolution
  • ๐ŸŒก๏ธ Temperature Decay โ€” Tiered compression with configurable decay models (linear/logarithmic/ebbinghaus)

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    MiniMem                           โ”‚
โ”‚                                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  L1     โ”‚โ†’โ”‚  L2      โ”‚โ†’โ”‚  L3      โ”‚โ†’โ”‚  L4  โ”‚ โ”‚
โ”‚  โ”‚  Experiences โ”‚  Facts  โ”‚  โ”‚ Observations/ โ”‚ Mentalโ”‚ โ”‚
โ”‚  โ”‚         โ”‚  โ”‚ (triples)โ”‚  โ”‚ Knowl.Pagesโ”‚  โ”‚Models โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚                                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚           Dream Engine (nightly)             โ”‚    โ”‚
โ”‚  โ”‚  P1: Audit โ†’ P2: Compile โ†’                  โ”‚    โ”‚
โ”‚  โ”‚  P3: Dream  โ†’ P4: Cleanup                   โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚                                                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ REST API โ”‚  โ”‚ MCP Srv  โ”‚  โ”‚ MiniMem Console  โ”‚  โ”‚
โ”‚  โ”‚ (Hono)   โ”‚  โ”‚ (stdio/  โ”‚  โ”‚ (React SPA)      โ”‚  โ”‚
โ”‚  โ”‚          โ”‚  โ”‚  HTTP)   โ”‚  โ”‚                  โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

  • Node.js >= 20.0.0
  • pnpm (recommended)

Install & Run

git clone https://github.com/lelin1997/minimem.git
cd minimem/minimem

# Install dependencies
pnpm install

# Configure
cp .env.example .env
# Edit .env with your LLM API key and JWT secret

# Build & start
pnpm build
pnpm start

Run Modes

# REST API mode (default, port 6677)
pnpm start

# MCP Server mode (stdio โ€” for Claude Desktop, etc.)
node dist/index.js --mcp

# MCP HTTP mode (port 6678)
MINIMEM_MCP_PORT=6678 node dist/index.js --mcp-http

Claude Desktop Integration

{
  "mcpServers": {
    "minimem": {
      "command": "node",
      "args": ["/path/to/minimem/dist/index.js", "--mcp"]
    }
  }
}

๐ŸŽฎ Console

MiniMem Console is a standalone web dashboard providing:

  • ๐Ÿ“Š Dashboard โ€” system overview & stats
  • ๐Ÿง  Memory Browser โ€” search, browse, edit memories
  • ๐Ÿ“„ Knowledge Pages โ€” view Knowledge Compile results
  • ๐Ÿ‘ค Owner Profile โ€” manage your agent's identity
  • ๐Ÿ”„ Pipeline Editor โ€” visual data pipeline orchestration
cd minimem-console
pnpm install
cp .env.example .env
pnpm dev

๐Ÿ“ Project Structure

minimem/
โ”œโ”€โ”€ minimem/                  # Core engine (31.5K lines)
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ core/             # Memory processing core
โ”‚   โ”‚   โ”œโ”€โ”€ gateway/          # REST API + MCP Server
โ”‚   โ”‚   โ”œโ”€โ”€ llm/              # LLM client (multi-model tiers)
โ”‚   โ”‚   โ”œโ”€โ”€ modules/dream/    # Dream Engine
โ”‚   โ”‚   โ”œโ”€โ”€ recall/           # Retrieval & ranking
โ”‚   โ”‚   โ”œโ”€โ”€ store/            # Database & indexes
โ”‚   โ”‚   โ”œโ”€โ”€ surface/          # Surface Files
โ”‚   โ”‚   โ””โ”€โ”€ version/          # Version control
โ”‚   โ””โ”€โ”€ tests/                # 44 test files
โ””โ”€โ”€ minimem-console/           # Web management console
    โ”œโ”€โ”€ src/                   # React frontend
    โ””โ”€โ”€ server/                # Console backend

๐Ÿงช Tests

cd minimem
pnpm test          # Run all tests
pnpm test:watch    # Watch mode
pnpm typecheck     # Type checking

๐Ÿ“ก API

MCP tools exposed via protocol: add_memory, search_memory, get_relevant_context, recall_about, list_memories, generate_daily_summary, trigger_dream, and more.


๐Ÿ“„ License

MIT ยฉ MiniMem Contributors


๐Ÿ™ Acknowledgements

  • Andrej Karpathy โ€” inspiration for LLM-driven knowledge compilation (Note: MiniMem's "Knowledge Compile" is an independent implementation inspired by Karpathy's LLM Wiki concept; not affiliated with or endorsed by Karpathy)
  • Hono โ€” lightweight web framework
  • Model Context Protocol โ€” AI agent interoperability standard

from github.com/lelin1997/minimem

Installing Minimem

This server has no published package โ€” it is built from source. Open the repository and follow its README.

โ–ธ github.com/lelin1997/minimem

FAQ

Is Minimem MCP free?

Yes, Minimem MCP is free โ€” one-click install via Unyly at no cost.

Does Minimem need an API key?

No, Minimem runs without API keys or environment variables.

Is Minimem hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Minimem in Claude Desktop, Claude Code or Cursor?

Open Minimem on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install โ€” the config is generated automatically, no JSON editing.

Related MCPs

Compare Minimem with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All ai MCPs