NVIDIA's SoL-Pi Slashes Agent API Costs 33% with Recursive Self-Improvement
NVIDIA and Song Han's team open-source SoL-Pi, an automated research system that discovers four reusable harness optimizations—Action Fusion, Online Context Compact, ObservationPack, and Evidence-Preserving Reducer—cutting token usage by up to 49% and API costs by 33% while retaining over 93% task performance on EdgeBench and transferring gains to other benchmarks and multi-agent clusters.
As coding agents evolve from simple code completion to long-running autonomous task execution, they repeatedly read files, modify code, run tests, and analyze feedback. Each interaction round consumes tokens, and complex tasks with many rounds accumulate massive context and redundant tool outputs, driving up API costs. The core challenge is reducing Agent Harness running costs without noticeably sacrificing task completion ability.
To address this, NVIDIA researchers (including Song Han's team) open-sourced SoL-Pi , an automated research system inspired by Recursive Self-Improvement (RSI). SoL-Pi lets AI autonomously discover, test, and improve Agent Harness optimizations. The project has garnered 3.5k stars on GitHub.
Figure 1: SoL-Pi extended automated research loop.
Project GitHub stars (3.5k).
Automated Research Process: Broad-to-Deep Search
The team designed a Broad-to-Deep automated research workflow. First, a research agent analyzes base Harness execution traces, identifying inefficiencies such as repeated operations, context growth, and verbose tool outputs. From six categories (context, task progress, tools, delegated execution, prompts & strategies, improvement & evaluation), it proposes 152 candidate directions .
Each candidate enters an independent research loop: the AI proposes a modification, implements code, runs experiments, analyzes results, and decides to keep, revise, or discard. Implementation uses a Ralph Loop iteration mechanism where an independent reviewer checks the implementation; if it fails, the loop continues.
To avoid overfitting to a few test tasks, the team built 535 research environments : 495 GitHub Issue–PR task environments and 40 synthetic environments with executable validators. All candidates must satisfy predefined capability constraints and improve at least one efficiency metric. After search, implementations are frozen and independently validated to prevent leakage from test results back into the search loop.
Figure 2: Two research environment types supporting optimization discovery while keeping EdgeBench independent.
Figure 3: Development feedback and held-out evaluation remain separated throughout search.
This process yielded four reusable mechanisms integrated into SoL-Pi, each operating at a different stage of the agent–environment loop.
Figure 4: Four retained mechanisms operating at different stages of the agent–environment loop.
Four Core Optimization Mechanisms
1. Action Fusion
Traditional Pi executes coding tasks by calling a tool to modify a file, waiting for the model's next command, then running tests or builds. Action Fusion merges the file modification and its subsequent execution command into a single tool request, returning the execution feedback in one observation. For example, an edit-then-test sequence that originally required three API calls can be reduced to two. This cuts repeated decision overhead between consecutive actions, though step-by-step execution is retained when the next action depends on inspecting the modification result.
2. Online Context Compact
Long-horizon tasks accumulate history messages. Traditional context compression focuses on window length but ignores the cost of rewriting the compressed context back into the prompt cache. Online Context Compact leverages update_plan to maintain a task plan. At each plan step completion, it estimates future token overhead based on completed-step request count, remaining steps, and context growth rate. Compression (using Pi's native context compaction) is triggered only when projected input-cost savings exceed the cache-rewrite cost, or when context nears the window limit. This shifts context management from simple length control to dynamic decisions combining task progress and actual cost.
3. ObservationPack
Tool executions can produce large logs, file contents, and search results that re-enter context on every subsequent turn, incurring repeated input costs even after the model has read them. ObservationPack archives tool outputs exceeding 10 KiB locally. The first two model requests keep the full output; from the third request onward, the output is replaced with a stable reference ID, original size, and a ~1 KiB head/tail excerpt. The agent can re-read the full content via the reference ID when needed. This avoids repeated transmission of large payloads while preserving on-demand access to complete evidence.
4. Evidence-Preserving Reducer
For build and test logs of at least 4 KiB matching predefined command scopes, SoL-Pi employs a low-cost auxiliary model ( GPT-5.6 Luna (high) ) to extract error messages, execution status, and key evidence into a concise result record. A deterministic verifier then checks the record's format, original output hash, exit code, verbatim citations, and size. If verification fails, credentials are suspected, or compression yields no space savings, the original log is returned unchanged. The main model still handles final diagnosis and next-step planning.
Experimental Results
EdgeBench Benchmark
On EdgeBench, SoL-Pi was evaluated with GPT-5.6 Sol and Claude Opus 5 as backend models. Compared to the vanilla Pi Harness:
GPT-5.6 Sol : Total token traffic reduced 49.0% , API cost reduced 33.2% , average task score retained 93.7% (42.0 vs 44.8).
Claude Opus 5 : Total token traffic reduced 44.7% , API cost reduced 33.5% , average task score retained 94.3% .
Table 1: Harness performance comparison on EdgeBench (GPT-5.6 Sol).
Table 2: SoL-Pi configurations and cross-model transfer on EdgeBench.
Transferability was tested by applying the SoL-Pi configuration developed on GPT-5.6 Sol directly to Opus 5 without additional search or adaptation, achieving similar gains.
Terminal-Bench 4 and IMO 2026
On Terminal-Bench 4 and IMO 2026 (International Mathematical Olympiad problems requiring Lean 4 formalization), SoL-Pi solved 15 tasks versus 18 for Codex and Pi, but with 26.3% lower total model cost ($211.12 vs $286.45) and 11.6% lower average cost per solved task ($14.07 vs $15.91). On IMO 2026, SoL-Pi solved 3 of 6 problems at a total cost of $62.69, averaging $20.90 per solved problem—the lowest among the three harnesses.
Table 3: Harness performance on Terminal-Bench 4 and IMO 2026.
IMO 2026 evaluation with Lean 4 formal verification.
Multi-Agent Cluster Optimization
A further experiment evaluated SoL-Pi in a multi-agent collaborative setting using simulated machine cycles as the performance metric. Three configurations ran independently for two hours:
Single Agent : One Codex Agent (GPT-5.6 Sol xhigh).
Pi Multi-Agent Cluster : One Codex Coordinator managing 20 Workers using vanilla Pi Harness (Workers: GPT-5.6 Luna xhigh).
SoL-Pi Multi-Agent Cluster : One Codex Coordinator managing 20 Workers using full four-mechanism SoL-Pi (Workers: GPT-5.6 Luna xhigh).
All started from the same frozen starter program (147,734 machine cycles). Workers were divided into 5 groups of 4, sharing an Evidence Board; Coordinators exchanged results across groups. Only immutable candidate snapshots passing independent verification with strict improvement updated the global best.
Results: SoL-Pi cluster reduced machine cycles to 1,127 at an API cost of $60.11 ; Single Agent reached 1,333 cycles at $39.20; Pi baseline cluster reached 1,366 cycles at $82.12. Under the same time budget, SoL-Pi cluster cut API cost by 26.8% versus Pi cluster, though Single Agent remained cheapest. Both SoL-Pi cluster and Single Agent passed all 8 speed thresholds; Pi cluster passed only 7, failing the final threshold (<1,363 cycles). All submitted candidates passed official correctness checks.
Figure 5: Multi-agent cluster architecture and two-hour search experiment results.
These results indicate SoL-Pi's efficiency gains extend beyond single-agent runs to multi-agent systems, enabling more effective collaborative exploration within fixed budgets.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
SmartApe AI
SmartApe's AI technology content account, focusing on cutting-edge AI developments and open-source frontlines.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
