Build a personal knowledge base from project READMEs and design docs that pi can query from any folder.
Pull blog posts and Wikipedia pages into a workspace via /kb-add and ask grounded questions with /kb-query.
Keep multiple isolated wikis (work, research, hobby) and switch between them with the -w flag.
Version the ~/.pi/agent/kb/wiki folder with Git or open it in Obsidian for a graph view of your notes.
The only requirement is the pi coding agent itself, and dynamic single-page-app URLs will produce thin results.
pi-kb is an add-on for a coding tool called pi, which the README describes as a coding agent that runs on your machine. The job of pi-kb is to take a pile of markdown files (or web pages) and turn them into a small wiki, with summaries, cross-cutting concepts, and an index, using whichever language model pi is already wired up to. The author says they were inspired by an earlier project called OpenKB, but built this one entirely as a pi extension with no extra dependencies beyond the model. You install it with one command, pi install git:github.com/dheerapat/pi-kb. After that you get a set of slash commands. /kb-init creates a named workspace. /kb-add takes either a local markdown file or a URL and pulls it into the knowledge base. /kb-query asks a question against the stored documents. There are also commands to list documents, show stats, remove a document, and delete a whole workspace, the last of which asks for confirmation first. Every command can take a -w flag to point at a specific workspace, otherwise it uses a default one. When you add a file, pi-kb copies it into a folder under your home directory, then asks the language model to write a summary, pull out concepts that show up across documents, and update the index. Everything is stored as plain markdown in ~/.pi/agent/kb/wiki/, so you can open the folder in a tool like Obsidian to get a graph view. URLs are fetched with a plain HTTP request and converted to markdown by a separate Rust library called html-to-markdown. The README is honest that this works well for documentation sites, Wikipedia, blog posts, and GitHub READMEs, but will produce thin or empty results for sites built as single-page apps, anything behind a login, or pages guarded by bot-detection. Because the knowledge base lives in a fixed location in your home directory, you can run queries from any folder on your machine, not just inside the project the documents came from. And because it is all plain files, you can put the folder under Git to keep history, back it up, or sync it across machines. The only listed requirement is the pi coding agent itself.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.