AI KNOWLEDGE DESK

Models · entities · concepts · comparisons · practical tools

GETLLMS.ORG
ToolAI coding tools

Pi Coding Agent

Pi Coding Agent is an MIT-licensed terminal coding agent from Earendil Inc. that keeps its core harness small and lets developers add tools, commands, workflows, providers, prompts, skills, themes, and interface behavior through extensions and packages.

Why it matters

Pi makes the coding-agent harness unusually visible. Instead of shipping every workflow as a fixed built-in feature, it gives developers a compact terminal agent, multiple model-provider routes, tree-structured sessions, programmatic modes, and extension APIs they can adapt to a project.

Source-backed summary

The official Pi website, documentation, repository, and npm package describe a minimal terminal coding harness with interactive, print/JSON, RPC, and SDK modes; provider routing through OAuth or API keys; project instructions and skills; tree-structured sessions; and TypeScript extensions. Official security documentation also states that Pi has no built-in sandbox and runs with the permissions of the user who starts it. Hacker News and Reddit provide strong demand and comparison questions, but they do not establish product quality or benchmark superiority.

Primary use cases
  • Run a provider-flexible coding agent from a terminal.
  • Build custom tools, commands, workflow gates, and terminal UI with TypeScript extensions.
  • Embed a coding-agent session through print/JSON, RPC, or SDK modes.
  • Study and customize the non-model harness around coding-agent behavior.
What Pi includes by default

Pi provides a terminal agent loop, file and shell tools, model selection, session history, context loading, compaction, and several programmatic surfaces. The official site lists interactive, print/JSON, RPC, and SDK modes, so Pi can be used directly or embedded inside another application.

  • Install surface: the official package is @earendil-works/pi-coding-agent, and the CLI command is pi.
  • Provider surface: Pi supports subscription OAuth routes, API-key providers, cloud gateways, custom providers, and local models through llama.cpp.
  • Context surface: AGENTS.md, skills, prompt templates, project settings, and tree-structured session history shape the working context.
Why Pi calls itself a minimal harness

Pi intentionally leaves features such as subagents, plan mode, permission popups, and MCP out of the fixed core. Developers can build or install extensions and packages for the workflow they need. That makes Pi attractive when inspectability and customization matter more than a batteries-included default experience.

  • Extensions can register tools and commands, intercept lifecycle events, change compaction, and add custom terminal UI.
  • Skills and prompt templates add reusable guidance without permanently expanding the core prompt.
  • Pi packages can bundle extensions, skills, prompts, and themes for npm or Git distribution.
Security boundary before you run it

Pi project trust controls whether project-local settings and executable resources load, but it is not a sandbox. Built-in tools and extensions run with the permissions of the Pi process. For untrusted repositories, unattended work, or sensitive credentials, the official security guide recommends a container, VM, micro-VM, remote sandbox, or another operating-system isolation boundary.

Where the Claude Code comparison is useful

Pi and Claude Code can run similar coding tasks, but they make different product choices. Pi exposes a small provider-flexible harness that users extend themselves. Claude Code provides an Anthropic-centered workflow with more planning, permission, subagent, hook, and team controls built in. Community comparisons are useful for discovering this decision, not for declaring a universal winner.

Pi Coding Agent FAQ

Common questions about Pi Coding Agent.

How do I install Pi Coding Agent?+

Install the official package with npm install -g --ignore-scripts @earendil-works/pi-coding-agent, then run pi inside a project directory. The current npm package requires Node.js 22.19 or later. Use /login for supported subscription providers or configure an API key according to the current provider documentation.

Does Pi Coding Agent support local models?+

Yes. Pi documents local-model use through llama.cpp and also supports custom providers. Local execution still depends on the selected model, tool-calling compatibility, available hardware, and the provider or router configuration around it.

Does Pi Coding Agent have a sandbox?+

No. Pi’s official security guide says it has no built-in sandbox and that its tools and extensions run with the permissions of the Pi process. Project trust only controls whether project-local resources load; use a container, VM, micro-VM, remote sandbox, or similar isolation for untrusted or unattended work.

Is Pi Coding Agent free?+

The Pi code and CLI are MIT-licensed, but model usage can still cost money. Your actual cost depends on whether you use a paid subscription route, API-key provider, cloud gateway, or a local model running on your own hardware.

Is Pi Coding Agent better than Claude Code?+

Neither is universally better. Pi is a stronger fit when you want a small open-source harness, provider choice, and deep customization. Claude Code is a stronger fit when you want an integrated Anthropic workflow with more planning, permission, subagent, hook, and team behavior supplied by the product. Compare both on the same repository and validation gate before choosing.