Skip to content

Releases: IvenKooLab/loci

v0.6.3

Choose a tag to compare

@IvenKooLab IvenKooLab released this 04 Oct 13:30

v0.6.3

Bug fix — first external contribution (by @hulinming) 🎉

  • Fixed TypeError on every loci ask call with --rewrite: the CLI passed rewrite= but cmd_ask did not accept the parameter (regression since v0.5.0). Merged via PR #1 with a regression test.

Install: pip install loci-rag==0.6.3

Full changelog: see CHANGELOG.md

v0.6.2 — integration hardening (found by loci-dsh)

Choose a tag to compare

@IvenKooLab IvenKooLab released this 19 Sep 07:50

v0.6.2 — integration-hardening release

Fixes found by the first downstream integration (loci-dsh, a visual plugin for DeepSeek Harness):

  • serve-http, sync, bench CLI subcommands are now actually registered (dispatch existed but the argument parser entries were missing)
  • HTTP API robustness: handler exceptions return 500 JSON instead of dropping the connection (an empty query used to kill it), malformed bodies return 400, empty queries short-circuit with a hint
  • --host / --port default from the [http] config section as documented

Read the new Ecosystem section in the README for the loci-dsh integration story.

v0.6.1 — the knowledge-graph release

Choose a tag to compare

@IvenKooLab IvenKooLab released this 19 Sep 07:26

v0.6.1 — the knowledge-graph release

Four features landed in parallel branches and merged into one release.

Highlights

  • Knowledge graph — loci graph build extracts entity-relation triples from your memories and wiki pages into a single human-readable graph.json (no graph database, hand-editable). Every edge cites its source file. Query with loci graph show ENTITY or the new brain_graph MCP tool (omit the entity to list hub entities). Wiki generation injects related graph relations as extra context.
  • OCR ([ocr] extra, rapidocr) — image files are recognized and indexed; scanned PDFs (near-empty text layer) automatically fall back to per-page OCR. loci doctor reports availability.
  • HTML loader (stdlib, zero deps) — headings, lists, <meta charset> with a gb18030 fallback for legacy Chinese exports.
  • org-mode loader (stdlib, zero deps) — #+TITLE becomes the h1, #+FILETAGS become frontmatter tags, org links become markdown links.

MCP tool count: 9 (brain_graph joins). 173 offline tests, CI on 3.11–3.13.

Install

pip install "loci-rag[pdf,docx,ocr]"

Full changelog: CHANGELOG.md

v0.5.0 — the self-improving release

Choose a tag to compare

@IvenKooLab IvenKooLab released this 16 Sep 12:24

v0.5.0 — the self-improving release

Query understanding, memory automation, and efficiency across the board.

Highlights

  • Query rewriting — loci ask --rewrite generates keyword and cross-language variants of your query, retrieves per variant, and RRF-fuses the results. A Chinese query can now surface the English doc it used to miss.
  • Auto memory extraction — loci chat now distills durable facts from each exchange into memory notes automatically (mem0 pattern, max 3 per exchange, fail-open). Your agent remembers without being asked.
  • Chunk-level incremental indexing — only changed chunks are re-embedded; unchanged vectors are reused via content fingerprints. Editing one paragraph no longer re-embeds the whole file.
  • Feedback loop — loci feedback good|bad rates the chunks behind the last answer; bad-rated chunks sink in future retrieval.
  • HTTP REST API — loci serve-http exposes search / ask / remember / stats over JSON with Bearer auth, for non-MCP tools (shortcuts, automations, home servers).
  • Git memory sync — loci sync push|pull version-controls the memories/ and wiki/ directories for cross-machine memory sharing. No cloud, no accounts.
  • Wiki topic suggestions — loci wiki --suggest recommends topics that have enough indexed material but no wiki page yet.
  • loci bench — built-in retrieval benchmark (hit@k, vector-only vs hybrid) over your own labeled queries.

Fixes

  • Python 3.11 compatibility (f-string syntax from PEP 701 was 3.12-only)
  • Feedback penalties are now actually applied in retrieval (dead-code bug caught by tests)
  • Config warnings go to stderr — MCP stdio streams stay clean

Install

pip install "loci-rag[pdf,docx]"

Full changelog: CHANGELOG.md

v0.2.0 — the memory layer release

Choose a tag to compare

@IvenKooLab IvenKooLab released this 05 Sep 15:08

The "memory layer" release

loci turns scattered notes, project docs, and chat logs into a queryable second brain — local index, hybrid retrieval, cited answers, and an MCP server so your AI agents can use it. The core is ~300 lines of plain Python: no LangChain, no Docker, no daemons.

Highlights

  • Hybrid retrieval by default — native BM25 (CJK-aware) fused with vector search via Reciprocal Rank Fusion. Measured on a bilingual corpus: 9/10 → 10/10 hit@5 vs vector-only.
  • MCP server, zero extra dependencies — brain_search / brain_ask / brain_links / brain_stats / brain_ingest over stdio; plus resources (brain://note/…, brain://stats) and three prompts (brain-briefing / study-plan / contradiction-check).
  • Fully offline verified — point both endpoints at a local Ollama and the whole pipeline runs with zero cloud calls.
  • Section-level citations — every answer and hit carries file > heading breadcrumbs; optional ask --verify audits the answer claim-by-claim against the sources (✓ / ~ / ✗).
  • Reranking, two providers — LLM pointwise scoring, or a local cross-encoder (BAAI/bge-reranker-base, ~30–70 ms for 5 pairs on GPU) via an optional extra.
  • Obsidian-native details — frontmatter tags (--tag), [[wikilink]] graph (links), fenced code blocks never split, one-line notes stay searchable.
  • Office & PDF — PyMuPDF4LLM extracts PDFs as markdown with tables as pipe rows; .docx paragraphs and tables via an optional extra.
  • Chat-log loader — ChatGPT / Claude conversations.json exports become one searchable document per conversation.
  • Per-directory chunk config — [[sources]] entries override chunk_size / chunk_overlap.
  • Quality signals — 115 offline tests (no API keys needed), GitHub Actions CI (3.11–3.13 + packaging smoke), built-in retrieval eval harness, stats / doctor / watch / chat commands.

Quick start

pip install -e ".[pdf,docx]"
cp config.example.toml config.toml   # add your API key + source dirs
second-brain ingest
second-brain ask "what did I write about X?"

Full notes in CHANGELOG.md. MIT licensed.