Back
64/65
Lesson 64
6 min
PI: Native Coding Agent
Single-binary Rust coding agent with local model support
Ready to level up?
Mark complete to track your learning progress.
Single-binary Rust coding agent with local model support
Mark complete to track your learning progress.
Run Pi Agent: a native single-binary coding agent that works with or without an API key.
pi (Pi Agent) is a from-scratch Rust port of Mario Zechner's Pi Agent: a native, single-binary coding agent. It streams responses with inline extended thinking, ships a full built-in toolset, and supports Markdown-defined subagents for custom workflows.
It is multi-provider, including zero-config local models via ollama, llama.cpp, and LM Studio, so you can run a full coding agent with no API key at all.
Single Rust binary; no Node or Bun bootstrap to wait on
SQLite session index with fast resume and bounded resources
Capability-gated extensions with two-stage exec mediation
Trust lifecycle plus a risk ledger for auditable actions
Point pi at a local model server and it works with no cloud account. Local models are auto-detected for common servers, and custom endpoints go in ~/.pi/agent/models.json.
# Start a local model server (any of these)ollama serve# ...or llama.cpp / LM Studio# Then run pi; local model servers are discovered automaticallypi "write unit tests for src/parser.rs"# Custom endpoints live in ~/.pi/agent/models.json