Credentials. Provider API keys go in config.toml or the BRAIN_LLM_API_KEY and BRAIN_EMBED_API_KEY variables, so keep them out of the repository.
Who it is forA researcher or developer with scattered Markdown notes who needs to find an old decision fast.
The problemDecisions and facts are buried across many files, and plain keyword search misses them.
The outcomeA local index that returns excerpts and answers that cite the source file and section.
What you need first
- Python 3.11 or newer
- git and a terminal
- An embedding endpoint that supports /embeddings, plus a chat endpoint (may be a local one)
- A notes or project docs directory to index
Steps
- Run
git clone https://github.com/IvenKooLab/loci.gitand thencd loci. - Run
python -m pip install -e .and thencp config.example.toml config.toml. - Edit config.toml: fill in [llm] and [embed], and set [[sources]].path to your notes directory.
- Run
loci ingestto build the index. - Run
loci search "deployment decisions"and thenloci ask "What did we decide about deployment, and why?".
Prompt for your agent
Using the IvenKooLab/loci repo, configure config.toml so [[sources]].path points to <notes-directory>, run loci ingest, then run loci ask with the question <question>. Expected output: an answer with file > section citations. Verify that each citation names a file that exists under <notes-directory>.
Caveat. Embedding and chat requests go to the providers you configure, so only local endpoints keep the whole workflow offline.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for IvenKooLab/loci and "Search and ask questions across your own notes"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer