SoL-Pi README

The project's README from github.com/NVlabs/SoL-Pi. As one markdown file: README.md.

SoL-Pi: Scaling Auto-Research Loops for Efficient Agent Harnesses

⚡ SoL-Pi: Scaling Auto-Research Loops for Efficient Agent Harnesses

arXiv: 2609.20519 Getting Started Configuration SoL-Pi Blog MIT License

[!NOTE] This repository contains the open-source version of SoL-Pi, a standalone extension for Pi. It is not an official distribution of Pi.

SoL-Pi is under active development to support pi-v1 and the latest model checkpoints.

📰 News

💡 TL;DR

Spend less without making the agent do less useful work.

SoL-Pi is a standalone extension for Pi that packages four reusable efficiency mechanisms discovered through scaled auto-research loops. It reduces repeated model turns, context replay, oversized observations, and unnecessary long-log reading while preserving the work and evidence an agent needs to finish a task.

SoL-Pi installs on top of an unmodified Pi release. Every mechanism is opt-in and disabled by default.

Introduction

Long-running coding agents accumulate repeated work. A file edit is often followed by a predictable validation command. Large tool results are replayed long after their first use. Completed subtasks remain in active context, and a frontier model may spend a full request reading a log when only a few lines affect the next decision.

SoL-Pi grew out of a broader question from our auto-research work: before scaling agent loops, can agents first make the harness itself more efficient? The search focused on constrained efficiency: reducing token traffic, inference work, and agent turns without stopping early, skipping verification, or hiding evidence.

The standalone release contains four mechanisms that survived that process. They operate at different parts of the harness and compose through Pi's public extension APIs.

What SoL-Pi Adds

Area Mechanism What changes
Tools Action Fusion An edit or write can run its follow-up validation command in the same tool call.
Observations ObservationPack Repeated large text results become stable handles with exact paged recall.
Delegation Evidence-Preserving Reducer Long diagnostic logs become compact receipts only when every retained quotation matches the archived source.
Context Online Context Compact Completed plan steps become candidate points for Pi's native compaction, subject to economic and window-pressure checks; after a successful compaction, Pi continues the task in a new turn.

The mechanisms share four rules:

Technical Details and Core Insights

Read the SoL-Pi blog for a deeper look at the technical details, design rationale, and core insights behind SoL-Pi, including how auto-research led to the four efficiency mechanisms and how they work.

Paper

Read our paper: SoL-Pi: Recursively Scaling Auto-Research Loops for Efficient Agent Harness.

Getting Started

Requirements

Install

Install the latest tested Pi release:

npm install --global @earendil-works/[email protected]

Pi 0.84.2 remains supported and tested; install @earendil-works/[email protected] instead to stay on it.

Then install SoL-Pi directly from NVlabs/SoL-Pi:

pi install git:github.com/NVlabs/SoL-Pi

To install it only for the current project, use the project-local scope:

pi install git:github.com/NVlabs/SoL-Pi --local --approve

Configure

SoL-Pi uses a single effective configuration. With the official Pi distribution, it looks for a sol-pi.json file in the following locations, in order:

  1. .pi/sol-pi.json in the current project, if the project is trusted and the file exists;
  2. ~/.pi/agent/sol-pi.json otherwise.

If neither file exists, SoL-Pi uses its built-in defaults. The project-level configuration takes precedence over the user-level configuration; the two files are not merged.

The following conservative configuration enables only the two local mechanisms that make no additional model calls and do not stop an active run:

{
  "version": 1,
  "actionFusion": true,
  "observationPack": true,
  "evidencePreservingReducer": false,
  "onlineContextCompact": false,
  "cacheWriteReadRatio": 12.5
}

Enable additional mechanisms only after reviewing their configuration and security implications. SoL-Pi uses no dedicated environment variables; feature flags, the reducer provider/model route, and the compaction ratio are configured in sol-pi.json. See sol-pi.example.json for a template listing every key.

For the complete schema, see Configuration. Coding agents and automated environments should follow the canonical agent installation and configuration protocol, which describes an all-enabled configuration checked with scripts/check-sol-pi-config.mjs --require-all-enabled.

Pi 1.x and codemode

SoL-Pi is tested with Pi 0.84.2, 1.0.4, and 1.3.0. All four mechanisms work with Pi codemode in both codemode.mode: "on" and "only". In "only" mode, the model reaches bash, edit, and write through codemode scripts, and Evidence-Preserving Reducer skips script calls, so it has no effect there. See Codemode for per-mechanism behavior.

To check the Pi that will load SoL-Pi, install the checkout's dependencies, then run the check from the checkout; --strict also fails on an untested Pi version. Without npm ci, the check cannot load TypeScript, prints a warning, and fails under --strict even on a tested Pi:

npm ci --ignore-scripts
node scripts/check-pi-compat.mjs --pi-root "$(npm root -g)/@earendil-works/pi-coding-agent"

Storage and Security

ObservationPack and Evidence-Preserving Reducer store session-specific archives under:

<session-directory>/sol-pi/<session-id>/
├── observation-pack/
└── evidence-preserving-reducer/

They archive eligible source material in this directory. The archived copies remain local and are not automatically deleted when the Pi session ends.

With pi --no-session or SessionManager.inMemory(), Pi provides no session directory. SoL-Pi instead creates a private directory named sol-pi-<session-id>-<random>/ under the operating system's temporary directory. ObservationPack and Evidence-Preserving Reducer share this directory for the lifetime of the loaded extension. These modes disable Pi's session-log persistence; SoL-Pi still writes archive files for exact recall. Temporary archives are also retained after the session or worker exits so callers can read referenced evidence. Their eventual cleanup follows the host's temporary-file policy or the caller's cleanup, and they are not guaranteed to survive system cleanup or support session recovery.

Online Context Compact stores its state in Pi's session log. After a successful compaction, it starts a new turn and automatically continues the active task; after a failed compaction, it continues the task without compacting and reports the error. Cancelling the compaction or exiting Pi does not trigger automatic continuation.

Evidence-Preserving Reducer may send eligible diagnostic-log content to its configured reducer model using Pi-managed authentication. Review SECURITY.md before enabling it. Do not enable remote reduction for logs that must remain local.

Documentation

Document Purpose
Configuration Config search order, schema, defaults, and trust behavior
Compatibility Supported Pi APIs and standalone integration details
Security Local storage, remote reduction, and sensitive behavior
Agent installation Reproducible installation and all-enabled validation procedure

Development

Install from the lockfile and run the complete source checks:

npm ci --ignore-scripts
npm run check
npm audit --audit-level=high
npm run check:pi

npm run check covers TypeScript, the complete test suite, and package inspection. npm run check:pi runs scripts/check-pi-compat.mjs against the development dependency; pass -- --strict to fail on warnings, or -- --pi-root <dir> to check another Pi installation. The development dependency set is pinned to Pi 1.3.0. To check another tested Pi version, install its four Pi packages over the development dependency (for 1.0.4 also pi-codemode, pi-mcp and chord at 1.0.4) and rerun the checks; runtime Pi packages remain peer dependencies so Pi owns their installation and upgrades.

Project Status

SoL-Pi is developed and maintained by NVIDIA as a standalone extension for Pi.

We welcome tested, Pi-compatible extension PRs that improve token efficiency and reduce token cost. Our team will help benchmark contributions, publish results on a regular reporting cycle, and credit authors of accepted PRs as Contributors. See CONTRIBUTING.md for details.

Acknowledgements

SoL-Pi builds on the public extension interfaces provided by Pi. Pi remains an independent upstream project and is not vendored into this repository.

License

SoL-Pi is released under the MIT License.

Star History

SoL-Pi star history chart

SoL-Pi (NVlabs/SoL-Pi)

Searching Database…

What is this?SoL-Pi is a standalone extension for the Pi coding agent that packages four efficiency mechanisms discovered through scaled auto-research loops. It cuts repeated model turns, context replay, oversized observations and long-log reading without dropping the work an agent needs.
Is this its own coding agent, or something I add to one I already run?An add-on, not an agent: it installs on top of an unmodified Pi release, imports only Pi's public extension APIs, and neither patches nor vendors the Pi source tree. It is also not an official Pi distribution.
Does it work with any version of Pi?No — it is tested against Pi 0.85.1 and needs Node.js 22.19 or newer plus npm. Runtime Pi packages remain peer dependencies, so Pi keeps owning its own installation and upgrades.
Do the savings start as soon as it is installed?No — every mechanism is opt-in and disabled by default, so a missing configuration leaves all four off. The conservative starting config enables only the two local mechanisms that make no extra model calls.
Does any of my session data leave my machine?ObservationPack and Reducer archives stay local and are not auto-deleted when a session ends. The catch: the Evidence-Preserving Reducer may send eligible diagnostic-log content to its configured reducer model — review SECURITY.md first and keep sensitive logs on local-only mechanisms.
What is Action Fusion?It lets an edit or write run its follow-up validation command inside the same tool call, so the agent does not spend a separate model turn on a predictable check.
What does ObservationPack do?Repeated large text results become stable handles with exact paged recall, and the originals are archived locally, so the agent saves tokens without losing access to the source.
How does the Evidence-Preserving Reducer avoid losing information?A long diagnostic log becomes a compact receipt only when every retained quotation matches the archived source; if that check fails, the original result is left unchanged.
Why did NVIDIA build this?It grew out of the team's auto-research work asking whether agents could make the harness itself more efficient before scaling agent loops. The four mechanisms are what survived a constrained search that forbade stopping early, skipping verification or hiding evidence.
Creator
NVlabs
Size
29.7 MB
Stars
3.7K
Updated
CommitOct 18
Age
2mo
Commits · 90 Days