Pi Agent Rust

A single-binary Rust coding agent CLI with streaming, 36 built-in tools and capability-gated extensions — no Node runtime, no unsafe code.

Stars
★ 2k
Last updated
today
FARS reviewed
Nov 24, 2026
License
NOASSERTION
Primary language
Rust

At a glance

Works with
Universal · cross-platformOpenAI API · Claude API
You'll need
MinisignModel provider API key (optional)Local model server such as Ollama (optional)Shell / CLINetwork accessLocal filesystemMCP Server
Typical use
Terminal-first engineers on large repositories: resume a big session with pi --continue and let the agent read code, run tests and branch the conversation.
Main limitation
The project explicitly stopped targeting strict drop-in compatibility with the legacy TypeScript Pi, so migrating teams must revalidate workflows instead of swapping binaries.
Maintenance
Commits in the last 30 dayslast commit 2026-11-24
Source review
70/100 · Some gaps

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

pi_agent_rust is a from-scratch Rust rewrite of a terminal AI coding agent; official release archives install exactly one binary, pi. It runs in four modes: an interactive TUI (FrankenTUI by default, with --inline and --classic alternatives), print mode via -p, a line-delimited JSON RPC mode via --mode rpc, and Agent Client Protocol via --acp for editors such as Zed. The runtime is built on the project's own asupersync structured-concurrency runtime (HTTP/TLS, structured cancellation) and the rich_rust terminal rendering library, and the README states unsafe code is forbidden. It ships 36 built-in tools tiered as essential, discoverable (reachable through the xdev dispatcher) and settings-gated extras, with 19 named in the default --tools list; the bash tool manages the process tree and tool output is truncated at 2000 lines / 1MB. Sessions persist as branching JSONL files with a SQLite session index and v2 sidecar for fast long-session resume. Models come from ANTHROPIC_API_KEY or ~/.pi/agent/models.json (any OpenAI-compatible endpoint), plus built-in local providers: ollama, llamacpp, mistralrs and lmstudio. Extensions execute in an embedded QuickJS runtime without Node or Bun, constrained by capability-gated hostcalls, two-stage exec mediation and a pending→acknowledged→trusted→killed trust lifecycle.

A user starts a turn with pi (or pi -p, pi --mode rpc, pi --acp). Pi assembles context — @file references, images, audio/video, skill:// resources — into a provider request and streams text and thinking blocks back through its own SSE parser. The model then calls tools: read, write, edit and hashline_edit touch files; bash runs shell commands with timeouts, command mediation, optional PTY and process-tree cleanup; grep, find and ls do in-process search and listing; lsp and debug bridge language servers (14 ops) and DAP debugging (29 ops); ast_grep and ast_edit perform structural search and rewrite; jobs and hub control background shell jobs and PTY services; web_search, submit_plan, todo and ask handle retrieval and mid-turn confirmation. The provider schema stays small because non-essential tools live behind the xdev dispatcher (list/describe/run/promote). Sessions are stored as a branching JSONL tree and reopened via an O(index+tail) path over the SQLite index and segmented sidecar log. The subagent tool spawns child agents (one task, up to 8 parallel tasks, or a chain, with optional worktree isolation), and /memory sync or autoExtract distils reusable facts from completed sessions. Cost guards --warn-cost and --max-cost cap spend across the whole session tree, and print mode exits with code 5 when a cap is hit.

  1. Terminal-first engineers on large repositories: resume a big session with pi --continue and let the agent read code, run tests and branch the conversation.
  2. Developers who keep code on their own machine: point pi at ollama, llamacpp, mistralrs or lmstudio and run with no API key.
  3. People scripting agent calls: use pi -p for one-shot answers or --mode rpc for line-delimited JSON control and streaming events.
  4. Teams on ACP-capable editors such as Zed: run pi --acp and fork sessions with session/fork to branch from a source conversation.
  5. Anyone splitting work across agents: enable the subagent tool, define Markdown agent profiles such as a read-only scout, and run tasks in parallel or as a chain.
  6. Platform teams that must audit tooling: use capability-gated hostcalls, two-stage exec blocking, extension kill switches and the hash-linked runtime risk ledger.

Key setup facts

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

Install / run
  • brew install minisign # macOS
  • curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/pi_agent_rust/main/install.sh?$(date +%s)" | bash
Environment variables
ANTHROPIC_API_KEY
Config files
~/.pi/agent/models.json
Install notes cover
macOS · Linux

How do you install or deploy this agent?

The installer authenticates release artifacts with Minisign, so install that first:

brew install minisign        # macOS
sudo apt install minisign    # Debian/Ubuntu

Then run the published install script, which installs the single pi binary. If an older TypeScript pi is already present, it asks whether to make Rust Pi canonical as pi and rename the old command to legacy-pi:

curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/pi_agent_rust/main/install.sh?$(date +%s)" | bash

Configure a cloud provider credential (optional if you use a keyless local provider):

export ANTHROPIC_API_KEY="sk-ant-..."

Verify the install:

pi --version
pi "Explain this codebase structure"

Building from source does not go through plain cargo: the README requires all quality checks, builds and releases to run through DSR (for example dsr quality --tool pi_agent_rust), documented in docs/releasing.md.

How do you use this agent?

Start the interactive TUI, attach files with @ and invoke built-in slash commands with /:

pi
pi "Summarize the architecture in src/"
pi @src/main.rs "Explain startup flow"

Scriptable single-shot runs, session resume and model inspection:

pi -p "List likely regression risks for this diff" < error.log
pi --continue
pi --list-models
pi --list-providers

To use a local or self-hosted OpenAI-compatible endpoint, add it to ~/.pi/agent/models.json:

{
  "providers": {
    "ollama": {
      "api": "openai-completions",
      "baseUrl": "http://127.0.0.1:11000/v1",
      "apiKey": "ollama",
      "models": [{ "id": "Qwen3.6-35B-A3B-4bit", "contextWindow": 32768 }]
    }
  }
}

Then select provider and model, and refresh provider catalogs when needed:

pi --provider ollama --model Qwen3.6-35B-A3B-4bit
pi --fetch-models openrouter --refresh-models --persist-models

Headless integrations and spend limits:

pi --mode rpc
pi --acp
pi --warn-cost 2 --max-cost 5 "Implement and test the change."

The default approval mode is always-ask on every surface; a gated tool call in a -p run with no approval surface is denied and the process exits 3. Pass --yolo (or --approval-mode yolo) only when you intend unattended tool use.

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.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

FARS trust-control audit

Verified present in source (3/3)
  • confirmation before acting
  • verifiable attribution

What are this agent's strengths and limitations?

Pros
  • One native binary with no Node/Bun bootstrap, its own SSE streaming parser and bash process-tree cleanup, aimed at long sessions and prompt-prefix caching.
  • 36 built-in tools tiered as essential, discoverable and settings-gated, so the live model schema stays small while xdev list/describe/run/promote keeps everything reachable.
  • Broad provider coverage: an Anthropic key is enough to start, ollama/llamacpp/mistralrs/lmstudio need no API key, and any OpenAI-compatible endpoint plugs in via models.json.
  • Layered security: capability-gated hostcalls, two-stage exec mediation with DCG/heredoc AST signals, a trust lifecycle with kill switches, and a hash-linked risk ledger supporting verify/replay/calibrate.
  • Four execution surfaces (interactive TUI, print, RPC, ACP) plus native subagents with parallel/chain/write-isolated runs and parent-child inbox messaging.
Limitations
  • The project explicitly stopped targeting strict drop-in compatibility with the legacy TypeScript Pi, so migrating teams must revalidate workflows instead of swapping binaries.
  • Numeric startup, binary-size and idle-memory claims are currently behind an evidence gate and are not promoted until claim readiness is ready, so adopters lack citable benchmarks.
  • Extensions run in embedded QuickJS against a restricted capability-gated hostcall surface, so existing extensions that depend on full Node APIs need rework.
  • Builds and releases must go through DSR — contributors may not invoke Cargo or RCH directly and GitHub Actions is not an execution or evidence authority, which is unfamiliar for standard Rust teams.
  • Installation depends on Minisign and a curl-pipe-bash script, and --max-cost is a request-boundary check: in-flight requests can still finish above the cap and unpriced usage cannot be estimated.

How does this agent compare with similar options?

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

Agent Source review Form / cost Stars Updated Language Full support on
Pi Agent Rust This agent 70 · Some gaps — ★ 2k today Rust OpenAI API · Claude API
zerostack 69 · Some gaps CLIFree + model costs ★ 1.8k 5d ago Rust OpenAI API · Claude API
nca Native AI Coding CLI 59 · Major gaps CLIFree + model costs ★ 211 16d ago Rust OpenAI API · Claude API
Keen Code 62 · Some gaps — ★ 94 1d ago Go ChatGPT · OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
70/ 100 5-point scale 3.5 / 5
Trust 19/29
Reliability 9/14
Adaptability 15/18
Convention 10/18
Effectiveness 10/13
Verifiability 7/8
Why each dimension lost points
Trust19 / 29 · 3.3/5

The files show capability-gated hostcalls, default-deny exec/env policy, command mediation, extension trust lifecycle, and an always-ask approval default; main.rs explicitly says a missing TTY is not consent, so user_confirmation scores 3. source_attribution also scores 3 because upstream Pi Agent, rich_rust, and other credits are stated. Deductions: least_privilege is 2 because the policy implementation is only partly visible in the packet; data_flow_transparency and sensitive_data_handling are 2 each because credential-persistence restrictions, env blocklists, and redaction are described but a complete data-flow account is absent; dependency_security is 1 because the dependency inventory is explicitly not a vulnerability verdict; external_effects is 2 because approval and command mediation exist but a full sandbox boundary is not demonstrated; rollback is 1 because session branching/checkpoint clues exist without a complete user-facing edit rollback story.

Reliability9 / 14 · 3.2/5

failure_messages scores 3: main.rs defines clear exit codes and an explicit approval-surface-unavailable error, and docs emphasize failing explicitly rather than returning silent zero-result reports. self_consistency scores 2: license wording differs across README, Cargo.toml, and platform metadata, and the product direction explicitly moves away from legacy Pi compatibility while historical artifacts remain. dependency_availability scores 1: no Cargo.lock is present in the packet, external crates such as asupersync and rich_rust are required, and the project requires nightly Rust 1.97, so static review cannot confirm reproducible acquisition.

Adaptability15 / 18 · 4.2/5

audience_and_scenarios scores 3: README covers interactive use, single-shot scripting, local models, SDK integration, and extension development. capability_boundaries scores 3: tool tiers, extension capability gating, debug-adapter limits, and security_scan platform limits are explicit. trigger_precision scores 2: SKILL.md trigger descriptions are precise, but some sampled skills are test artifacts and product-level automatic trigger precision is not runtime-verified. environment_fit scores 2: installation targets macOS/Linux, Windows persistence is explicitly refused, and the nightly toolchain requirement narrows the supported environment.

Convention10 / 18 · 2.8/5

information_architecture scores 2: README and docs entry points exist, but the README is long and dense, raising navigation cost. install_notes scores 2: Minisign, API keys, and local-model setup are documented, but the primary install path is a remote curl | bash script that requires extra trust. naming_stability scores 1: AGENTS.md says the project is early and does not care about backward compatibility, and lib.rs marks most APIs unstable except sdk. examples_and_faq scores 2: quick examples and an examples directory exist, but no complete FAQ is evident. known_limitations scores 3: pending performance evidence, unexecuted tests, Unix-only persistence, and “inventory is not a security verdict” are disclosed. license scores 1: the README badge says MIT + Rider and Cargo.toml uses license-file, but platform metadata is NOASSERTION and no full license text is in the packet. versioning_changelog scores 1: version 0.9.0 and a CHANGELOG.md reference exist, but no versioning policy or current changelog content is shown. maintenance_responsibility scores 1: an author and DSR release process are visible, but publisher identity is unverified and support responsibility/contact is unclear.

Effectiveness10 / 13 · 3.8/5

output_usability scores 3: TUI, print, JSON/RPC, exit codes, streaming output, and tool-result presentation are all clearly designed. marginal_value scores 2: native single-binary distribution, extension security, and local-model support are differentiating, but performance benefits depend on stale or pending evidence and the market is crowded. cost_benefit scores 2: runtime dependency reduction and local models help, but API keys or local inference resources are still required and current performance evidence is insufficient to quantify the benefit.

Verifiability7 / 8 · 4.4/5

claim_traceability scores 3: README defines citation formats, freshness checks, and release-facing evidence gates, and security SLOs trace to threats and invariants. cross_source_corroboration scores 2: README, security docs, and main.rs corroborate approval and security boundaries, but license statements conflict and several tests are marked unexecuted. fact_inference_separation scores 3: docs distinguish historical snapshots from current evidence, dependency inventories from security verdicts, and authored tests from executed tests.

Risks and how to mitigate them
  • The install guide recommends piping a remote script to bash; even with Minisign, pin the revision and independently verify signatures and publisher identity before execution.
  • License metadata is NOASSERTION while README/badges say MIT + Rider and Cargo.toml only references a LICENSE file; obtain explicit license text before adoption or redistribution.
  • Dependency-security evidence is thin: security_scan dependency_plan is only a lockfile inventory, not a vulnerability audit; no Cargo.lock or audit result is provided in the packet.
  • Several security SLOs, performance claims, and regression tests are marked authored-but-unexecuted or pending evidence; do not treat static documentation as a passing run.
  • Windows persistence is explicitly refused and the project requires nightly Rust 1.97; validate deployment environments separately.
  • AGENTS.md is contributor/agent-development guidance, not a runtime security guarantee; its no-file-deletion rules do not replace product approval and rollback controls.
  • The publisher is unverified; independently verify the repository, signing key, and release channel before installation.
Evidence confidence: Low Reviewed Nov 24, 2026 Reviewed revision ea0552c10900
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-agent-rust.svg)](https://followagents.com/en/agents/pi-agent-rust)
<a href="https://followagents.com/en/agents/pi-agent-rust"><img src="https://followagents.com/badge/pi-agent-rust.svg" alt="FARS review"></a>

FAQ

Is Pi Agent Rust open source?
The source code is public on GitHub (Dicklesworthstone/pi_agent_rust), but the repository does not declare a recognised licence, so the rights to reuse or modify it are unclear. Ask the author or check the README before building on it.
Is Pi Agent Rust safe to use?
FollowAgents' FARS review (Nov 24, 2026) scored Pi Agent Rust 19/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is Pi Agent Rust still maintained?
Yes. The latest commit on GitHub is from 2026-11-24, within the last 30 days.
Who makes Pi Agent Rust?
Pi Agent Rust is published on GitHub by the account Dicklesworthstone. FollowAgents has not verified which person or company is behind that account.
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts