# loci

> Open-source shared memory and knowledge base for AI tools with hybrid search, cited Q&A, a Web console and MCP server.

loci is an open-source Python project from IvenKooLab that turns notes, project docs and agent memories into a searchable knowledge base. It combines vector search with BM25 and returns answers with `file > section` citations, usable from a terminal, a built-in web console or MCP clients. The latest listed release is v0.8.1.

## What It Is

loci is a local-first retrieval and memory layer for people who work with several AI coding tools. Files and the index stay on the user's machine, while embedding and chat requests go to whichever providers are configured; local endpoints can keep the whole workflow offline. It ingests Markdown, text, HTML, org-mode and chat exports by default, with optional extras for PDF, Word and OCR.

## Workflow and Outputs

Users configure an LLM and an embedding endpoint in `config.toml`, point a source at a notes directory, then run commands to ingest, search and ask. Indexing is incremental, and a watch command keeps changed documents indexed. Answers cite source sections, with optional claim-by-claim verification. Durable memories are stored as Markdown files and can be saved or retracted through commands or MCP tools.

## MCP and Web Console

MCP clients pointed at the same instance directory share one config, index and memory set. The MCP tools cover search, cited answers, remembering and forgetting, note links and graphs, wiki consolidation, harness inspection, stats and ingestion. The server also exposes note resources and briefing, study-plan and contradiction-check prompts. The built-in console, started with `loci serve-http`, handles search, Q&A, memory editing, harness memory browsing and indexing activity, with English/Chinese and light/dark switches. Role-based tokens can be configured for access control.

## Setup Path

Installation requires Python 3.11+, either from source or via the `loci-rag` PyPI package. The project uses an OpenAI-compatible SDK and ChromaDB, and implements BM25, loaders and MCP transport itself. It is MIT licensed.

## Features
- Hybrid vector and BM25 search with tag, path and date filters
- Cited Q&A with file > section citations and optional claim verification
- MCP server sharing one instance across AI tools
- Durable memories stored as Markdown files
- Harness discovery of coding agent memories
- Built-in Web console with light/dark and Chinese/English
- Incremental indexing and file watching
- Role-based token access control
- Optional PDF, Word and OCR support
- Local endpoints for fully offline use

## Integrations
MCP, ChromaDB, Ollama, Obsidian, OpenAI-compatible APIs, DeepSeek Harness

## Platforms
CLI, WEB, API

## Pricing
Open Source

## Version
v0.8.1

## Links
- Website: https://github.com/IvenKooLab/loci
- Documentation: https://github.com/IvenKooLab/loci/blob/main/docs/guide.en.md
- Repository: https://github.com/IvenKooLab/loci
- EveryDev.ai: https://www.everydev.ai/tools/loci
