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.
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.
Checked October 21, 2026 against the current linked primary source. Earlier release chapters retain their original scope; publisher changes are not independent runtime validation.
- 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.
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.
Pi keeps its coding harness extensible through packages and TypeScript extensions. Its current core includes MCP server tools and resources over stdio or streamable HTTP, with connection and OAuth management. Older descriptions that put MCP entirely outside the core are outdated. Workflow customization and operating-system isolation remain separate decisions.
- 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.
Historical release context: this section describes the earlier release. The current release checkpoint appears on this page. The September 22 v0.87.1 release adds support for GPT-6 Sol, GPT-6 Luna and Claude Opus 5.5, changes the SpaceXAI default to Grok 4.7, and repairs compaction, flag handling and image-only messages. Those are concrete compatibility and reliability changes; they do not establish that one newly supported model is best for every Pi workflow.
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.
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.
The October 1 v1.0.0 release makes the TUI fullscreen by default and adds image-model calls in codemode and MCP OAuth hardening. The October 5 v1.0.4 patch adds wildcard tool-selection patterns and --no-mcp for one run, preserves image blocks returned by codemode reads, and fixes OAuth client registration and MCP shutdown. These are documented release changes, not proof every provider or server works in every environment.
The October 12 stable release adds per-key OpenRouter model discovery, a settings JSON schema, remote clipboard support and codemode improvements. Extension-triggered runs emit before_agent_start, and MCP list JSON behavior changes. Check extensions and machine-readable CLI consumers before upgrading; the release does not create an operating-system sandbox.
Pi 1.3.0 adds sessionShareDestination to choose auto, GitHub gist or Radius for /share. Those destinations upload session material; inspect it before sharing. The release preserves prompt caching when changing GPT-6 thinking levels, switches Kimi Code to Chat Completions with a /v1 base URL, drops reasoning from a previous model when switching, and restores tools on resume. These are Pi integration changes, not new provider-wide model contracts.
- Current official source
Read the exact release or provider scope.
The runtime, tools, context, permissions, feedback, and execution environment around the model.
Reusable capability instructions that Pi can load without turning every workflow into a core feature.
Why extensions, skills, packages, prompts, and local project resources need trust and review boundaries.
Anthropic’s integrated terminal coding agent and the main batteries-included comparison point.
Another open-source coding-agent surface with plan/build modes, subagents, and model routing.
A personal-agent system that the Pi documentation identifies as a real-world SDK integration.
Source confidence
Earendil Inc.
Earendil Inc.
Earendil Inc.
Earendil Inc.
Earendil Inc.
GitHub / earendil-works
GitHub / earendil-works
npm
Hacker News
Reddit / r/PiCodingAgent
Earendil Inc.
GitHub / earendil-works
Project maintainers
Project publisher
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.