Pi — Terminal AI Coding Agent
Complete guide to pi, Mario Zechner's minimal terminal coding agent. Covers installation, prompt engineering, context files, skills, and the lean-harness philosophy.
Pi — Terminal AI Coding Agent
Pi is Mario Zechner's (Earendil Inc.) minimal terminal coding agent harness. It ships with four built-in tools (read, bash, edit, write — plus grep, find, ls) and a system prompt of roughly 300 words, making it one of the leanest agents available.
The design principle is explicit: pi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages. Built-in MCP support is included (pi mcp, builtin:mcp, --no-mcp); sub-agents, permission popups, and plan mode are not — you build or install those.
Navigation
- Prompt Engineering — Context files, system prompts, slash commands, prompt patterns
- Pi Coding Agent (Agents Section) — Platform overview and ecosystem
Quick Start
# Install pi
curl -fsSL https://pi.dev/install | bash
Run a prompt in your project:
cd my-project
pi "Review the auth middleware for security issues"
Pi loads AGENTS.md or CLAUDE.md at startup — from ~/.pi/agent/AGENTS.md (global), walking up from the working directory, and the current directory. Write dense, command-oriented conventions there so every session starts with your project's context.
What Makes Pi Different
- Minimal core — four built-in tools and a ~300-word system prompt. Everything else is opt-in.
- Extensions & skills — workflow-specific behavior lives in extensions, skills, and prompt templates, not in prose.
- Tool allowlists —
--tools read,grep,find,lsscopes the agent to safe, read-only work in one flag. - Message queueing — queue steering and follow-up messages while the agent is working, like live pairing.
- Context files — persistent
AGENTS.mdconventions per project, loaded automatically. - System prompt files — replace or append to the default prompt with
.pi/SYSTEM.mdor~/.pi/agent/SYSTEM.md.
Core Workflows
| Command | What it does |
|---|---|
pi -p "prompt" | Run a single prompt non-interactively |
pi @code.ts @test.ts "prompt" | Scope context to specific files |
pi --tools read,grep,find,ls | Restrict to read-only analysis |
pi --no-context-files | Disable AGENTS.md loading |
/resume | Pick from previous sessions |
/compact [prompt] | Compact context, optionally with custom instructions |
/templatename | Expand a prompt template into the editor |
/skill:name | Invoke a skill directly |
Frequently Asked Questions
Related Resources
- Prompt Engineering in Pi — context files, system prompts, slash commands, prompt patterns
- Pi Coding Agent (Agents Section) — platform overview and ecosystem
- Agent Skills (Agents Section) — cross-tool SKILL.md standard
- Jcode Prompt Engineering — the batteries-included alternative
- Tool Comparison — jcode vs pi vs opencode vs Claude Code
Sources
Related Articles & Guides
Jcode — AI Coding Agent
Complete guide to jcode, the RAM-efficient open-source AI coding agent in Rust. Covers installation, prompt engineering, configuration, memory, swarms, and advanced workflows.
#ompOh My Pi (OMP): Install, Connect Providers, and Start Coding
Install Oh My Pi (OMP), connect Anthropic, OpenAI, or OpenCode Go, pick a model, and run a small inspect-change-verify-resume workflow.
Prompt Engineering in Pi
Master prompt engineering for pi, the minimal terminal coding agent. Context files, system prompt files, slash commands, message queueing, and the four built-in tools.