Wink Pings

Heavyweight Agent Consumes 22% of Context on the First Turn; Pi Uses Only 1.5%

Pi's Agent Harness design has been turned into an interactive visual tutorial. The most striking set of numbers: with the same 200k context window, a heavyweight Harness already occupies 22% before the first-turn request, while Pi occupies only 1.5%.

X/Twitter user Chasen used Gemini 4 Neon to build an interactive visualization webpage specifically breaking down the design of Pi (earendil-works/pi), an Agent framework. Instead of dry documentation, you can follow the steps and see how the state changes. If you want to learn Pi or understand how to design an Agent Harness, you can jump right in and play with it.

The visualization breaks down several key design decisions in Pi:

① How 4 tools—read, bash, edit, write—support an Agent
② Why MCP tools, before they are even used, may already take up a large chunk of context
③ Why Pi does not stuff Plan Mode, subagents, and permission pop-ups all into the core
④ Which capabilities should be built in and which should be left to extensions

The most intuitive part is a set of comparison data. Based on a 200k context window, a typical heavyweight commercial Harness has already used about 43.7k tokens for system prompts plus preloaded MCP Schemas before the first request is sent, accounting for 22% of the window. On Pi's side, the system prompt plus definitions for 4 tools total less than 1,000 tokens; adding the first task at 2k, the first turn is about 3k, or 1.5% of the window. It saves about 40k tokens on the first turn.

The gap mainly comes from two places: one is a system prompt of tens of thousands of tokens, and the other is full preloading of the Schemas for dozens of MCP tools.

The webpage is made in course format: 6 chapters and 14 lessons, covering design philosophy, the two-layer main loop, the message pipeline, tools and caching, the JSONL tree, and the extension ecosystem. Each lesson is broken into 7–9 steps and comes with a quick-reference sheet. The first chapter explains 'why Pi dares to be anti-framework,' using comparison diagrams to visualize the numbers above.

Some online users said this learn-by-playing approach is easier to understand than just reading documentation. Some asked whether other systems could also be turned into similar visualizations, such as Antigravity FAQ, DeepSeek Harness, and computer science courses.

URL: https://pi-visualizer-lemon.vercel.app/

发布时间: 2026-11-22 14:39