Technology RadarTechnology Radar

Pi (Coding Agent)

agentopen-sourceframework
Trial

Pi is Mario Zechner's (libGDX creator) minimal open-source terminal coding agent — four tools (read, write, edit, bash), a system prompt under 1,000 tokens, and a TypeScript extension system. Best known as the runtime engine that powers OpenClaw, the most-starred software repository on GitHub. Available at shittycodingagent.ai (also buildwithpi.ai).

The Minimal Philosophy

Pi's defining characteristic is deliberate restraint. Where other coding agents accumulate tools, permissions systems, and specialised subsystems, Pi asks: how little do you actually need?

From Mario Zechner's November 2025 design post: what you leave out matters more than what you put in. A 4-tool harness with a sub-1,000-token system prompt forces the model to be the intelligence, rather than hiding model limitations behind scaffolding complexity. The result is a system that's easy to inspect, extend, and debug — and has proven capable enough to underpin OpenClaw's 357,000-star ecosystem.

Architecture

Pi operates in four modes:

Mode Use case
Interactive Default terminal TUI for developer conversations
Print / JSON Scripting and pipeline integration
RPC Process-to-process tool-call streaming (how OpenClaw uses it)
SDK Embed Pi as a library inside another application

The four core tools cover essentially all file-system and execution needs: read (file contents), write (create/overwrite), edit (targeted replacement), bash (arbitrary shell).

Sessions are trees. Pi sessions branch — you can open a side-quest context to fix a broken extension or investigate a bug, then rewind to the main session; Pi summarises what happened on the other branch. This makes workflows like "branch into a fresh context for code review, bring fixes back to main" a first-class operation.

No native MCP — by design. Pi deliberately omits MCP support. The reason is architectural: MCP tools must be loaded into the system context or tool list at session start, making it impossible to fully reload tool definitions mid-session without trashing the cache or confusing the model about prior invocations. Pi's answer to new capabilities is self-extension: ask the agent to write the tool itself, then hot-reload it without disrupting the session. Teams needing MCP connectivity can use mcporter (by Peter Steinberger), which exposes MCP calls via a CLI interface that any bash-capable agent can call.

Extension System

Pi packages (TypeScript) distribute via npm or git and can add:

  • Custom LLM tools registered into the model's tool-call context
  • Slash commands for session-scoped workflows
  • TUI components rendered directly in the terminal (spinners, progress bars, file pickers, data tables — Pi's TUI is flexible enough that Mario demonstrated running Doom in it)
  • Persistent extension state stored in session files alongside model messages, surviving compaction
  • Hot reloading so the agent can write code, reload, and test in a loop within the same session

The self-extension pattern: rather than downloading an existing extension, point Pi at an existing one and ask it to build a variant to your specification. Armin Ronacher describes his full set of personal extensions — /answer, /todos, /review, /control, /files — as agent-written, not downloaded. This is how OpenClaw extended Pi into a multi-channel personal assistant without modifying Pi internals.

Multi-Provider Support

Supports 15+ LLM providers via unified API and subscription bridges:

Type Providers
Subscription Anthropic Claude, OpenAI ChatGPT, GitHub Copilot, Google Gemini
API key Azure OpenAI, Mistral, Groq, xAI, OpenRouter, Ollama, and more

Provider switching mid-conversation is supported.

Why Trial

Pi has 35,200+ GitHub stars, MIT licence, and the highest-signal endorsement available: it became the runtime for OpenClaw, which reached 357,000 stars (surpassing React as GitHub's most-starred repository). The design philosophy is validated by real-world scale.

  • Minimal, readable codebase: Easy to audit for security or fork for custom needs
  • Stable API: The 4-tool interface has remained stable; extensions handle everything else
  • Legitimate maintainer: Mario Zechner is a respected open-source developer with a long track record (libGDX, ~18 years of game dev tooling)
  • Zero security incidents: Pi's own CVE list is clean — the security incidents associated with "the Pi ecosystem" are specific to OpenClaw's gateway and ClawHub marketplace, not Pi itself

Not Trial+: Pi is still primarily the infrastructure layer. Teams picking Pi directly (rather than through OpenClaw) are mostly researchers and custom harness builders. General developer adoption happens through OpenClaw or extensions.

When NOT to Use

  • Teams wanting a batteries-included tool with built-in permission systems, memory, or MCP should look at Claude Code, OpenCode, or Goose instead
  • The 4-tool philosophy requires extension work for anything beyond file editing + bash — plan for TypeScript extension development if you need workspace-specific behaviour

Getting Started

npm install -g @mariozechner/pi-coding-agent
pi

Key Characteristics

Property Value
Interface Terminal TUI + CLI
Provider Mario Zechner (badlogic)
License MIT
Language TypeScript
Tools 4 (read, write, edit, bash)
System prompt <1,000 tokens
GitHub stars ~35,200 (April 2026)
GitHub badlogic/pi-mono
Website shittycodingagent.ai / buildwithpi.ai

Sources