Content
<div align="center">
# Lemory
### Your memory should belong to you.
**Not someone else's database, but your own markdown files.**
<sub>Your memory should belong to you · **[English README](README.en.md)**</sub>
[](https://github.com/jwgo/lemory/actions)
[](LICENSE)
[](pyproject.toml)
[](BENCHMARKS.md)
[](benchmarks/data/kormapleqa/README.md)
<img src="docs/assets/demo1_korean.gif" alt="Actual Naver Wiki 1,469 note vault with Korean questions answered in 0.1 seconds and typos automatically corrected" width="840">
<sub>Not a mockup. Actual Naver Wiki 1,469 documents (about 42,000 chunks) vault with Korean questions answered in 0.1 seconds and typos automatically corrected. Can be reproduced directly at [`benchmarks/`](benchmarks/).</sub>
</div>
---
**Lemory is a local memory middleware for your markdown notes.** It sits between your notes and your AI (Claude Desktop, Claude Code, Cursor, or custom scripts), allowing your AI to recall what you've written and keeping your memories as your own markdown files.
- **AI recalls memories.** A hybrid search combining semantic search, keyword search optimized for Korean, and `[[wikilink]]` graph. All competing products were tested under the same conditions, and losing items are publicly disclosed.
- **AI saves memories.** Decisions and facts are stored as regular `.md` notes in your vault. Duplicates are marked, and related memories are connected with wikilinks. Visible in Obsidian, version-controlled with Git, and can be deleted with a single `rm` command. No dedicated repository, export button, or migration cost.
- **Everything is transparent.** The dashboard shows all queries, AI-generated notes (with a single click to revert), and client usage. All stored in a single SQLite file on your computer.
> **Nothing is forced through Lemory.** Your vault is just a collection of files. Write your notes as usual (in Obsidian or any editor), and the watcher will index them within 1 second. `save_memory` and `lemory remember` are just interfaces for AI to use, providing source indication, duplicate checking, and revert buttons.
Recently, memory products have been trying to store your knowledge in their databases. We think differently. We believe your existing files are a better database, and we've proven it with benchmarks. In fact, our approach is more accurate.
## Let's show you the evidence
All numbers can be reproduced with committed code and public data. Methods, losing items, and unsolved problems are detailed in [BENCHMARKS.md](BENCHMARKS.md).
<div align="center">
<img src="docs/assets/chart_kormapleqa.svg" width="840" alt="KorMapleQA ranking">
<img src="docs/assets/chart_latency.svg" width="840" alt="Latency comparison, log scale">
</div>
## We tested Lemory against 3 other tools
<div align="center">
<img src="docs/assets/demo2_rivals.gif" width="840" alt="qmd has 0 results, MemPalace has incorrect results, Lemory finds the correct note in 1st place">
</div>
We ran tests with [tobi/qmd](https://github.com/tobi/qmd) and MemPalace on the same vault. qmd requires exact keyword matching (AND), resulting in 0 results for Korean natural language queries. MemPalace is optimized for English and lacks Korean keyword support. Lemory finds the correct note in 1st place in 0.1 seconds without LLM calls.
qmd, even with local LLM, performs worse than Lemory's LLM-free search on the same 329 questions: Lemory achieves 0.887@0.11s vs qmd query 0.769@59.5s:
<div align="center">
<img src="docs/assets/chart_qmd_rematch.svg" width="840" alt="Same 329 questions: Lemory 0.887@0.11s vs qmd query 0.769@59.5s">
</div>
We also compared Lemory with mem0, the most-starred memory layer on GitHub, under the same conditions:
<div align="center">
<img src="docs/assets/chart_mem0.svg" width="840" alt="Lemory vs mem0, all metrics">
</div>
## Get started with a single command
```bash
pipx install "git+https://github.com/jwgo/lemory"
lemory up ~/Obsidian/MyVault # Setup, indexing, and dashboard in one step
lemory ask "What's the latest on that project I've been working on?"
```
The entry point is `lemory up`. It automatically selects the optimal mode. If you have a Gemini key, it uses the cloud; otherwise, it falls back to the **on-device stack** (Korean-optimized e5-small-ko-v2 embedding + Gemma 4 response). No key, daemon, or configuration required. Just run `lemory up` and specify your vault location. Model and search settings can be changed in the dashboard **Settings** tab.
Then, simply run **`lemory serve`** and keep it running. Obsidian plugins, Claude/MCP, and web dashboards can connect to it, and notes are re-indexed within seconds. `lemory ask "..."` works without a server. For usage and re-indexing guides, see [GUIDE.ko.md](docs/GUIDE.ko.md).
No LLM calls are made during indexing. **1,000 notes indexed = 0 LLM calls**, and search results are returned in seconds. Unlike other products that take 45 minutes to build an LLM graph for 54 notes:
<div align="center">
<img src="docs/assets/chart_ingest.svg" width="840" alt="Time taken to make 1,469 notes searchable">
</div>
**For first-time users: [docs/GUIDE.ko.md](docs/GUIDE.ko.md) · Daily usage: [docs/ROUTINE.ko.md](docs/ROUTINE.ko.md) (English: [docs/GUIDE.md](docs/GUIDE.md))**
## Lemory works with any AI
```bash
claude mcp add lemory -- lemory mcp --vault ~/Obsidian/MyVault --client claude-desktop
lemory skill install claude-code # Teach Claude Code to use Lemory
```
| Client | Configuration |
|---|---|
| Claude Code / Desktop | `claude mcp add lemory -- lemory mcp --vault <vault> --client claude-code` |
| Cursor | Add to `.cursor/mcp.json`: `{"lemory": {"command": "lemory", "args": ["mcp", "--vault", "<vault>", "--client", "cursor"]}}` |
| Windsurf / VS Code / Codex CLI / other MCP clients | Same command: `lemory mcp --vault <vault> --client <name>` |
| Scripts / custom agents | REST + `X-Lemory-Client` header (see below) |
The client name specified in `--client` appears in the dashboard usage. You can always track who's reading and writing your memories.
There are 11 tools available: reading (`search_notes`, `ask_notes`, `recent_notes`, `read_note`, `list_notes`, `related_notes`, `suggest_links`), writing (`save_memory`, `append_note`).
### Session memories are automatically saved (with a single command)
```bash
lemory hooks install claude-code
```
Now, when you end a Claude Code session, notable decisions, facts, and open issues are saved as a **dated note** in your vault. No need to be diligent. Unlike other hook-based tools, saved notes appear in the dashboard feed with source and revert buttons. If you prefer manual management, add the following to `CLAUDE.md`:
```markdown
At the start of a session, fetch Lemory's vault_context to understand the situation. When decisions or facts are made, save them with save_memory (briefly, one memory per note). Before asking me questions, search_notes to see if my notes already have the answer.
```
**Privacy is a file property.** If you add `lemory: false` at the top of a note, it won't be indexed, searched, or sent to any model. If a note is already indexed, this line will remove it.
## Once you tell Lemory, it remembers
<div align="center">
<img src="docs/assets/demo4_memoryloop.gif" width="840" alt="Day 1: Conversation saved as a session note. Day 30: The assistant finds the fact with source in 4ms.">
</div>
The assistant **reads and writes** while conversing. When you say "…remember this," it's saved as a note (with an approval queue if enabled). Follow-up questions like "What was that again?" are linked to previous questions. The initial conversation includes a vault context summary, and you can use `/search`, `/remember`, and `/recent` commands.
Conversations with the assistant are automatically saved as dated notes in the `chats/` folder. These are regular markdown files that you can view, edit, or delete. This transparency is the revert button. A month later, when you ask "What's my sister's name?", the answer appears in milliseconds with the source. Two optional features:
- **`lemory distill`**: A post-processing step that runs on demand. On-device Gemma summarizes conversations into fact summary notes with wikilinks as sources. +3.1%p correct answer rate on messy chat benchmarks. Details in [BENCHMARKS §7e](BENCHMARKS.md).
- **Skills** (`lemory skill install`): Teach external assistants to adopt the same habits. At the end of a session, save memories with `lemory remember`.
We also measured performance on work-related tasks. **AgentMemQA** ([§7f](BENCHMARKS.md)) is a benchmark with 12 weeks of work sessions (mixed English and technical conversations, code blocks, and error logs) with "repeated decisions" traps. Without a key, doc@1 **0.978**, and **0** mistaken traps. We also recorded opposing findings.
Messy real-world chats are not hypothetical; they're measured. RoleMemQA-messy adds noise, and overall doc@8 **0.977** · episode recall doc@8 **0.875** (prior info 0.792). We use vector leg reordering for episode questions, which have low lexical discrimination.
## It's not a log file, but a second brain
<div align="center">
<img src="docs/assets/demo3_secondbrain.gif" width="840" alt="Duplicate memories are shown as wikilinks, and unconnected mentions are suggested as links">
</div>
These features are not needed for human-written notes. Files in your vault are searchable from the first question. The features below are for **machine-written** notes:
- **`save_memory` saves with organization.** When new memories arrive, Lemory compares them to existing ones. If they're similar, it marks them as `possible_duplicate_of:`, and related notes are connected with wikilinks.
- **`lemory suggest-links`**: Suggests unconnected mentions with context sentences. No LLM calls; it reads the graph created during indexing.
- **`lemory graph`**: Exports the entire vault as an interactive HTML page. 1,469 notes and 24,850 edges take about 1 second. Recent graph tools use LLM calls per file.
- **`lemory drift`**: Checks if your memories still match reality. Finds broken links, deleted files, and abandoned duplicates, and creates repair instructions without LLM calls.
- **`lemory conflicts`**: Checks for conflicts between memories. Finds pairs of notes with similar but different information, contradictions, or duplicates. No LLM calls; uses cosine similarity on existing indices.
- **`lemory search --fast`**: A quick path for instant answers. Keyword search + typo correction + title/recency boost achieve recall@1 **0.975** in 3.8ms (hybrid search takes 21ms for 0.967). Suitable for typing-as-you-go search.
AI-generated notes appear in the dashboard **AI Memory Feed** with author and revert buttons (reverts to Obsidian `.trash`). All queries are stored with sources. This is the promise of a middleware: nothing passes silently.
<img src="docs/assets/demo-write.gif" alt="Claude saves a memory, and it appears in the feed with a revert button and Claude Desktop source" width="820">
## Demo Collection, All Actually Working Screens
Each clip is a real CLI output screenshot from a small Korean demo vault. The regeneration script is located at `docs/assets/make_gifs.py`, and the original text is also included in the script. There are no mockups.
| | |
|---|---|
| **Instant Search** `--fast` · Embedding 0 times, 3.8ms<br><img src="docs/assets/demo5_fast.gif" width="420"> | **Conflict Detection** `lemory conflicts` · Memory vs Memory<br><img src="docs/assets/demo6_conflicts.gif" width="420"> |
| **AI Write Approval** pending → approve<br><img src="docs/assets/demo7_approval.gif" width="420"> | **Drift Detection** `lemory drift` · Memory vs Reality<br><img src="docs/assets/demo8_drift.gif" width="420"> |
| **Scope Operators** `tag:` `folder:` `path:`<br><img src="docs/assets/demo9_operators.gif" width="420"> | **Temporal Awareness** "Recently worked on…" → Latest decision 1st<br><img src="docs/assets/demo10_temporal.gif" width="420"> |
| **Typo Correction** FoundatoinDB → FoundationDB<br><img src="docs/assets/demo12_typo.gif" width="420"> | **Large-Scale Verification** KorQuAD 9,663 paragraphs × 60,407 questions<br><img src="docs/assets/demo11_scale.gif" width="420"> |
## Dashboard
`lemory serve` → `127.0.0.1:8377`. This is not another Obsidian, but a screen to see *what's going on in the middleware*.
- **Status**: A timeline showing AI memory feed (including rollbacks), recent queries and sources, client usage, and indexing activities.
- **Knowledge**: Detailed information about each note, including indexed chunks, incoming and outgoing links, a local graph showing 'mentions' edges not present in the Obsidian graph, and related notes.
- **Health**: A single screen for handling approved memories, conflict pairs, drift, and link proposals.
- **Search**: An experimental lab for testing hybrid/vector/keyword search and observing scores and speeds.
- **Settings**: Apply search options directly. Timeline recording can also be configured here (`event_log`), and all settings are stored in a local SQLite file.
<img src="docs/assets/console-knowledge.png" alt="Knowledge Tab: Note Details, Local Graph, Related Notes" width="820">
## Files vs. Rows: Personal Knowledge Favors Files
Lemory is most similar to mem0's OpenMemory (a dashboard-equipped local MCP memory). The difference lies in what "memory" means.
| | **Lemory** | OpenMemory (mem0) | supermemory Self-Hosted | basic-memory | qmd |
|---|---|---|---|---|---|
| What is Memory? | **My Markdown Files** | Rows in Postgres+Qdrant | Records in a Dedicated Storage | Markdown Files | (Read-Only Index) |
| Execution Form | Single Process, Single SQLite | Docker: Postgres + Qdrant + UI | Binary + External Embedding | pip Package | bun CLI |
| Reads Existing Notes? | **Yes, That's the Purpose** | No (Extracted from Conversations) | Upload | Partial | Yes |
| Indexing LLM Calls | **0** | Per Conversation | API-Based | 0 | 0 |
| Dashboard | Timeline + Rollbacks + Clients | Memory CRUD UI | Console | None | None |
| Search (Direct Measurement) | **Multi-Hop 1.000 · ~3ms** | 0.579 · 212ms | 0.579 · 327ms | Not Measurable¹ | 0.526 · 0.6~59 seconds |
| Korean Search | **CJK Bigrams + Typo Correction** | English-First | English-First | English-First | English-First |
| Cost on Exit | None, Files Remain | Export/Transfer | Export/Transfer | None | None |
<sub>¹ basic-memory focuses on graph exploration, so it doesn't have ranked search. All measurements were conducted under the same conditions, using the same model and data: [Methodology](BENCHMARKS.md).</sub>
The type of memory (rows) is a summary of my words. Information is lost during storage, and it cannot be verified later. The file-based approach retrieves the actual notes with their original date and context. This also enables measuring search quality.
## We Prove it with Real Data, Not Synthetic Data
**In the Way People Actually Ask Questions**: Paraphrasing, Korean questions on English notes, keyword-only queries, and typos (full-support@8):
<div align="center">
<img src="docs/assets/chart_robustness.svg" width="840" alt="Paraphrasing, Korean, Keyword, and Typo Robustness">
</div>
**Multi-Hop, Competing with LLM Graph Camp.** My `[[Wiki Links]]` and title mentions already form a knowledge graph. The approach that reads this graph for free outperforms the approach that constructs a graph using an LLM pipeline:
<div align="center">
<img src="docs/assets/chart_multihop.svg" width="840" alt="2-Hop Questions: Lemory 1.000 vs. LLM Graph Pipeline">
</div>
| | **Lemory** | LightRAG | MemPalace | mem0 | cognee | supermemory | LlamaIndex | qmd |
|---|---|---|---|---|---|---|---|---|
| Multi-Hop answer-in-context@8 | **1.000** | 0.807¹ | 0.596 | 0.579 | 0.561 | 0.579 | 0.649 | 0.526 |
| Only 2-Hop Questions | **1.000** | 0.738 | 0.452 | 0.548 | 0.405 | - | 0.524 | 0.381 |
| Indexing, 54 Notes | **No LLM, ~30 seconds** | 165 Calls, 14 minutes | Local Embedding | 1~2 Calls per Note | ~45 minutes | API-Based | 0 | 0 |
| Search Latency (p50) | **~3ms** | 7.5 seconds² | ~1 second³ | 212ms | ~5 seconds | 327ms | 649ms⁴ | 0.6~59 seconds |
| Korean Questions (full-support) | **0.950** | - | 0.350 | - | - | - | - | - |
<sub>¹ Scored favorably for LightRAG. The merged context blocks are larger than the 8 chunks of other systems. The graph made by LLM is authentic and has the highest 2-hop score, but it incurs LLM costs for both indexing and querying. ² Includes LLM calls per query, limited by the free tier; paid tier would be 1~2 seconds. ³ Measured including process startup; their claimed zero-API configuration. ⁴ API embedding per query, no caching; local-only would be ~2ms.</sub>
**Industry-Standard Memory Benchmarks as Well.** LongMemEval_S, all 500 questions, 0 API calls, local embedders only:
<div align="center">
<img src="docs/assets/chart_longmemeval.svg" width="840" alt="LongMemEval All 500 Questions, 0 API Calls">
</div>
We achieve **Recall@5 0.983**. We also lead with the stricter all-evidence criterion (0.904). We do not cherry-pick numbers. LOCOMO LLM score 0.706 vs. mem0 public score 0.669, DMR (500 questions) 0.694 vs. naive RAG 0.668 ([§7b](BENCHMARKS.md)).
**Role-Playing Memory, Essential for Character Chat.** Directly created and published **RoleMemQA** ([§7e](BENCHMARKS.md)): 8 personas × 30 sessions, short-term/long-term/episode/preference changes/time/2-hop/rejection, totaling 144 questions (answers verified by code). Without keys, **doc@1 0.977**, preference change questions 1.000, and no false positives from old preferences. Outperforms vector (0.938) and keyword (0.820) paths, with ~1ms. We also fixed 2 actual flaws caught by this benchmark.
**[KorQuAD 1.0](https://korquad.github.io/)**: Real Korean Wikipedia articles (140 documents), human-written questions (400), locally without keys:
| System | Recall@1 | Recall@5 | MRR@10 |
|---|---|---|---|
| **Lemory** (hybrid+graph) | **0.930** | 0.980 | **0.951** |
| BM25 | 0.900 | **0.985** | 0.937 |
| Vector-only RAG | 0.840 | 0.953 | 0.887 |
<sub>This table historically favored BM25, and we accurately reported it. In July 2026, Korean search improvements reversed this. The 400-question sample may fluctuate ±2 questions due to tie handling. We also measured 10 times that (4,000 questions), and our current code leads with r@1 0.9795 (BENCHMARKS §7e). The old table is in the Git history, and the robustness chart is more relevant in practice.</sub>
**[KorMapleQA](benchmarks/data/kormapleqa/README.md)**, a contribution we created and shared: 1,469 real Namuwiki MapleStory articles, 2,075 questions. 100% code-generated and machine-verified for reproducibility without API keys or LLM bias.
We also used actual vaults not created by us, such as Obsidian CEO Steph Ango's public vault and the official Obsidian Help vault ([§5d](BENCHMARKS.md)).
## Korean is a First-Class Citizen
Most of this field neglects Korean. Lemory treats it as a benchmark.
- **Hangul + Kana + Kanji Bigrams Indexing**: Including grammatical particles and mixed notation like `ナイトロードナイトロード`. Typical tokenizers fail to handle this as a single unit.
- **Syllable-Level Typo Correction**: Finds `메플이스토리` as "MapleStory". Typo correction considers adjacent character swaps as one edit.
- **Informed Citation Detection**: Finds `만들었다` as "만든". It handles morphological complexities, prefixes, and spacing differences.
- 0.950 accuracy for Korean questions on English notes. BM25 achieves 0.250, and MemPalace achieves 0.350.
## This is What You Can Do
```
$ lemory ask "What was the budget for the Q3 kickoff?" # Meeting Minutes
$ lemory ask "Who is the lead of the Data Platform team and what do they do?" # Organization/People
$ lemory ask "What changes were made to the work-from-home policy compared to last year and this year?" # Temporal Comparison
$ lemory ask "What was the JavaScript event loop again? Based on my notes" # Study Notes
$ lemory ask "What were the preparations for Chaos Bellum?" # Game Notes
$ lemory ask "What was the name of the ramen shop we visited in Osaka?" # Travel Records
```
What general RAG cannot structurally achieve:
```
$ lemory ask "What is the lead of Project Atlas's favorite DB?"
# Multi-Hop: Atlas Note → [[Lead]] link → That person's note has the answer
$ lemory ask "What book was I reading recently?"
Recent books are Earthsea's The Magician [1, 3]. # Time: *Current* book
$ lemory ask "What was I reading in March?" # When asked about March, it uses that record
$ lemory search "tag:meeting folder:2026 budget" # Scope Operators, All Modes
$ lemory remember "VPN renewal is annually in March, responsible Kim Haneul" --tags ops # CLI Memory
$ lemory import-chats conversations.json # ChatGPT/Claude Conversations → Searchable Notes
$ lemory connect ./my_source.py # Connector SDK: Any Source → Vault Notes
$ lemory agents install # AGENTS.md Generated, Any Agent → Vault Memory
$ lemory graph --open # Interactive Graph of the Entire Vault
$ lemory context # Agent Vault Summary at Once
```
Typo correction is based on my vault's words (no API). Name changes, deletions, aliases, and Korean filenames are also tracked in real-time by the watcher. If you set `default_scope`, all questions default to that folder/tag scope (`scope:all` can be used once to reset), and operator precedence always takes priority.
## Why it Works: Structure, Not Magic
- **Multi-Hop 1.000 vs. 0.53~0.81 (All)** : Search expands links, checks query similarity and keyword evidence, and ensures direct evidence doesn't overweigh. Indexed without LLM upfront.
- **Robustness 0.95+ vs. 0.25~0.67**: Vectors and keywords *differently* fail. Weighted fusion covers both. If a question almost quotes a note, keyword ranking is fixed (pinned). Simple fusion can't respect keyword dominance.
- **Milliseconds, Not Seconds**: All in one process, SQLite FTS5 + numpy. Automatically switches to IVF-int8 index for >20,000 chunks. **100,000 chunks: 5.9ms/query, 1.000 recall, 732MB RAM** ([§12b](BENCHMARKS.md)). We also experimented with replacing SQLite and explained why we didn't ([report](docs/STORAGE.md)).
- **Cost Approaches 0.** Embedding cache, Gemini free tier for ~250 questions/day, and completely on-device mode for air-gapped environments.
## For Developers
```python
import lemory
lemory.configure(vault="~/Obsidian/MyVault")
lemory.index()
print(lemory.ask("What was the pricing policy again?").text)
```
TypeScript/Node clients with zero dependencies are available at [`clients/js`](clients/js): `new Lemory({client: "my-agent"}).search(...)`.
Python frameworks can be easily integrated (both actual frameworks have been tested):
```python
from lemory.integrations.langchain import LemoryRetriever # langchain-core
from lemory.integrations.llamaindex import LemoryLlamaRetriever # llama-index-core
```
Self-hosting: `docker build -t lemory . && docker run -p 127.0.0.1:8377:8377 -v ~/vault:/vault lemory`. If something goes wrong, `lemory doctor` checks the vault, index, FTS5, embedder, and generator all at once. Please attach the output to the issue.
Some content was borrowed from [Cerebras's internal knowledge base article](https://www.cerebras.ai/blog/how-we-built-our-knowledge-base), with proper attribution. **Ranked neighbor restoration**: after ranking, each chunk is reattached to its context, restoring truncated premises and cautions (`context_neighbors`). **Conversational burst chunking**: only meaningful parts of consecutive utterances by the same speaker are indexed separately, but only serve to boost the ranking of their own notes (actual measurements are in §7e). The rest of their key design decisions were already made and measured by Lemory.
Additional features added through gap analysis: `lemory ask --deep` (breaking down hard questions into separate searches and merging evidence), `lemory backup`/`restore`, `index_docx = true` (Word text extraction), `lemory connect` (connector SDK), `default_scope` (default search scope), and **mobile**: `lemory serve --host 0.0.0.0` + `api_token` allows token authentication on phones, while localhost remains unconfigured.
Failed experiments are also documented transparently. **Semantic fallback links** (similarity edges for notes without links) were created, measured, and **found to be ineffective**, so they are disabled by default. **Re-ranker time adjustment** was also tested with an actual model (3 comparisons, yielding 0.978 / 0.889 / 0.867) before being reverted. We keep the benefits and document the failures.
The REST API is available through `lemory serve`: `GET /search` · `POST /ask` · `GET /context` · `POST /memory` · `POST /append` · `POST /memory/trash` · `POST /index` · `GET /status`, and dashboard APIs (`/api/events`, `/api/clients`, `/api/notes`, `/api/related`, ...) are also available. If you reveal your identity with the `X-Lemory-Client` header, your source will be displayed on the dashboard.
The Obsidian sidebar plugin (just copy 3 files to install), PDF indexing (`pip install 'lemory[pdf]'`, `index_pdf = true`), and all search options are documented in [`lemory.toml`](docs/GUIDE.ko.md); in-depth discussions are in [BENCHMARKS.md](BENCHMARKS.md) · [docs/STORAGE.md](docs/STORAGE.md) · [docs/COMPETITIVE.md](docs/COMPETITIVE.md).
## How It Works
```
My vault (*.md) ──monitoring──► parsing: frontmatter · tags · [[links]] · dates
│
▼
One SQLite file: chunks · BM25 · link graph · embedding cache
+ event timeline + IVF-int8 (large vault)
│
Question ─► typo correction ─► vector + keyword (fusion) ─► title & recency boost
│
1-hop graph expansion ← multi-hop answers come from here
│
▼
Context with dates and sources ─► LLM ─► answer [n]
save_memory ─► duplicate check ─► .md in vault ─► searchable from next question
```
Search is local and LLM-free (3~13ms). One embedding per question (cached), and one generation per `ask()`.
## Honestly
- For questions that directly quote documents, pure BM25 was superior for a long time; we kept it as-is until July 2026, when it was surpassed. Old numbers are in the git history.
- In qmd's flagship mode, we now outperform (0.875 vs 0.769 on the same questions). The old embedder was tied. The ~3,700x speed difference was always there.
- On kepano's small English vault, vector-only search beats us by a hair; BENCHMARKS has those numbers.
- 42k-chunk corpus 2-hop full-support is challenging for everyone; our local numbers improved to 0.477, but we leave it as an ongoing challenge.
- Other teams' published numbers use different generators/scoring; we cite them for reference only. Zep's DMR 94.8 uses GPT-4-level composition, but we don't claim to beat them.
- In experiments replacing SQLite (DuckDB, LanceDB), LanceDB's text search was 5x faster in the worst case, but we stick with SQLite, which wins 4 out of 5 categories ([full report](docs/STORAGE.md)).
- We also document failed patches, like burst chunking's retreat (§7e).
## Roadmap
- [ ] PyPI (`pip install lemory`) · [ ] Obsidian community plugin listing
- [x] AI-assisted writing path + undo · [x] client source display
- [x] memory cleanup (duplicate display + related links)
- [x] link suggestions · [x] interactive graph · [x] assistant skills
- [x] PDF indexing · [x] 1M-chunk vault ANN index
- [x] chat import (ChatGPT/Claude) · [x] KorMapleQA benchmark
- [x] connector SDK (`lemory connect`) · [x] default search scope (`default_scope`)
- [x] agent onboarding (`lemory agents`: AGENTS.md + detection) · [x] AI-assisted writing git checkpoints
- [ ] image OCR / audio transcription · [ ] web clipper
- [ ] multi-vault profiles
## Contributing
`uv venv && uv pip install -e ".[dev,mcp,local,pdf]" && pytest` runs 400+ tests offline. [CONTRIBUTING.md](CONTRIBUTING.md) welcomes Korean issues/PRs.
Designed with local-first principles, our trust model, local server security measures, and vulnerability reporting are in [SECURITY.md](SECURITY.md).
**[English README](README.en.md)** · MIT
Connection Info
You Might Also Like
No recommendations available