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.
- Pi is a coding agent built on just four tools (read, write, edit, bash) and a system prompt under 1,000 tokens, rejecting the industry trend toward feature bloat.
- Its creator, Mario Zechner of libGDX fame, argues that frontier models already know how to be coding agents and don't need elaborate scaffolding.
- Pi's minimal runtime now powers OpenClaw, the fastest-growing repository in GitHub history with over 300,000 stars.
- The project proves that composability and transparency can outperform specialization at scale.
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.
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."
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."
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.
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."
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.
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."
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."
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.
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."
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."
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.