Self-hosted AI-powered second brain.
Capture everything. Organize nothing. Recall anything.
Quickstart • Features • Architecture • Messaging Bridge • Contributing
Mimir is an open-source, self-hosted personal knowledge agent that uses AI to automatically organize, connect, and resurface your information. Deploy it with a single docker compose up and start capturing from anywhere — Telegram, Mattermost, email, browser extension, file drops, voice memos, or API.
Named after Mímir, the Norse figure renowned for wisdom and memory.
The problem: Your knowledge is scattered across dozens of apps, chats, bookmarks, and notes. You save things and never find them again.
Mimir's answer: One place to throw everything. AI handles the rest — extracting entities and concepts, generating embeddings, discovering connections between ideas captured months apart, and resurfacing the right knowledge at the right moment. Not when you ask for it — before you know you need it.
- Zero-friction capture — Telegram, Mattermost, email, Chrome extension, file watch folder, voice, clipboard, REST API
- Autonomous processing — 7-stage pipeline: normalize, chunk, extract, embed, link, synthesize, index
- Semantic search — Hybrid search combining ChromaDB vector similarity with SQLite FTS5 and knowledge graph traversal
- RAG chat — Ask questions about your knowledge base and get LLM-generated answers grounded in your own notes
- Knowledge graph — Automatic connection discovery between related captures with force-directed visualization
- Proactive resurfacing — Daily briefs, spaced repetition, concept clustering, entity recurrence, follow-up detection
- Taxonomy evolution — AI reorganizes your concept hierarchy weekly as your knowledge grows
- Multi-provider AI — Ollama (local/free), Anthropic, OpenAI, or Google — configured via harness presets
- Messaging bridge — Bidirectional Telegram and Mattermost integration for capture, search, ask, and notifications
- Self-hosted & private — Your data stays on your hardware. No cloud dependency required.
- Docker-first — Full stack runs with
make build. No manual dependency management.
- Docker and Docker Compose v2+
- 8 GB+ RAM (for Ollama with gemma4)
- (Optional) API key for Anthropic/OpenAI/Google if using cloud AI presets
git clone https://github.com/mimir-foundation/mimir.git
cd mimir
cp .env.example .envEdit .env with your preferences:
# AI Engine — choose a preset
HARNESS_PRESET=local # local | hybrid | cloud | budget
# Models
LLM_MODEL=gemma4
EMBEDDING_MODEL=nomic-embed-text
# Security (optional — leave blank to disable auth)
API_KEY=
# Daily brief delivery time
BRIEF_TIME=07:00
# Cloud AI keys (only needed for hybrid/cloud presets)
ANTHROPIC_API_KEY=
OPENAI_API_KEY=
GOOGLE_API_KEY=make buildNavigate to localhost:3081 and start capturing.
| Service | Port | Purpose |
|---|---|---|
| Frontend | localhost:3081 | Web dashboard |
| Backend | localhost:3080 | FastAPI server |
| Ollama | localhost:11435 | Local LLM inference |
On first boot, Ollama pulls gemma4 and nomic-embed-text (~5 GB). Subsequent starts are instant.
cd tui && pip install -e . && mimir setupThe wizard walks through Ollama connection, AI presets, data paths, capture sources, and messaging bridge configuration in five steps.
mimir/
├── backend/ Python 3.12+, FastAPI
│ └── src/
│ ├── capture/ REST endpoints, IMAP poller, file watcher
│ ├── processing/ 7-stage AI pipeline
│ ├── knowledge/ SQLite + ChromaDB + document store
│ ├── search/ Hybrid search engine + Ask mode (RAG)
│ ├── agent/ Briefs, resurface, taxonomy, signals, notifications
│ ├── harness/ Provider-agnostic AI routing layer
│ └── bridge/ Telegram + Mattermost adapters
├── frontend/ React 19, TypeScript, Vite, Tailwind CSS
├── tui/ Textual terminal app + setup wizard
├── extensions/chrome/ Manifest V3 browser extension
├── docker-compose.yml
└── Makefile
| Layer | Technology |
|---|---|
| Backend | Python 3.12+, FastAPI, APScheduler |
| Frontend | React 19, TypeScript, Vite, Tailwind CSS |
| LLM | Ollama (gemma4 default, swappable) |
| Embeddings | nomic-embed-text via Ollama (768-dim) |
| Vector DB | ChromaDB (embedded mode) |
| Relational DB | SQLite + FTS5 |
| TUI | Textual |
| Deployment | Docker Compose |
Every capture flows through a 7-stage pipeline, each stage idempotent and independently re-runnable:
Capture → NORMALIZE → CHUNK → EXTRACT → EMBED → LINK → SYNTHESIZE → INDEX
│ │ │ │ │ │
clean & 400-tok entities 768-d find generate
structure windows concepts vector related synthesis
50-tok key claims notes & title
overlap content type
The agent layer runs autonomously on top of the knowledge store:
| Job | Schedule | What it does |
|---|---|---|
| Daily Brief | Configurable (default 07:00) | Morning digest: recent captures, new connections, resurface items, dangling threads, this-day-last-year |
| Deep Scan | Every 6 hours | Discover connections between notes via embedding similarity + LLM verification |
| Resurface | Every 4 hours | Five triggers: strong connections, concept clusters, entity recurrence, spaced repetition, follow-ups |
| Taxonomy | Weekly (Sunday 04:00) | Merge, prune, and reorganize the auto-generated concept hierarchy |
| Signal Decay | Continuous | 7-day half-life on interest signals from searches, views, and stars |
- SQLite over Postgres — single-file, zero-config, sufficient for single-user scale
- ChromaDB embedded — no separate vector DB server process
- APScheduler in-process — avoids Redis/RabbitMQ dependency
- Agent-driven taxonomy — concepts are auto-generated and evolved, not user-defined
- Local-first — no cloud dependency required; cloud providers are optional via harness presets
Mimir integrates bidirectionally with Telegram and Mattermost. Send messages to capture notes, search your knowledge base, ask questions, and receive proactive notifications — all from your chat app.
- Create a bot via @BotFather
- Set
TELEGRAM_BOT_TOKENandTELEGRAM_USER_IDin.env - Start chatting with your bot
| Command | Action |
|---|---|
| any text | Capture as note |
| any URL | Capture and fetch page |
| photo / audio / file | Capture media (audio is transcribed) |
/search <query> |
Hybrid search |
/ask <question> |
RAG Q&A with citations |
/brief |
Get today's daily brief |
/recent |
Last 5 captures |
/star |
Star last captured note |
/tag <name> |
Tag last captured note |
/status |
System health |
Questions ending with ? are auto-detected as Ask queries.
When configured, Mimir proactively sends:
- Daily briefs at your configured time
- Connection alerts when strong new relationships are found
- Resurface items for high-priority knowledge
| Method | Description |
|---|---|
| Web Dashboard | Persistent capture bar at the top of every page |
| Mobile | Dedicated capture page at /capture |
| Telegram | Text, URLs, photos, voice notes, documents |
| Mattermost | Channel messages with slash commands |
| Chrome Extension | Popup capture, context menu, text selection highlights |
| IMAP polling — forward emails directly to Mimir | |
| File Drop | Drop into the inbox folder — auto-ingested via watchdog |
| Voice | Upload audio for transcription and capture |
| REST API | 8 endpoints: /note, /url, /file, /voice, /clipboard, /highlight, /email, /batch |
| Preset | Embeddings | Reasoning | Cost |
|---|---|---|---|
| local | Ollama | Ollama | Free |
| hybrid | Ollama | Cloud API | Low |
| cloud | Cloud API | Cloud API | Higher |
| budget | Ollama | Cheap cloud model | Minimal |
Switch presets at any time from Settings or via PUT /api/harness/presets/{name}/apply.
Full Swagger documentation at localhost:3080/docs when running.
POST /api/capture/note Capture text
POST /api/capture/url Capture URL (auto-fetches)
POST /api/capture/file Upload file
POST /api/capture/voice Upload audio (transcribed)
GET /api/search?q=... Hybrid search
GET /api/search?q=...&mode=ask Ask a question (RAG)
GET /api/notes Browse notes
GET /api/agent/brief Daily brief
GET /api/graph Knowledge graph
GET /api/bridge/status Messaging bridge health
GET /api/export/json Full JSON backup
GET /api/export/markdown Markdown zip archive
# Install all dependencies
make install
# Start frontend dev server (HMR on :3081, proxies to :8000)
make dev-frontend
# Start backend dev server (auto-reload on :8000)
make dev-backend
# Run tests
make test
# Tail logs (Docker)
make logs- FastAPI backend + SQLite + ChromaDB
- 7-stage processing pipeline
- Hybrid search (vector + FTS + graph) with reciprocal rank fusion
- Ask mode — RAG Q&A with citations
- Agent runtime — daily briefs, connection discovery, resurface engine
- Interest signal tracking with decay
- Taxonomy evolution (weekly merge/prune)
- Webhook notifications (Mattermost, Slack, Discord, ntfy)
- Chrome extension (Manifest V3)
- IMAP email capture
- File watcher (watchdog)
- Voice capture with transcription
- Knowledge graph visualization
- Entity and concept detail pages
- Export (JSON + Markdown)
- React dashboard with Tailwind
- Textual TUI + setup wizard
- Docker Compose deployment
- Telegram messaging bridge
- Mattermost messaging bridge
- MCP server — expose knowledge base to Claude Code and other MCP clients
- WhatsApp capture via Baileys
- Discord capture via Discord.js
- Calendar integration (Google Calendar, CalDAV, ICS)
- Mobile app
- Helm chart for Kubernetes
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Fork the repo
- Create a feature branch (
feature/your-feature) - Make your changes
- Open a PR against
main
- GitHub Discussions — Questions, ideas, show & tell
- Issues — Bug reports and feature requests
MIT — use it, fork it, self-host it, build on it.
Built by Mimir Foundation — because your knowledge deserves better than 47 open browser tabs.
