Skip to content

Pi

Pi is an open-source coding agent harness that emphasizes minimalism and extensibility. It runs interactively in the terminal with just four of its seven built-in tools enabled by default: read, write, edit, and bash. That minimal setup, plus a system prompt and tool definitions that together stay under 1,000 tokens, makes it one of the leanest coding agents available. Pi also runs in print or JSON mode, as an RPC server for process integration, and as an SDK for embedding in other applications.

Rather than bundling features like plan mode, to-do lists, or MCP support, Pi encourages users to extend its capabilities through TypeScript extensions, skills, prompt templates, and themes, or by asking the agent to build new functionality itself. Those add-ons can be bundled as pi packages and shared through npm or git. Sessions are stored as tree structures, enabling branching and navigation without losing context.

Pi supports multiple LLM providers including Anthropic, OpenAI, Google, xAI, Groq, and others. It can authenticate via API keys or subscriptions like Claude Pro, ChatGPT Plus, or GitHub Copilot.

Pi treats the context window as a scarce budget: by keeping the system prompt small, loading tools on demand, and avoiding hidden context injection, more of the window is available for actual code and project-specific information.

Official website: pi.dev, with the source code at github.com/earendil-works/pi

A person in overalls pointing at a four-piece puzzle map labeled IDE, Cloud, CLI, and PR/Repo, with a map info legend beside it and a Python logo.

Tutorial

AI Coding Agents Guide: A Map of the Four Workflow Types

AI coding agents come in four types: IDE, terminal, PR, and cloud. Learn how each workflow fits into modern Python development.

intermediate ai

For additional information on related topics, take a look at the following resources:


By Dan Bader • Updated Aug. 15, 2026 • Reviewed by Leodanis Pozo Ramos