Agent-readable wiki
Pi Developer Reference Wiki
pi is a TypeScript monorepo for a provider-neutral coding-agent harness, spanning model APIs, an agent runtime, a CLI, and a terminal UI library. Repository code is the source of truth; no STRATEGY.md or docs/solutions sources were present, and the requested bundled Compound Engineering page-shape guidance is treated as portable workflow guidance.
Pages
- Technical OrientationWhat the repo is, how the four packages fit together, the main entry points, and how to navigate the rest of the developer reference.
- Agent Core RuntimeThe reusable agent loop, event stream, tool-call execution model, harness layer, session storage, and compaction responsibilities.
- Model and Provider AbstractionThe provider-neutral LLM surface: model metadata, stream contracts, lazy provider registration, API-key resolution, OAuth hooks, and custom provider wiring.
- CLI, Session, and Tool LifecycleHow the pi executable parses inputs, creates cwd-bound services, resolves models and settings, persists sessions, dispatches built-in tools, and bridges into the core agent.
- Interactive, Print, RPC, and TUI SurfacesThe runtime adapters above AgentSession: terminal interaction, print and JSON modes, JSONL RPC protocol, keybindings, editor components, overlays, and differential rendering.
- Resources, Extensions, Skills, and PackagesThe portable extension layer for loading repository, file, npm, git, and catalog-like resources without binding the architecture to one model provider or hosted service.
Complete Markdown
The complete agent-readable Markdown files are published separately from this HTML page.