pi
A lightweight, customizable terminal agent harness for developers to adapt AI workflows to their needs with support for multiple models and extensible features.
pi is an open-source alternative to:

Pi is a minimal agent harness designed for developers who want to adapt AI workflows to their own processes rather than the other way around. It runs in the terminal and offers powerful customization through extensions, skills, prompt templates, and themes.
Key Features
- Minimal & Customizable: Skip bloated features like sub-agents and plan mode. Build exactly what you need.
- Multi-Model Support: Switch between 15+ providers (Anthropic, OpenAI, Google, Ollama, etc.) mid-session with
/modelorCtrl+L. - Tree-Structured History: Sessions are stored as trees. Navigate to any prior point with
/tree, export to HTML, or share via GitHub gist. - Context Engineering: Load project-specific instructions via AGENTS.md, SYSTEM.md, and skills. Customize compaction strategies.
- Four Operational Modes: Interactive, print/JSON, RPC, and SDK for programmatic usage.
- Extensible Architecture: Add custom providers, models, and UI tweaks via extensions. Bundle as Pi packages and share via npm or git.
- Token Efficiency: Minimal system prompt ensures efficient token usage.
Tech / Self-Hosting
Pi is open source and can be self-hosted. Installation options include: ``bash curl -fsSL https://pi.dev/install.sh | sh powershell -c "irm https://pi.dev/install.ps1 | iex" npm install -g --ignore-scripts @earendil-works/pi-coding-agent pnpm add -g --ignore-scripts @earendil-works/pi-coding-agent bun add -g --ignore-scripts @earendil-works/pi-coding-agent ``
Pi supports custom installations and can be extended with third-party packages like @termdraw/pi for enhanced TUI capabilities.