Pi: Four Tools, Zero Apologies

The creator of libGDX stripped an AI coding agent down to read, write, edit, and bash. It became the engine behind a 300K-star project.

March 2026 · 9 min read · badlogic/pi-mono

Key Takeaways
An editorial illustration showing four precision tools (a magnifying glass, a pen, a scalpel, and a terminal command line) arranged on a clean workbench. The tools are rendered in fine crosshatching detail against a pure white background, conveying the concept of extreme minimalism in software design.
Four tools. That's the whole agent.

Most AI coding agents ship with dozens of specialized tools, thousands of tokens of system prompt, and a feature list that reads like an aircraft manual. Pi ships with four tools, a system prompt under 1,000 tokens, and the conviction that everything else is noise.

That bet paid off. Pi is now the agent runtime powering OpenClaw, the fastest-growing repository in GitHub history, which blew past 300,000 stars in under two months. The project that proved less really can be more was built by someone who has spent two decades learning exactly that lesson.

4
Built-in Tools
<1K
System Prompt Tokens
22.6K
GitHub Stars
7
Monorepo Packages

The Case Against Complexity

Mario Zechner is best known for libGDX, the open-source Java game framework used by thousands of studios. He has spent 15+ years building tools that developers actually ship with. When he turned his attention to AI coding agents in late 2025, his instinct was the same one that shaped libGDX: figure out the smallest possible surface area that still gets the job done.

The catalyst was Claude Code. Zechner had been using it daily, but watched it grow into something he couldn't control.

"Over the past few months, Claude Code has turned into a spaceship with 80% of functionality I have no use for. The system prompt and tools also change on every release, which breaks my workflows and changes model behavior. I hate that. Also, it flickers."

Mario Zechner, Creator of Pi and libGDX · Blog Post

The flickering is a small detail, but it reveals the larger complaint. When a tool changes behavior between releases without telling you, when the system prompt balloons with instructions you never asked for, when features pile up faster than you can evaluate them, you lose the ability to reason about what your agent is doing. For someone who builds developer tools for a living, that's unacceptable.

So Zechner did what framework authors do. He built his own.


The Four-Tool Thesis

Pi's core argument is disarmingly simple. Modern frontier models (Claude, GPT-4, Gemini) have been trained so extensively on coding tasks that they already know how to be coding agents. You don't need to teach them with elaborate system prompts. You just need to give them the primitives.

"It turns out that all the frontier models have been RL-trained up the wazoo, so they inherently understand what a coding agent is. There does not appear to be a need for 10,000 tokens of system prompt."

Mario Zechner · Blog Post

Those primitives are exactly four tools:

read opens files. write creates them. edit modifies them with surgical precision. bash runs shell commands. That's the entire tool surface. No file search tool, no grep tool, no git tool, no browser tool. If the model needs to search files, it calls bash with grep. If it needs to check git status, it calls bash with git status.

A split editorial illustration comparing two toolboxes. On the left, an overflowing Victorian-era cabinet with dozens of drawers, gears, and tangled mechanisms spilling out. On the right, a clean leather roll containing exactly four hand tools, each in its own slot. The contrast illustrates the philosophical difference between feature-heavy and minimalist agent design.
The conventional approach versus Pi's philosophy: four tools that compose into everything.

The insight is that specialized tools don't add capability. They add tokens. Every tool definition in the system prompt consumes context window space that could be used for actual reasoning. And specialized tools are rigid. A grep_tool can only grep. But bash can grep, awk, sed, curl, git, docker, and anything else on the system. The model already knows how to use all of these.

"As it turns out, these four tools are all you need for an effective coding agent."

Mario Zechner · Blog Post

The Monorepo

Pi lives in badlogic/pi-mono, a TypeScript monorepo managed with npm workspaces. Seven packages, each with a clear responsibility. No package does two things.

pi-mono: 7 Packages pi-coding-agent CLI, TUI, 4 tools pi-mom Slack bot integration pi-pods vLLM GPU pod manager User-facing pi-agent-core Agent runtime, tools, state pi-tui Terminal UI, diff rendering pi-web-ui Web components for chat Libraries pi-ai Unified LLM API (15+ providers) Foundation
The pi-mono architecture. Everything flows down to pi-ai, the unified LLM abstraction layer supporting OpenAI, Anthropic, Google, and 12+ more providers.

At the bottom sits pi-ai, a unified API that speaks to 15+ LLM providers: Anthropic, OpenAI, Google, Azure, Bedrock, Mistral, and others. You can switch models mid-session. One conversation, multiple providers, no code changes.

pi-agent-core is the runtime. It handles the tool-calling loop, state management, and session persistence. Sessions are stored as tree-structured files (not flat logs) that you can filter, bookmark, branch, and export as HTML or GitHub gists.

pi-tui is a terminal UI library with differential rendering. pi-web-ui provides web components for chat interfaces. pi-mom is a Slack bot that delegates messages to the coding agent. And pi-pods manages vLLM deployments on GPU pods for self-hosted inference.

The top-level package, pi-coding-agent, wires it all together into the CLI that developers actually interact with.


What Pi Deliberately Doesn't Have

The feature list of what Pi excludes is more revealing than what it includes. There are no MCP servers ("overkill for most use cases, and they come with significant context overhead"). No sub-agents. No permission popups. No plan mode. No built-in to-do tracking. No background bash processes.

Zechner's philosophy is blunt: if you can do it with a file, don't build a feature for it.

"If you need task tracking, make it externally stateful by writing to a file. If you need persistent planning across sessions, write it to a file."

Mario Zechner · Blog Post

This isn't laziness. It's a deliberate design choice rooted in composability. A plan written to a file can be read by any tool, any script, any other agent. A plan stored in a proprietary internal state format is locked in.

The same logic extends to security. Pi runs in what Zechner calls "full YOLO mode." No permission prompts for file operations or commands. His reasoning: if an agent can read your data, execute code, and access the network, the security boundary is already gone. Permission dialogs create an illusion of safety without providing it. Run Pi in a container if you want isolation.


Extensibility Over Features

Pi compensates for its minimal core with an aggressive extension system. Everything Pi doesn't build in, you can build on top. Extensions are TypeScript modules with access to tools, commands, keyboard shortcuts, events, and the full UI. There are 50+ examples in the repo.

The extension surface is deliberately broad. You can add new tools, hook into the agent lifecycle, create custom commands, modify the terminal UI, or intercept and transform messages. Skills (reusable prompt packages) and pi-packages (shareable via npm or git) round out the ecosystem.

Pi runs in four modes: interactive TUI for daily use, print/JSON mode for scripting, RPC for process integration, and an SDK for embedding the agent in your own applications. This means Pi isn't just a CLI tool. It's an agent framework that happens to ship with a very good CLI.

"Pi SDK > Claude Agent SDK. It's efficient and reliable. The TUI even runs Doom. You can tell real care went into this."

cedric_chee, Developer · X (Twitter)

The OpenClaw Connection

OpenClaw is a local-first personal AI assistant that runs on your own devices and connects to the messaging platforms you already use: WhatsApp, Telegram, Slack, Discord, Signal, iMessage, and a dozen more. It launched in late January 2026 and became the fastest-growing repository in GitHub history, crossing 100K stars in two days and surpassing React to become one of the most-starred software projects on the platform.

Under the hood, OpenClaw uses Pi's agent runtime in RPC mode. The gateway architecture pipes messages from any channel into Pi, which processes them with its four-tool approach, and sends responses back. Pi's minimalism turned out to be an asset at scale: fewer tools means fewer failure modes, smaller context windows, and faster inference.

An editorial close-up illustration of a compact, precisely engineered clockwork mechanism at the center of a much larger machine. The small central mechanism has only four visible gears, each labeled, while the surrounding machine extends outward with dozens of channels and pathways. This represents Pi as the minimal engine at the heart of OpenClaw's massive multi-channel architecture.
Pi's four-tool core powers OpenClaw's multi-channel messaging architecture.

The irony is rich. The coding agent built by one person with a "shitty coding agent" self-deprecating brand now powers a project with 300K+ stars. Zechner's bet that models don't need hand-holding turned out to be correct at a scale he probably didn't anticipate.


How Pi Stacks Up

Claude Code Cursor Pi
Built-in tools 20+ specialized tools IDE-integrated tool suite 4 (read, write, edit, bash)
System prompt ~10,000+ tokens Varies by context <1,000 tokens
Permission model Per-action approval IDE sandboxed None ("full YOLO")
Extension system MCP servers, slash commands Plugins, rules TypeScript modules, skills, packages
LLM providers Anthropic only Multiple (via proxy) 15+ native, mid-session switching
Session format Proprietary Proprietary Tree-structured, exportable
Observability Limited Limited Full trace inspection
Embeddable Agent SDK No SDK, RPC, JSON mode

The comparison isn't meant to declare a winner. Claude Code and Cursor are excellent tools with different design philosophies. The point is that Pi occupies a genuinely distinct position: maximum composability, minimum opinion. If you want guardrails and a curated experience, Claude Code is probably the better choice. If you want a transparent, controllable runtime you can bend to your exact workflow, Pi was built for you.


Context Engineering as First Principle

Zechner's emphasis on observability sets Pi apart from tools that treat the LLM interaction as a black box. Every session is a tree, not a log. You can inspect exactly which sources the agent looked at, which ones it missed, and how its context window was spent.

"I want to inspect every aspect of my interactions with the model. I want a cleanly documented session format I can post-process automatically, and a simple way to build alternative UIs on top of the agent core."

Mario Zechner · Blog Post

Pi includes automatic message compaction (trimming old context to stay within the window), AGENTS.md and SYSTEM.md files for project-level instructions, and prompt templates for repeatable workflows. The session tree can be exported as HTML for sharing or as GitHub gists for collaboration.

This matters because the hard part of building with LLMs isn't the model. It's the context. What goes in, what gets trimmed, what the model sees versus what you think it sees. Pi makes that visible by default, not as a debug mode you have to enable.


The Minimalism Bet

Pi is a bet that the age of bloated AI tooling is ending. As models get smarter, the harness around them should get thinner. You don't need 20 specialized tools when the model can compose four primitives into anything. You don't need 10,000 tokens of instruction when the model already knows what a coding agent does.

Zechner's track record suggests he might be right. libGDX succeeded for the same reason: it gave game developers the primitives they needed and stayed out of the way. Fifteen years later, thousands of games have shipped on it. Pi is the same philosophy applied to a new domain.

"Forget that it's a coding agent by default: it's a neat, fast, well-thought agent framework. You can build any shit with it, quickly. It's become my go-to during the break."

Ramón Medrano, Developer · X (Twitter)

The question isn't whether four tools are enough today. The question is whether they'll still be enough as models continue to improve. If Zechner's thesis holds, the answer is yes, and the agents that survive will be the ones that trusted the model to do its job.