Skip to content

RyanWillie/mimir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mimir Logo

Mimir – Local-First, Zero-Knowledge AI Memory Vault

Rust Security Audit License: Apache 2.0

Privacy-first memory layer for AI applications – Remember across sessions without compromising your data.

Mimir provides developers and end-users with a privacy-first memory layer that lets any LLM application remember across sessions without handing raw data to third parties.


πŸ“‘ Table of Contents


🎯 Design Principles

  • 🏠 Local-first – Runs entirely on user hardware; offline by default
  • πŸ” Zero-knowledge cloud – Optional encrypted sync; server cannot decrypt
  • βœ‹ Fine-grained consent – Users classify memories and control app access
  • πŸ” Open-source & audited – Apache-2.0 core; public CI and security reviews

πŸš€ Quick Start

Installation

# macOS
brew install mimir/tap/mimir

# Linux/Windows (cargo required)
cargo install mimir

# From source
git clone https://github.com/your-org/mimir
cd mimir
cargo build --release

Initialize & Start

# Initialize vault
mimir init

# Start daemon
mimir start &

# Check status
mimir status

Usage Examples

REST API (MCP)

curl -X POST http://localhost:8100/memories \
  -H "Content-Type: application/json" \
  -d '{"content": "Meeting with Alice at 3pm", "class": "work"}'

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€ Chat / Agent ──────┐    JSON-RPC/MCP     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Any LLM client        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚      mimir   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚   (Rust)     β”‚
          β–² retrieve context                        β”œβ”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
          β”‚                                        β”‚    β”‚         β”‚
          β–Ό write turns                          policy vault     β”‚
               IPC / gRPC                              β”‚          β”‚
                                                       β–Ό          β–Ό
                                           SQLCipher + HNSW + KV

Core Components

Component Description Key Technologies
mimir MCP server daemon axum, tokio, JSON-RPC
Vector Store HNSW similarity search hnswlib-rs, 768-D embeddings
Database Encrypted SQLite SQLCipher, metadata + graph
Guardrails PII detection & classification TinyBERT-ONNX, presidio-rs
Compression Memory summarization llama_cpp_rs, token limits
SDK Language bindings PyO3, napi-rs, wasm-bindgen
Tray UI Desktop management Tauri, permission controls

πŸ”’ Security & Privacy

Threat Mitigation
Data breach Client-side XChaCha20; server never sees keys
Rogue app access ACL filters + per-class encryption
Model inversion PII redaction before LLM processing
Data retention TTL jobs delete/summarize aged memories

Memory Classification

Memories are automatically classified and encrypted per-class:

  • personal – Personal conversations, preferences
  • work – Professional context, meetings
  • health – Medical information, allergies
  • financial – Payment info, financial context
  • custom – User-defined categories

Access control is enforced at retrieval time based on app permissions.

πŸ› οΈ Development

Prerequisites

  • Rust 1.75+ with cargo
  • SQLCipher development libraries
  • ONNX Runtime (for guardrails)

Building

# Full workspace build
cargo build --workspace

# Individual components
cargo build -p mimir
cargo build -p mimir-cli

# Release build
cargo build --release --workspace

Testing

# Unit tests
cargo test --workspace

# Integration tests
cargo test --test integration

# Benchmarks
cargo bench

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

οΏ½οΏ½ Roadmap

  • v0.1.0 - Core daemon with basic MCP server (Current)
  • v0.2.0 - Vector store and embedding pipeline
  • v0.3.0 - Guardrails and PII detection
  • v0.4.0 - Tray UI and access control
  • v0.5.0 - Language bindings (Python, Node, WASM)
  • v1.0.0 - Production release with encryption

See ROADMAP.md for detailed timeline.

πŸ“„ License

  • Core components (daemon, SDK, guardrails): Apache License 2.0
  • UI components (tray widget): AGPL-3.0 to keep derivative UIs open-source

graph TD A["User Conversations"] --> B["Ingest Text Tool"] B --> C["Text Preprocessing"] C --> D["Gemma3 1B
Content Extractor"] D --> E["Raw Memory Candidates"] E --> F["Gemma3 1B
Summarizer"] F --> G["Summarized Memories"] G --> H["Similarity Check
(Vector Store)"] H --> I{"Duplicate
Detection"} I -->|"New"| J["Direct Storage"] I -->|"Similar"| K["Gemma3 1B
Conflict Resolver"] K --> L{"Resolution
Decision"} L -->|"Merge"| M["Update Existing"] L -->|"Replace"| N["Replace Existing"] L -->|"Keep Both"| O["Store as New"]

P["Add Memories Tool<br/>(Deliberate)"] --> Q["Manual Memory Input"]
Q --> F

J --> R["Final Storage<br/>(Database + Vector)"]
M --> R
N --> R
O --> R

R --> S["Memory Vault"]

style D fill:#e1f5fe
style F fill:#e1f5fe
style K fill:#e1f5fe
style S fill:#c8e6c9W

🀝 Community

πŸ™ Acknowledgments

  • Vector search powered by HNSW
  • Built with love using Rust πŸ¦€

"The best way to predict the future is to invent it, but the best way to remember it is to own it."

πŸ–ΌοΈ Screenshots / Demo


πŸ“¬ Contact / Support

About

Mimir: a local-first, zero-knowledge AI memory vault

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors