SuperAPI AI Directory

SoL-Pi

NVIDIA Research's token-efficiency extension for the pi coding agent, discovered through scaled auto-research loops (paper). Four opt-in mechanisms: edit-plus-validation fused into one tool call, paged handles for large repeated observations, compact log receipts whose every quotation is verified ag

Open website

About this tool

SoL-Pi is a standalone extension developed by NVIDIA for the Pi coding agent, with the goal of reducing token consumption without reducing the agent's effective workload. It arose from a question in automated research work: before scaling up the agent loop, can the harness itself first be made more efficient? The research focuses on "constrained efficiency"—reducing token traffic, inference work, and agent turns, but without stopping early, skipping verification, or hiding evidence.

Main capabilities SoL-Pi packages four efficiency mechanisms discovered through scaled automated research loops. They act on different parts of the harness and are composed through Pi's public extension API:

  1. Fuse editing and verification into a single tool call, reducing predictable follow-up verification turns.
  2. Provide paged handles for large, repeated observations, avoiding long-term replay of large tool results after first use.
  3. Generate compact log receipts, in which every reference is validated, reducing full requests consumed to read logs.
  4. Online Context Compact, which compacts completed subtasks out of the active context and, after successful compaction, automatically starts a new turn to continue the current task.

Design rules

  • Do not modify Pi: SoL-Pi imports the public Pi API and does not embed the Pi source tree.
  • Explicit enablement: all mechanisms remain disabled when configuration is missing.
  • Preserve evidence: raw observations remain available locally, and if the reducer fails, the original result is left unchanged.
  • Follow Pi's runtime choices: authentication, provider URL, main model, and shell behavior remain controlled by Pi.

Usage Environment requirements: Node.js 22.19 or newer, and @earendil-works/pi-coding-agent 0.85.1. After installing the tested Pi version, install SoL-Pi directly from NVlabs/SoL-Pi. If installing only into the current project, the project-local scope can be used. Configuration: SoL-Pi uses a single effective configuration. In the official Pi distribution, sol-pi.json is looked up in order: .pi/sol-pi.json in the current project (if the project is trusted and the file exists); otherwise ~/.pi/agent/sol-pi.json is used. If neither exists, built-in defaults are used.Project-level configuration takes precedence over user-level configuration; the two files are not merged. The conservative configuration example enables only two local mechanisms: they do not generate additional model calls, nor do they stop running sessions. Before enabling other mechanisms, their configuration and security implications should be reviewed. SoL-Pi does not use dedicated environment variables; feature toggles, reducer provider/model routing, and compaction ratios are all configured in sol-pi.json, with the sol-pi.example.json template as a reference. See the Configuration documentation for the full schema. Coding agents and automated environments should follow the canonical installation and configuration protocol, which describes the fully enabled configuration and is checked with scripts/check-sol-pi-config.mjs --require-all-enabled.

Storage and Security ObservationPack and the Evidence-Preserving Reducer store session-specific archives under a specific directory; archived copies are kept locally and are not automatically deleted after the Pi session ends. When using pi --no-session or SessionManager.inMemory(), Pi does not provide a session directory, and SoL-Pi creates a private directory named sol-pi-<session-id>-<random>/ under the operating system temporary directory; both mechanisms share this directory during extension loading. These modes disable Pi's session log persistence, but SoL-Pi still writes archive files to support exact recall. Temporary archives remain after the session or worker exits so that callers can read the referenced evidence; their final cleanup follows the host's temporary file policy or caller cleanup, and they are not guaranteed to survive system cleanup or support session recovery. Online Context Compact stores state in the Pi session log. After successful compaction, it starts a new turn and automatically continues the current task; canceling the run or exiting Pi does not trigger automatic continuation. The Evidence-Preserving Reducer may use Pi-managed authentication to send eligible diagnostic log content to the configured reducer model. Read SECURITY.md before enabling. For logs that must remain local, do not enable remote reduction.

Development and License Install from the lockfile and run the full source check: npm run check covers TypeScript, the full test suite, and package checks. The development dependency set is pinned to Pi 0.85.1; the runtime Pi package remains a peer dependency, with Pi responsible for installation and upgrades. SoL-Pi is developed and maintained by NVIDIA and released under the MIT License. Tested, Pi-compatible extension PRs are welcome to improve token efficiency and reduce token costs.

Applicable Scenarios and Limitations Suitable for long-running coding agents, especially scenarios that need to reduce repeated model turns, context replay, oversized observation results, and verbose log reads. Limitations include: all mechanisms are disabled by default and must be explicitly configured; some mechanisms may generate additional model calls or involve sending logs to a remote reducer model, so security implications must be assessed; temporary archives are not guaranteed to be retained long-term or to support session recovery; and it is currently under active development to support pi-v1 and the latest model checkpoints.