pi-knowledge
A local-first retrieval-augmented knowledge base for the Pi and OMP coding agents, combining semantic embeddings with BM25 keyword search and code-aware chunking over a codebase, docs, PDFs and notes.
pi-knowledge indexes a codebase, documentation, PDFs, URLs and notes into a persistent knowledge base that the Pi and OMP coding agents can search across sessions, rather than trying to fit a large project into one prompt. Retrieval combines lexical-anchored BM25 with semantic vector search, using normalized weighted score fusion, alongside a lightweight symbol lookup for functions, classes, Markdown headings, config keys and environment variables.
Indexing is code-aware, using recursive AST-based chunking for languages including TypeScript, JavaScript, Python, Go, Rust, Java, Bash and C or C++, with bounded fallback chunks for oversized declarations, and indexes are stored under the user's home directory rather than inside the project. It is built as a native Pi extension with verified OMP compatibility, runs local embeddings with no API key by default, and persists indexing progress so large repositories do not hang silently.