# SoL-Pi

> Token-efficiency extension for the Pi coding agent, from NVIDIA's research lab

- Category: AI Coding / Coding-Agent Harnesses & Runtimes
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/NVlabs/SoL-Pi
- Website: https://nvlabs.github.io/SoL-Pi/
- Canonical page: https://ai-tldr.dev/tools/sol-pi/
- Updated: 2026-09-17

## In short

SoL-Pi is a standalone extension for the Pi coding agent that packages four reusable efficiency mechanisms. It does not replace the agent or change which model drives it — Pi still controls the main model through its own configuration. It sits in the Coding-Agent Harnesses & Runtimes category of the AI Coding tools and is open-source, written in TypeScript and licensed MIT.

## Overview

SoL-Pi is a standalone extension for the Pi coding agent that packages four reusable efficiency mechanisms. It does not replace the agent or change which model drives it — Pi still controls the main model through its own configuration. What SoL-Pi changes is how many tokens and how many model turns the agent spends getting to the same result on long-horizon coding tasks.

The four mechanisms are Action Fusion, which merges a file edit and the command that immediately follows it into a single tool call rather than paying for a round trip; ObservationPack, which archives large tool outputs locally and leaves only a handle and a short excerpt in context, recalling exact pages when they are actually needed; an Evidence-Preserving Reducer, which lets cheaper agents read diagnostic logs and summarise them, with every quoted line checked against the archived record before a more expensive agent sees it; and Online Context Compact, which treats a completed subtask as a candidate compaction point instead of compacting only when the window runs out.

The mechanisms were selected rather than designed. NVlabs ran an auto-research loop that fanned 152 proposals across independent lineages, each generating trajectory rollouts, analysing them with map-reduce, implementing a candidate, passing a separate reviewer, and finally facing a fully isolated held-out set that no agent inside the loop could see. Four proposals survived. On the 51-task EdgeBench evaluation the resulting harness retains roughly 94% of Pi's average score on both model backends tested while using 45-49% fewer tokens, at about one third less API cost than Pi and 50-54% less than the native Codex and Claude Code harnesses. SoL-Pi is released under the MIT License.

## What it does

- Action Fusion merges an edit and its follow-up command into one tool call, removing a model round trip
- ObservationPack archives large tool outputs on disk, keeping a handle and excerpt in context
- Evidence-Preserving Reducer delegates log reading to cheaper agents, verifying every quoted line against the archive
- Online Context Compact uses completed subtasks as compaction points rather than compacting late
- Each mechanism is independently switchable through a sol-pi.json config file
- Project-level (.pi/sol-pi.json) or user-level (~/.pi/agent/sol-pi.json) configuration

## Getting started

SoL-Pi installs into an existing Pi install through Pi's own extension command. It needs Node.js 22.19 or newer and pins to pi-coding-agent 0.85.1.

1. Install the pinned Pi release

   SoL-Pi targets version 0.85.1 of the Pi coding agent.

```bash
npm install --global @earendil-works/pi-coding-agent@0.85.1
```

2. Install SoL-Pi globally

   Pi installs the extension straight from the GitHub repo.

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

3. Or install it for one project

   Use --local to scope the extension to the current project.

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

4. Start conservative

   The repo suggests enabling only the two local mechanisms first, in .pi/sol-pi.json or ~/.pi/agent/sol-pi.json.

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

## When to use it

- Cut the token bill of a Pi coding agent that runs continuously on long-horizon tasks
- Keep large test output and build logs out of the context window without losing the ability to re-read them
- Delegate log triage to a cheaper model while keeping quoted evidence verifiable
- Study which harness-level changes actually generalise, using the held-out methodology in the paper

## Version history

- 2026-09-17: NVlabs published SoL-Pi with its paper. The extension packages four mechanisms selected from 152 auto-research proposals, cutting token use 45-49% on EdgeBench while retaining roughly 94% of Pi's average score.
