Pi
Minimal agent harness for AI coding — lightweight, extensible CLI with 15+ LLM providers and tree-structured sessions
62K
GitHub Stars
15+
LLM Providers
4
Operational Modes
Overview
Pi is a minimal agent harness designed for AI coding workflows, emphasizing adaptability over rigid structure. Rather than imposing opinions, Pi lets developers customize through extensions, skills, and prompt templates. The toolkit includes a unified multi-provider LLM API (@earendil-works/pi-ai), an agent runtime with tool calling and state management (@earendil-works/pi-agent-core), and an interactive coding agent CLI (@earendil-works/pi-coding-agent). Pi is notable for offering a credible "self-hosted model, code never leaves the boundary" path out of the box, driving interest from regulated industries.
The Verdict
Who Should Use Pi?
Best For
- Developers wanting a lightweight, unopinionated agent harness
- Teams in regulated industries needing self-hosted options
- Power users who want to extend and customize their workflow
- Developers who prefer TypeScript-based tooling
- Those needing mid-session model switching across providers
Not Ideal For
- Users wanting batteries-included features (MCP, sub-agents, permissions)
- Non-technical users needing guided workflows
- Teams requiring built-in plan mode or to-do tracking
- Those preferring opinionated, all-in-one solutions
What's Great
- Minimal footprint — intentionally excludes bloat
- 15+ LLM providers with mid-session switching
- Tree-structured sessions with HTML/gist export
- Self-hosted model path for data-sensitive environments
- TypeScript extensions for custom commands and tools
- AGENTS.md and SYSTEM.md for project-level instructions
- Strong community adoption
Watch Out For
- No built-in MCP integration (requires extension)
- No built-in sub-agents, plan mode, or to-do tracking
- No permission popups — less guardrails by default
- Requires TypeScript knowledge for deep customization
- Minimalist philosophy may require more setup
Pricing
View all features & details
Operational Modes
- Interactive TUI
- Print/JSON output
- RPC protocol
- SDK for embedding
LLM Providers
- Anthropic (Claude)
- OpenAI
- Azure
- AWS Bedrock
- Mistral
- 10+ more via config
Context Engineering
- AGENTS.md project instructions
- SYSTEM.md system prompts
- Automatic message compaction
- Skills system
- Tree-structured history
Packages
- @earendil-works/pi-coding-agent
- @earendil-works/pi-agent-core
- @earendil-works/pi-ai
How It Compares
| Feature | Pi | Claude Code | Cursor | Aider |
|---|---|---|---|---|
| Philosophy | Minimal harness | Full-featured | IDE-integrated | Git-focused |
| LLM Providers | 15+ | Anthropic | Multiple | Multiple |
| Self-Hosted Path | Built-in | No | No | Yes |
| MCP Support | Extension | Native | No | No |
| GitHub Stars | 62K | 30K+ | N/A | 25K+ |
| Extensibility | TypeScript | Skills | Extensions | Plugins |
User Reviews
Loading reviews...