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.

August 9, 2026
piterminal-agentcoding-agentminimalprompt-engineeringsetup

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. No built-in MCP, sub-agents, permission popups, or plan mode — you build or install those.

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,ls scopes 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.md conventions per project, loaded automatically.
  • System prompt files — replace or append to the default prompt with .pi/SYSTEM.md or ~/.pi/agent/SYSTEM.md.

Core Workflows

CommandWhat 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,lsRestrict to read-only analysis
pi --no-context-filesDisable AGENTS.md loading
/resumePick from previous sessions
/compact [prompt]Compact context, optionally with custom instructions
/templatenameExpand a prompt template into the editor
/skill:nameInvoke a skill directly

Frequently Asked Questions