Pi Agent Harness

Unified LLM API, agent runtime, and interactive coding agent CLI supporting multiple model providers for terminal-based coding assistance.

Stars
★ 125k
Last updated
today v1.7.0
FARS reviewed
Nov 08, 2026 +5 new
License
MIT
Primary language
TypeScript

At a glance

How it runs
CLILibrary / SDKFramework
Works with
Universal · cross-platformOpenAI API · Claude API
Cost
Free software; you pay for model usage
OS / editors
Windows · macOS · Linux per README
Safety controls
Docker container isolation per README
Integrations
SDK / HTTP API per README
Setup effort
Medium · a few setup steps
You'll need
Node.jsBunShell / CLINetwork accessLocal filesystem
Typical use
Developers who want a unified interface to interact with multiple LLMs from the terminal using pi-coding-agent.
Not a fit if
  • Teams needing built-in permission isolation; Pi has none
  • Users wanting one npm package instead of many
  • New contributors relying on issues/PRs; they are auto-closed
Maintenance
Commits in the last 30 dayslast commit 2026-12-02latest release v1.7.0 (2026-11-27)+201.3 ★/day over 7 days

What does this agent do, and when should you use it?

Pi is an AI agent toolkit composed of several npm packages: @earendil-works/pi-coding-agent provides an interactive coding agent CLI, @earendil-works/pi-agent-core offers an agent runtime with tool calling and state management, and @earendil-works/pi-ai provides a unified multi-provider LLM API for OpenAI, Anthropic, Google, and more. Additional packages include @earendil-works/pi-tui (terminal UI library) and @earendil-works/pi-telemetry (telemetry contracts). Pi does not include a built-in permission system; it runs with the privileges of the launching process, but containerization options (Gondolin, Docker, OpenShell) are documented. The project is MIT-licensed and emphasizes supply-chain security with pinned dependencies, shrinkwrap, and audits.

Pi operates as an end-to-end coding agent workflow: the pi-ai package abstracts access to multiple LLM providers (OpenAI, Anthropic, Google), pi-agent-core provides an agent loop with tool calling and state management, and pi-coding-agent delivers an interactive CLI (e.g., pi) in the terminal, supporting ! commands. The Pi TUI library provides differential rendering for terminal interfaces. Developers can test via ./test.sh, build from source with npm run build, and create standalone binaries with ./scripts/build-binaries.sh. Permissions can be enhanced through containerization patterns like Gondolin, Docker, and OpenShell.

  1. Developers who want a unified interface to interact with multiple LLMs from the terminal using pi-coding-agent.
  2. Teams building custom agents that require tool calling and state management; pi-agent-core provides the runtime.
  3. Developers needing to switch between OpenAI, Anthropic, and Google APIs without rewriting code; pi-ai offers a consistent TypeScript API.
  4. Terminal app developers wanting a TUI library with differential rendering; pi-tui can be used standalone.
  5. Security-conscious teams that need to run coding agents in sandboxed environments; the containerization docs provide patterns using micro-VMs, Docker, or OpenShell.
  6. Open-source contributors who want to share their coding agent sessions to improve agent performance; use pi-share-hf to publish to Hugging Face.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npm install -g @earendil-works/pi-coding-agent
  • bun install --global @earendil-works/pi-coding-agent
  • npm install --ignore-scripts
Install notes cover
Linux

How do you install or deploy this agent?

Install the coding agent CLI via npm:

npm install -g @earendil-works/pi-coding-agent

Alternatively, use Bun:

bun install --global @earendil-works/pi-coding-agent

Requires Node.js and Bun runtime. Configure API keys for your LLM providers (e.g., OpenAI, Anthropic, Google).

How do you use this agent?

Run the interactive coding agent CLI:

pi

Or run from source:

./pi-test.sh

For development:

npm install --ignore-scripts
npm run build
npm run check
./test.sh

To build a standalone binary (example for linux-x64):

VERSION="<release-version>"
tar -xzf "pi-${VERSION}-source.tar.gz"
cd "pi-${VERSION}"
./scripts/build-binaries.sh --offline-model-data --platform linux-x64 --out "$PWD/out"

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

README-backed isolation & workflow protocols

Isolation & controls
Docker container isolation
Protocols & surfaces
SDK / HTTP API

FARS trust-control audit

Verified present in source (3/3)
  • dependency security
Not found in source — apply before daily use
  • least-privilege scoping — Grant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
  • confirmation before acting — Turn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.

What are this agent's strengths and limitations?

Pros
  • Multi-provider LLM support with a unified API, reducing vendor lock-in.
  • Rich agent runtime (pi-agent-core) with tool calling and state management for complex workflows.
  • Interactive coding agent CLI (pi-coding-agent) is ready to use for daily coding tasks.
  • Strong supply-chain security including exact dependency pinning, shrinkwrap, and npm audit.
  • Documented containerization modes (Gondolin, Docker, OpenShell) enhance security.
Limitations
  • No built-in permission system; containerizing or sandboxing is required for isolation, adding complexity.
  • Dependence on LLM APIs incurs costs and requires network access.
  • The toolkit is split across multiple npm packages, potentially confusing new users.
  • Building standalone binaries requires running build scripts, which may be time-consuming and need network.
  • New contributors' issues and PRs are auto-closed by default, which might discourage community submissions.

How does this agent compare with similar options?

The README does not explicitly mention other agents, but as a multi-provider LLM API and agent toolkit, it can be compared to LangChain, Claude Code, or OpenAI Codex. However, Pi emphasizes self-extensibility and a TUI, and is MIT-licensed.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Pi Agent Harness This agent 65 · Some gaps CLIFree + model costs ★ 125k today TypeScript OpenAI API · Claude API
AgentForge 55 · Major gaps CLIFree + model costs ★ 67 11d ago Python OpenAI API · Claude API
agentty 73 · Some gaps CLIFree + model costs ★ 560 1d ago C++ OpenAI API · Claude API
zerostack 69 · Some gaps CLIFree + model costs ★ 1.8k today Rust OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
65/ 100 5-point scale 3.3 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 5 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 12/29
Reliability 8/14
Adaptability 15/18
Convention 15/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust12 / 29 · 2.1/5

The README and SECURITY.md state that Pi runs with the permissions of its launching user and has no built-in filesystem, process, network, or credential access restrictions; least privilege and user confirmation therefore score 0. The README describes interactive, print, JSON, RPC, and SDK modes plus containerization, while the security policy explains trust boundaries and risks from skills and extensions, supporting data-flow transparency at 2. The supplied material does not show the credential-store implementation or concrete sensitive-data protections, so sensitive-data handling scores 1. The README documents exact versions, lockfiles, ignored lifecycle scripts, audits, and signature checks, earning dependency security 3. CLI/RPC/tools and containerization make external effects apparent, but the material does not show complete authorization controls for each operation, so external effects score 1. No general rollback mechanism is shown, scoring 1. The README, license copyright notice, and private vulnerability-reporting route provide attribution evidence, but publisher identity remains unverified, so source attribution scores 2.

Reliability8 / 14 · 2.9/5

The README, package manifest, and security policy are broadly consistent on product scope, Node requirements, permission model, and installation, scoring self-consistency 2. Pinned installer dependencies, exact direct dependencies, offline-build notes, and dependency audits support dependency availability at 2, but the sample does not establish runtime dependency recovery. The only supplied failure-handling example is limited request validation and error responses in the voice-service source, which is not enough to assess the main Agent product; failure messages score 1.

Adaptability15 / 18 · 4.2/5

The README explicitly covers interactive coding, automation, RPC, SDKs, extensions, skills, templates, themes, and packages, earning audience and scenario coverage 3. It also states that sub-agents, plan mode, and a permission system are not built in, and describes containerization options, earning capability boundaries 3. The skill samples show a manual-invocation restriction, but do not establish the full trigger rules, so trigger precision scores 2. Node 22.19+, multi-platform installation, Nix, Docker, and OpenShell show environment support; platform details and limits remain incomplete in the sample, scoring 2.

Convention15 / 18 · 4.2/5

The README organizes getting started, packages, permissions, development, and release topics and links to focused documentation, scoring information architecture 3. Installation instructions cover scripts, npm, Windows, Nix, and Node requirements, and distinguish whether npm pins transitive dependencies, scoring 3. Package and skill names follow recognizable patterns, though one sample deliberately tests invalid names, so naming stability scores 2. Documentation links and command examples are extensive, but the sample has no FAQ, scoring 2. The README and SECURITY.md clearly disclose the lack of a built-in sandbox and the need to trust skills and repositories, scoring known limitations 3. The complete MIT license is supplied, scoring 3. Package versions, version commands, and release scripts show a versioning path, but the sample contains no actual changelog content, scoring 2. Contribution, maintenance, and security-reporting routes are described; default auto-closing of new contributors' issues and PRs constrains the participation path, so maintenance responsibility scores 2.

Effectiveness10 / 13 · 3.8/5

The product offers interactive CLI, automation output, RPC, and SDK modes that can serve different workflows, scoring output usability 2; the sample does not include concrete task results to justify more. Combining a multi-provider LLM API, agent runtime, terminal UI, and extensible coding agent provides clear utility, scoring marginal value 3. Installation, build, and extension paths are documented, but there is no quantified evidence about runtime or model costs and benefits, so cost-benefit scores 2.

Verifiability5 / 8 · 3.1/5

README claims about installation, dependencies, and security are partly supported by the package manifest and workflow configuration, but some remain documentary assertions, scoring claim traceability 2. The README and SECURITY.md corroborate the permission boundary, while the manifest and release workflow support dependency and release claims; the sample cannot cross-check every feature, scoring 2. The material states limitations explicitly and provides inspectable configuration examples, but does not consistently distinguish documentation claims, static evidence, and runtime results, scoring fact-inference separation 2.

Risks and how to mitigate them
  • Not found in source: least-privilege scopingGrant only what the task needs: a dedicated account or read-only token, scoped to specific directories and repos.
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Pi runs with the permissions of its launching user by default; the README recommends a container or sandbox when stronger isolation is needed.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 6e2222a8dda0 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/pi.svg)](https://followagents.com/en/agents/pi)
<a href="https://followagents.com/en/agents/pi"><img src="https://followagents.com/badge/pi.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.7.0
    Release notes excerpt
    New Features - [Terminal session resume](https://github.com/earendil-works/pi/blob/v1.7.0/packages/coding-agent/docs/terminal-setup.md#program-resume): Compatible terminals can reopen the current pi session after a restart with its original profile, tool restrictions, and instructions. - [Image generation in codemode](https://github.com/earendil-works/pi/blob/v1.7.0/packages/coding-agent/docs/codemode.md#generate-images): Generate images with Radius, or set the aspect ratio and size when using OpenRouter image models. …
    View on GitHub ↗
  2. v1.6.1
    Release notes excerpt
    New Features - Decision models in codemode: GitHub Copilot's gpt-6-luna-decisions and Radius decision models can be called from codemode models.classify(), and results include the provider's responseId. See [Classify](https://github.com/earendil-works/pi/blob/v1.6.1/packages/coding-agent/docs/codemode.md#classify). …
    View on GitHub ↗
  3. v1.6.0
    Release notes excerpt
    New Features - GPT-6.2 Astra and GPT-6.2 Sol: both models are available on the openai, azure, and openai-codex providers, and GPT-6.2 Sol is now the default model for all three. See [Providers](https://github.com/earendil-works/pi/blob/v1.6.0/packages/coding-agent/docs/providers.md). Breaking Changes …
    View on GitHub ↗

FAQ

What is Pi's permission model?
Pi does not include a built-in permission system; it runs with the permissions of the user and process that launched it. For stronger boundaries, use containerization or sandboxing as described in the docs (Gondolin, Docker, OpenShell).
Which LLM providers does Pi support?
Through the @earendil-works/pi-ai package, Pi supports OpenAI, Anthropic, Google, and more, providing a unified API. You need API keys for your chosen providers.
How does Pi ensure supply-chain security?
Pi pins direct dependencies to exact versions, uses package-lock.json as ground truth, runs npm run check to verify dependencies, includes a shrinkwrap in published packages, and runs npm audit in CI.
How can I share Pi session data?
Use the badlogic/pi-share-hf tool to publish your coding agent sessions to a Hugging Face dataset. This requires a Hugging Face account and the Hugging Face CLI.
Can Pi be built without network access?
Yes. Use npm run build:offline to rebuild using existing model data without network. When building binaries, use the --offline-model-data flag.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts