A private, local-first personal knowledge graph and AI companion. Feed it what you read, write, think, and capture. It weaves everything into a living graph, learns how you think, and reasons in your voice β with nothing ever leaving your device.
Postgres + pgvector Β· Drizzle Β· local MiniLM embeddings Β· Ollama (or any OpenAI-compatible LLM) Β· Tailwind v4 Β· MCP
Your knowledge, connected β the graph view (shown with a demo brain).
Note
This repo is the shell, not a brain. You clone it and it becomes yours β your notes, your graph, your voice β all stored and reasoned over on your own hardware. There is no hosted version, no account, no telemetry. The maintainer's brain stays on the maintainer's Mac.
Note apps store text. MNEMO builds a mind.
- π§ A real knowledge graph, not a pile of notes. Everything you feed it is distilled into typed atoms β beliefs, goals, traits, people, places, ideas β connected by typed, weighted, reasoned edges (
supports,contradicts,influenced_byβ¦). It reasons across your knowledge, not just searches it. - π Private by architecture. Embeddings run locally. The LLM runs locally (Ollama). Private notes are encrypted at rest. When the model is on your machine, MNEMO can safely learn from your most personal material β because it physically cannot leave.
- πͺ It learns how you think. A self-model ("who you are" + "how you reason") is rebuilt nightly from your own words, so the agent answers in your voice and weighs trade-offs the way you do.
- π It optimizes itself while you sleep. Nightly it de-duplicates, re-weights what matters, surfaces contradictions, and sharpens its model of you. The graph gets cleaner as it grows, not noisier.
- π Free to run forever. Local embeddings + a local model = no per-token bill, no rate limits, no quota. Bring a cloud key only if you want a bigger model.
- π€² Senses & hands. Connect Gmail, Calendar, Notion, GitHub. It reads freely; anything it wants to do is proposed for your one-tap approval β never done silently.
Ask anything β it answers in your voice, grounded in your own beliefs (owner-asserted outranks inferred). The mark is an βMβ drawn as a memory-graph: nodes, edges, and a hub β the self everything connects to.
| π§© Knowledge graph | 20 node types, 16 edge types, hybrid search (keyword + semantic, re-ranked by salience & recency) |
| π¬ Agent companion | A tool-using agent that reasons step-by-step, grounds every claim in your graph, and verifies its own draft before answering |
| β° Automations | Owner-defined recurring tasks ("every morning, research X and tie it to my notes") that run on schedule and land in your inbox |
| π¬ Deep research | An async, multi-round investigation: grounds in what you know β plans sub-questions β gathers the web β a cited brief tied back to your graph |
| πΈ Vision | Drop in photos β it understands them, links the people/places, and recognises recurring faces across your library |
| ποΈ Private voice | On-device speech-to-text (whisper.cpp) and text-to-speech read-aloud β voice in and out, nothing hits a cloud service |
| π₯ Ingest anything | Notes, articles, PDFs, Readwise, Pocket, Notion, X archive, browser history, WhatsApp/Takeout exports β distilled, signal kept, noise dropped |
| π Connectors | Gmail Β· Calendar Β· Notion Β· GitHub β read freely, act only with approval |
| π Self-optimizing | Nightly consolidation, contradiction detection, salience reconciliation, persona rebuild |
| π Obsidian / markdown vault | Two-way folder sync: your notes ingest into the brain; the graph exports as linked markdown ([[wikilinks]]) you can browse in Obsidian |
| π©Ί Health dashboard | Live system panel (DB, model, worker, queues, backups, disk) with a status dot in the top bar and one-click fixes |
| π± Everywhere | Installable PWA, offline graph + search, Siri Shortcuts, MCP server for any MCP client |
| πΎ Yours to keep | One-command encrypted backups + restore. Your brain is never locked in |
capture / connectors / photos / voice
β
βΌ
ββββββββββββββββββββββββββββββββ
β INGEST acquire β chunk β β local MiniLM embeddings (384-d)
β embed β extract β link β typed atoms + reasoned edges
ββββββββββββββββ¬ββββββββββββββββ
βΌ
ββββββββββββββββββββββ
β KNOWLEDGE GRAPH β Postgres + pgvector + pg_trgm
β nodes βββedgesβββΊ β hybrid search, versioned beliefs
βββββββββββ¦βββββββββββ
βββββββββββ΄βββββββββββ
βΌ βΌ
NIGHTLY SYNTHESIS AGENT (reason β tools β reflect β answer)
dedupe Β· contradictions grounded in YOU, in your voice
salience Β· persona reads free Β· acts on approval
β β
βββββββββββ¬βββββββββββ
βΌ
Ask Β· Graph Β· Digest Β· Siri Β· MCP
The data model and design rationale live in docs/PLAN.md.
Prerequisites: Node β₯ 20 Β· pnpm (corepack enable) Β· Postgres 16 (+ pgvector) Β· Ollama for the local model.
git clone https://github.com/0-uddeshya-0/mnemo.git
cd mnemo
pnpm install
# 1) configure
cp .env.example .env
# set MNEMOSYNE_PASSWORD and a 32+ char SESSION_SECRET
# point DATABASE_URL at your Postgres
# 2) local model (private + free, no keys)
ollama pull qwen2.5:7b # text / reasoning
ollama pull qwen2.5vl:7b # vision (optional)
# in .env: OPENROUTER_BASE_URL=http://localhost:11434/v1
# LLM_MODEL=qwen2.5:7b
# 3) database
pnpm db:migrate # extensions, tables, HNSW + full-text indexes
pnpm db:seed # a small demo brain so the UI isn't empty
# 4) run
pnpm --filter @mnemosyne/web dev # β http://localhost:3000
pnpm --filter @mnemosyne/web worker # ingest + nightly synthesis + digestOpen http://localhost:3000, set your password, and start feeding your mind.
Full setup (production launchd services, Tailscale access, Siri, connectors) is in SETUP.md.
Prefer a cloud model? Leave
OPENROUTER_BASE_URLat OpenRouter and setOPENROUTER_API_KEYβ any OpenAI-compatible endpoint works. Private content stays walled off automatically whenever a cloud model is active.
| Layer | Guarantee |
|---|---|
| Embeddings | Computed locally (transformers.js). Never sent anywhere. |
| LLM | Runs on your machine via Ollama by default. |
| Private notes | Encrypted at rest (AES-256-GCM, key derived from your password). |
| Cloud opt-in | If you switch to a cloud model, private content is automatically excluded. |
| Backups | Stored locally, 0700, encrypted bodies preserved. |
| Telemetry | None. There is no server to phone home to. |
- Face-embedding recognition (beyond appearance clustering)
- Richer in-app graph editing & merge review
- Native iOS app via App Intents
- Pluggable model profiles (fast interactive vs. deep nightly)
- More connectors
Next.js 15 (App Router, RSC, server actions) Β· React 19 Β· TypeScript (strict) Β· Postgres 16 + pgvector + pg_trgm Β· Drizzle ORM Β· pg-boss queues Β· transformers.js (local MiniLM) Β· Ollama / any OpenAI-compatible LLM Β· whisper.cpp Β· Tailwind v4 + shadcn/ui Β· Model Context Protocol SDK.
Issues and PRs are welcome. This is a personal-AI shell meant to be forked and made your own β fork it, make it yours, and send back anything that would help the next person.
MIT β do what you like, keep the copyright notice. Your data is yours; this code is everyone's.
Built to remember, so you're free to think.