An all-in-one AI agent toolkit featuring a unified LLM API (15+ providers with subscription-based login), interactive coding agent CLI with tree-structured sessions and steering/follow-up messaging, agent runtime, terminal/Web UI libraries, and vLLM deployment utilities.
Overview#
Pi (Pi Monorepo) is a TypeScript monorepo developed by Mario Zechner (badlogic), providing a complete AI Agent infrastructure.
Core Packages#
| Package | Description |
|---|---|
@mariozechner/pi-ai | Unified multi-provider LLM API supporting 15+ providers |
@mariozechner/pi-agent-core | Stateful agent runtime with tool calling and event streaming |
@mariozechner/pi-coding-agent | Interactive coding agent CLI |
@mariozechner/pi-mom | Slack bot delegating messages to the coding agent |
@mariozechner/pi-tui | Terminal UI library with differential rendering |
@mariozechner/pi-web-ui | Web components for AI chat interfaces |
@mariozechner/pi-pods | CLI for managing vLLM deployments on GPU pods |
Key Features#
pi-coding-agent#
- 4 Operation Modes: interactive, print/JSON, RPC, SDK
- Session Management: Tree-structured sessions stored as JSONL files with
/treenavigation and/forkbranching - Context Engineering: Auto-loads
AGENTS.md/CLAUDE.md, auto-compression for context window - Message Queue Mechanism:
- Enter sends steering message (delivered after current tool, interrupts remaining tools)
- Alt+Enter sends follow-up message (delivered after agent completes all work)
Provider Support & Authentication#
Subscription Auth: Anthropic Claude Pro/Max, OpenAI ChatGPT Plus/Pro, GitHub Copilot, Google Gemini CLI, Google Antigravity
API Key Auth: Anthropic, OpenAI, Azure OpenAI, Google Gemini, Vertex AI, Amazon Bedrock, Mistral, Groq, Cerebras, xAI, OpenRouter, Vercel AI Gateway, ZAI, OpenCode Zen, Hugging Face, Kimi For Coding, MiniMax
Extension System#
Extensions are TypeScript modules that can register:
- Custom tools (or replace built-in tools)
- Custom commands and keyboard shortcuts
- Event handlers
- UI components (editor, status bar, footer, overlays)
Example capabilities: Sub-agents & plan mode, permission gates, SSH & sandbox execution, MCP server integration, custom compaction
Skills & Pi Packages#
- Skills: On-demand capability packages following Agent Skills standard, invoked via
/skill:name - Pi Packages: Bundle extensions, skills, prompts, themes; distributed via npm or git
Installation & Usage#
# Global installation
npm install -g @mariozechner/pi-coding-agent
# Using API Key
export ANTHROPIC_API_KEY=sk-ant-...
pi
# Or using subscription login
pi
/login
Common Commands#
/login,/logout- OAuth authentication/model- Switch model/tree- Navigate session tree/fork- Create new session from current branch/compact- Manually compact context