OpenKnowledge

Pi

Use OpenKnowledge with Pi.

Pi is an open-source, minimal terminal coding harness. Instead of MCP, OpenKnowledge plugs into Pi through a bridge extension.

Install

Run ok init in your project (or open the project in the OpenKnowledge desktop app — project setup writes the same files). Two things land in the project's .pi/ directory:

  • .pi/extensions/open-knowledge.ts — the bridge extension. On session start it launches OpenKnowledge's MCP server with the same resilient launcher every other editor uses, then registers each OpenKnowledge tool as a native Pi tool under an ok_ prefix (ok_exec, ok_search, ok_write, …). The prefix keeps OpenKnowledge's edit / write from shadowing Pi's built-in file tools.
  • .pi/skills/open-knowledge/ — the OpenKnowledge skill, in the Agent Skills format Pi reads natively from .pi/skills/.

These files are managed by OpenKnowledge. Running ok init again refreshes them in place, while ok deinit removes them.

Trust the project

Make sure Pi trusts the project folder. Pi does not load project-local extensions or skills from .pi/ until the project is trusted. When you first run pi in the project, accept the trust prompt. See Pi's project trust documentation for more details.

Verify

Run pi in the project, and ask:

Pi should call the OpenKnowledge ok_exec tool and respond with some of your documents.

If the ok_ tools are missing: make sure you trusted the folder, then /reload (or restart pi). The first tool call can take a moment on a fresh machine — the launcher may be installing the OpenKnowledge CLI via npx. If Pi shows an "Open Knowledge tools unavailable" notice, install Node.js 24+ or the OpenKnowledge desktop app and reload.

On this page

Product updates