Pi with a local model introduction
This tutorial introduces Pi as an open-source AI harness with explicit provider configuration. It separates the harness source, the provider endpoint and evidence that model inference runs locally.
Sources and product details checked 25 August 2026
Use a disposable practice repository without confidential files.Keep the first task within an explicit read-only tool allowlist.
Step 1
Identify the harness and the three verification boundaries
Pi is an MIT-licensed AI harness whose model provider is configured separately. A local Pi process establishes the harness location. Local model inference additionally requires a local endpoint and observable local execution.
- Verify the harness source and installed package version.
- Identify the selected provider and its endpoint.
- Observe the process or service that performs inference.
- Keep the model licence and capability assessment separate from the harness licence.
Check: you can state which evidence supports the harness source, provider route and inference location.
Step 2
Prepare the workspace and model service
- Use a disposable Git repository without confidential files or credentials.
- Confirm the current runtime requirements in the Pi documentation before installation.
- Start the chosen local model service and record its loopback endpoint when local inference is intended.
- Run
git status --shortoutside Pi and preserve the starting state.
Check: the workspace, runtime, model endpoint and Git baseline are each available before Pi starts.
Prerequisites checked 25 August 2026 against the official Pi documentation.
Step 3
Install Pi from the current maintained package
- Compare the package namespace with the current official repository and documentation.
- Install with
npm install -g --ignore-scripts @earendil-works/pi-coding-agent. - Open a new terminal when the executable is not yet visible in the current shell.
- Run
pi --versionand record the result beside the source check date.
Check: the installed executable reports a version and its package route matches the maintained Pi source.
Package namespace and command checked 25 August 2026 against the official repository.
Step 4
Confirm the workspace, provider and inference route
- Start Pi in the intended repository and confirm its current working directory.
- Inspect the configured provider, model and endpoint before the first prompt.
- Use the documented llama.cpp router bound to
127.0.0.1or the maintained Ollama integration for a local route. - Observe the local model process or service log while a request runs. Record any remote connection that appears.
Check: the visible endpoint and observed process state support the claimed inference location.
Official llama.cpp integration · Official Ollama integration
Step 5
Inspect the instruction hierarchy and overrides
Pi reads hierarchical AGENTS.md files and can also use CLAUDE.md. An AGENTS.override.md replaces the instruction file on the same directory level.
- Locate instruction files from the project root towards the current working directory.
- Identify each file's directory scope and the rules that reach the current task.
- Check whether an
AGENTS.override.mdreplaces the ordinary file on its level. - Resolve contradictory instructions before exposing any write-capable tool.
Check: you can name the effective instruction files and explain any active override.
Instruction loading checked 25 August 2026 in the official usage documentation.
Step 6
Apply an explicit read-only tool allowlist
Pi runs with the operating-system rights of the user who starts it. Pi provides no built-in execution sandbox. Project trust governs whether project resources load, while exposed tool actions continue under the user's operating-system rights.
- Expose only
read,grep,findandlsfor the first task. - Review the effect of every additional tool before adding it to the allowlist.
- Use a container or a restricted operating-system account when the task requires a stronger execution boundary.
- Keep credentials and confidential files outside the practice workspace.
Check: the active tools support repository inspection and provide no file-writing or shell-execution route.
Official Pi security documentation, checked 25 August 2026.
Step 7
Locate extensions and the intentionally omitted built-ins
Pi supports Skills, extensions and packages. Built-in permission prompts, Plan Mode, Model Context Protocol support and Subagents are absent from the core product.
- Inspect the source and tool exposure of an extension before loading it.
- Use Skills for maintained procedures whose triggers and checks are explicit.
- Use separate processes and isolated workspaces when independent work should proceed in parallel.
- Add allowlists, containers or extensions only for a defined capability requirement.
Check: every added capability has a known source, tool scope and verification method.
Product boundaries checked 25 August 2026 in the official usage documentation.
Step 8
Run one reversible orientation and verify each boundary
Start Pi with an explicit read-only tool allowlist and ask for a repository orientation whose claims can be checked directly.
- Run
pi --tools read,grep,find,ls -p "Summarize this repository and explain how its checks are run.". - Compare the answer with the cited instruction files and check definitions.
- Record the Pi source and version, configured provider endpoint and observed model process as separate evidence.
- Run
git status --shortoutside Pi and compare it with the starting state.
Check: the orientation is source-grounded, local-inference evidence is explicit and the repository remains unchanged.
Pi documentation · Security boundary · sources checked 25 August 2026
