pi

Harness layer — the agent program, not a process framework and not an execution runtime. A harness loads a framework’s skills/commands and drives the model’s tool-call loop; it performs no SDLC stage and connects to the ontology only through the execution primitives it enables: as patterns. Frameworks runs_on: it; runtimes runs: it.

pi (Mario Zechner / badlogic, libGDX’s creator; now published by Earendil Inc., MIT) is the wiki’s minimal-core terminal harness. Its signature is what it deliberately leaves out: the core ships four tools (read, write, edit, bash) and pushes everything else — sub-agents, MCP, permission prompts, plan mode, to-dos — into an opt-in TypeScript extension system. It is model-agnostic (Anthropic/OpenAI/Google/Groq/xAI/Ollama/Kimi/… via one LLM API, with mid-session model switching) and terminal-only (TUI + print/JSON + an RPC mode + an embeddable SDK; no first-party IDE/desktop/web GUI). It is the opposite pole from batteries-included harnesses like claude-code and opencode.

What it provides (a minimal core)

  • Four built-in tools — read · write · edit · bash. That is the whole default toolset.
  • Skills & prompt templatesSkills (capability packages under ~/.pi/agent/skills/) invoked /skill:name; Markdown prompt templates invoked /<template>.
  • Context filesAGENTS.md + SYSTEM.md loaded from ~/.pi/agent/, parent dirs, and cwd; context compaction with customizable summarization.
  • Sessionstree-structured, shareable, resumable session history at ~/.pi/agent/sessions/.
  • Model access — model-agnostic via @earendil-works/pi-ai; mid-session switching.
  • Deliberately NOT in core — sub-agents, MCP, permission popups, plan mode, background bash: all excluded from core and delivered only as TypeScript extensions or third-party packages. This is the design thesis, not a gap.

Interaction surface

Terminal TUI (native), plus print/JSON modes, an RPC interface (JSON over stdin/stdout), and an embeddable SDK. No first-party IDE/desktop/web GUI — hence subtype: terminal.

Harness profile

Capabilitypi
Skill / command formatSkills (/skill:name) · Markdown prompt templates · AGENTS.md + SYSTEM.md
Sub-agentsnot in core — via extension only
MCPnot in core — via extension only
Hooks / extensibilityTypeScript extension system (the primary extensibility surface) + SDK; Rust impl exists
Permissions & guardrailsnot in core — relies on containerization/sandboxing or extensions
Model accessmodel-agnostic — many providers; mid-session switching
Memory & context filesAGENTS.md + SYSTEM.md; context compaction (customizable summarization)
Interaction surfaceterminal TUI · print/JSON · RPC · SDK (no GUI)
Distribution / licenseEarendil Inc. (Zechner), MIT / open source; npm @earendil-works/pi-coding-agent

Distinctive contribution

pi is the minimalist pole of the harness layer and the clearest evidence that “harness primitive” is a real, variable property rather than a given. Where claude-code and opencode both provide sub-agents and mutation guardrails as first-class primitives, pi provides neither in core — so pattern-fresh-context-subagents and pattern-edit-guardrails have no harness-side entry for pi, even though a framework that assumes them can still run on pi via extensions. A framework’s portability to pi therefore depends on whether it needs a primitive pi omits: this is exactly the cross-harness question the harness layer exists to make visible. (It is the harness-layer analogue of nano-spec’s minimalism in the process layer.)

Patterns provided

Only the two primitives pi keeps in its core qualify — a deliberately short roster:

  • pattern-session-handoff — tree-structured, resumable, shareable sessions plus context compaction carry working context across a boundary at the harness level; arguably pi’s signature.
  • pattern-context-engineeringAGENTS.md + SYSTEM.md + skills + customizable compaction assemble the right context per turn.

It does not provide pattern-fresh-context-subagents or pattern-edit-guardrails as core primitives (extension territory) — the one harness here that omits them.

See Also