Pi Coding Agent
Pi Coding Agent is an open source AI coding assistant that lives in your terminal, built by earendil-works as a minimal agent harness you can shape around your own workflow. It works with more than 15 model providers, so you bring your own models and pay only what those providers charge. Extensions, skills, prompt templates, and themes let you customize Pi, and it can even modify itself while it works.
Quick Facts
| Developer | earendil-works |
|---|---|
| First released | 2025 |
| Latest version | See official website |
| Platform | Terminal app built with TypeScript and Node.js |
| License | MIT (open source) |
| Pricing | Free and open source; you pay only for the model providers you connect |
| Model providers | 15+ including Anthropic, OpenAI, Google, xAI, Mistral, Groq, OpenRouter, and Ollama |
What is Pi Coding Agent?
Pi Coding Agent is an open source AI coding assistant that runs in your terminal. It is created by earendil-works, released under the MIT license, and built around a simple idea: instead of a sealed product with a fixed feature list, Pi is a minimal agent harness that you adapt to your own way of working.
You talk to Pi the same way you would talk to other agentic coding tools: ask it to explain code, plan a change, or write and edit files across your project. Where Pi stands out is how much of itself is open for you to change. Extensions, skills, prompt templates, and themes are all files you can edit, and Pi can even modify its own code while it runs.
The project is organized as a monorepo of open source packages, including the pi-coding-agent CLI, the agent-core runtime, the pi-ai multi-provider API, and a terminal UI library. The GitHub repository has grown a large community of contributors who publish shared packages that anyone can install with a single command.
Key Features
- Supports 15+ model providers, from Anthropic, OpenAI, and Google to Groq, Mistral, xAI, OpenRouter, and local models via Ollama
- Four ways to use it: an interactive TUI, print and JSON modes for scripts, RPC for non-Node integrations, and an SDK for embedding Pi in your own apps
- Tree-structured sessions stored in a single file, letting you branch, jump back with /tree, and continue from any earlier point
- Context engineering built in: AGENTS.md project instructions, per-project SYSTEM.md files, customizable compaction, on-demand skills, and reusable prompt templates
- Self-extensible architecture where TypeScript extensions can add tools, commands, keyboard shortcuts, sub-agents, plan mode, permission gates, and more
- Steering and follow-up messages you can send while the agent is mid-task
- A package system for installing extensions, skills, prompts, and themes from npm or git
How to get started
Pi is a terminal app built on Node.js. Install the CLI, launch it inside a project folder, and you can immediately start asking questions or requesting changes. The official documentation at pi.dev covers installation and first-run setup for each supported model provider.
Because Pi is provider agnostic, getting started mainly means connecting the model service you already use. You can authenticate with API keys or OAuth, and if you prefer local models, Ollama works as a provider too.
- Install the pi CLI using the current instructions in the docs at pi.dev
- Connect at least one model provider with an API key or OAuth
- Launch pi inside a project folder
- Ask it to explain the codebase or make a first small change
- Switch providers mid-session with /model or Ctrl+L
- Browse the package catalog to install extensions that fit your workflow
Use cases
- Exploring and explaining unfamiliar codebases
- Implementing features and fixing bugs across multiple files
- Writing tests, utility scripts, and one-off automations
- Running non-interactive jobs through print or JSON mode
- Building custom agent workflows with the SDK, the approach taken by projects like OpenClaw
- Comparing models and providers side by side in a single session
Pricing and licensing
Pi is free and open source under the MIT license, so the harness itself costs nothing and can be forked and modified freely. There is no proprietary subscription and no vendor lock-in to a single model provider.
What you do pay for is model usage. Pi connects to external providers, so costs follow the API pricing of whichever services you choose, from paid clouds all the way down to free local models through Ollama.
One thing to know before you go deep: Pi has no built-in permission or sandbox system. By default it runs with the permissions of the user who launched it, and the documentation recommends containerization patterns such as Docker or a micro-VM when you need stronger boundaries.
Pros and cons
The strongest points are openness and flexibility. Pi is fully open source, works with nearly any model provider, and lets you reshape the agent to match your workflow instead of adapting to someone else's. The tree-based session history, the provider-agnostic design, and the self-modifying extension system are features few rivals offer.
The trade-offs come from that same philosophy. Pi deliberately leaves out built-in conveniences like sub-agents and plan mode, so you add them as extensions or packages. It is terminal-first with no polished graphical interface, sandboxing is your responsibility, and the ecosystem is young enough that you may need to build or hunt for capabilities that ship out of the box in more mature tools.
Alternatives
- Claude Code: Anthropic's agentic coding tool with a mature feature set
- OpenAI Codex CLI: open source terminal coding agent from OpenAI
- Gemini CLI: Google's open source coding agent for the terminal
- OpenCode: open source coding agent that also runs in the terminal
- Aider: open source AI pair programming in the terminal
- GitHub Copilot CLI: Microsoft's terminal-based coding agent