跪拜 Guibai
← Back to the summary

Pi‑Agent on DeepSeek Beats Claude‑Code at 1/7 the Cost

Foreword

Recently, Composio's evaluation of 30 high-difficulty engineering Agent coding tasks set the developer community abuzz. With the underlying model uniformly set to DeepSeek‑V4‑Flash, Pi‑Agent's overall performance directly surpassed Claude‑Code, achieving a higher pass rate, lower token overhead, and a per-task cost only 1/7 that of Claude‑Code.

image.png

image.png Many people marveled at the strength of the domestic base model DeepSeek, but few noticed that the Pi framework's founder had long been convinced that 'lightweight Agent scheduling + high-performance domestic large models' would be the optimal route. Now, the real-world test data has confirmed his prediction.

1. Hardcore Test Data: The Gap Comes from the Scheduling Framework, Not the Large Model

This evaluation strictly controlled variables: all Agents were equipped with the DeepSeek‑V4‑Flash base model, shared the same set of tool capabilities, and faced 30 hardcore development tasks covering multi-file refactoring, bug fixes, and script deployment. The only variable was the Agent scheduling shell.

Table

Agent Framework Task Pass Rate Time per Task Cost per Successful Task
Pi‑Agent 66.7% (20/30) 132.2s $0.028
Claude‑Code 53.3% (16/30) 122.7s $0.195

There was another comparative test on 8 code defect repair tasks, also using DeepSeek‑V4‑Flash: Claude‑Code took an average of 8 minutes, while Pi‑Agent needed only 2.1 minutes, with code output quality being essentially on par.

The core truth: What determines the upper limit of an AI coding Agent is never just the underlying large model. The scheduling architecture, prompt volume, caching strategy, and tool design are the keys that create the gap.

2. Pi‑Agent: A Minimalist Terminal Coding Agent

Pi was created by Mario Zechner, the developer of the well-known game engine libGDX. From its inception, it took a lightweight path diametrically opposed to Claude‑Code.

1. Minimalist Core Design

  1. The system prompt is less than 1,000 tokens; Claude‑Code's system prompt is as high as 7,000-15,000 tokens, consuming massive context overhead on every startup.
  2. Only 4 basic tools are open by default: read file, write file, terminal execution, and text editing; it discards a pile of redundant orchestration pipeline tools used for internal state passing.
  3. MIT open-source and free. Developers can bring their own API keys to access DeepSeek and various large models, with no subscription threshold.

In contrast, Claude‑Code has over twenty built-in tools, many of which only handle internal state flow and have nothing to do with writing code. Each round of conversation generates a large amount of invalid token consumption, with fixed overhead reaching over twenty thousand tokens.

2. Ace Card: A Near-Perfect Context Caching Mechanism

When Pi's dedicated caching architecture is paired with the DeepSeek model, the cache miss rate drops as low as 0.03%~0.07%. In tests processing engineering tasks with nearly 1 billion tokens, the total cost with caching enabled was only $2.65; with caching disabled, the overhead soared to $132. The ultra-high cache hit rate eliminates most repeated context uploads, which is the core killer feature behind its low-cost operation.

3. The Founder Bet on the DeepSeek Route Early On

The Pi team began adapting the entire DeepSeek model series very early. The founder judged that bulky, bloated, closed-source Agent architectures with ultra-long prompts were not a long-term direction. A lightweight scheduling shell, with a high-performance, low-cost domestic code base handling the reasoning, could achieve a double crush in capability and cost-effectiveness once adapted. The evaluation results have now validated his initial judgment.

3. In-Depth Architecture Comparison: Pi‑Agent vs. Claude‑Code

Claude‑Code (Bulky Closed-Box Route)

  1. Closed-source commercial tool, requiring an Anthropic subscription or high-priced API fees.
  2. Ultra-long system prompt of over ten thousand tokens, over twenty built-in tools, with many internal pipelines generating invalid tokens.
  3. Black-box scheduling logic; developers find it hard to customize context or control token flow.
  4. Ordinary caching strategy; context is repeatedly uploaded when reading project files, keeping costs high.

Pi‑Agent (Minimalist Controllable Route)

  1. Open-source MIT license, fully capable of secondary development, local deployment, and custom plugins.
  2. Streamlined prompt within a thousand tokens, keeping only essential coding tools.
  3. TypeScript plugin extension system; developers add capabilities on demand, rejecting pre-installed redundant functions.
  4. High-performance context caching, drastically reducing token consumption from repeated file reads.

In simple terms: Claude‑Code encapsulates complexity inside the framework; Pi‑Agent hands control back to the developer.

4. Industry Insight: Base Models and Agent Shells Need Separate Selection

  1. Don't blindly trust native Agent pairings. Even when Anthropic's own Claude‑Code is equipped with its own Claude large model, its overall efficiency still cannot beat the DeepSeek+Pi‑Agent combination. The base model and the scheduling framework are two independent components that can be freely matched.
  2. Lightweight Agent architecture is becoming a trend. Bulky, all-in-one tools and ultra-long system prompts have become a performance burden. The more streamlined the scheduling shell, the more it can unleash the reasoning power of the large model itself, reducing invalid token overhead.
  3. Domestic large models have an excellent ecosystem opportunity. With its powerful coding ability and low API pricing, DeepSeek, when adapted to high-quality overseas open-source Agent frameworks, can directly create a terminal coding assistant that crushes overseas closed-source products in cost-effectiveness, making it very suitable for the daily automated development of domestic programmers.

5. Developer Selection Advice

Conclusion

This evaluation is essentially a showdown between two development philosophies: a bloated, all-powerful black-box Agent versus a minimalist, controllable lightweight scheduling framework. The founder of Pi saw the direction early on: an excellent base handles reasoning, and a lightweight shell handles scheduling. When the high-performance domestic DeepSeek meets the minimalist Pi‑Agent, a powerhouse combination is born.