Agent-readable docs
Pi Coding Agent Documentation
Technical docs for @earendil-works/pi-coding-agent: the pi CLI, interactive/print/RPC run modes, session runtime, skills and extensions, settings, and the embeddable SDK.
Pages
- OverviewWhat pi is, the four run modes, default tools, and the first docs routes for CLI users and embedders.
- Installationnpm and installer install paths, bin entry, package exports, and verification for @earendil-works/pi-coding-agent.
- QuickstartInstall, authenticate with API key or /login, start interactive pi, and confirm the default read/write/edit/bash tool surface.
- Run modesInteractive, print/JSON, RPC, and SDK modes: how each is invoked, entry points, and when to choose them.
- Agent sessionsSession lifecycle, prompt queue, concurrent behavior, stats, and runtime services that own a conversation turn.
- Branching and session treesSession branching, tree navigation, cancel-during-compact interactions, and name/event constraints for branches.
- Context compactionAuto and manual compaction triggers, reasons, retries on stream drop, and interactions with in-flight prompts and RPC.
- Tools and allowlistsDefault read/write/edit/bash tools, extension tools, allowlist and exclude-tools filters, and blocked-tool termination behavior.
- AuthenticationAPI keys, OAuth login, credential storage, auth checks, ambient auth, and refresh hang failure modes.
- Providers and modelsBuilt-in and dynamic providers, scoped model order and refresh, models.json hot reload, and provider-retry message behavior.
- SettingsSettings load and in-memory reload, stale resource refresh, and merge rules for provider retry and related session options.
- Context filesHow project context files are discovered and injected into sessions, including SDK wiring for context file inputs.
- SkillsSKILL.md frontmatter rules, naming constraints, collision precedence, disable-model-invocation, and valid versus rejected skill fixtures.
- ExtensionsTypeScript extension registration, inline naming, active tools on next turn, OAuth prompt input, and shutdown cleanup contracts.
- Prompt templatesCustom system prompts and prompt templates as reusable session configuration, with SDK entry points and related prompt tests.
- Themes and Pi packagesTheme export requirements, package manifest validation, and how shareable Pi packages bundle extensions, skills, templates, and themes.
- SDKEmbed pi with the package main export: minimal agent construction, full control hooks, custom models, tools, and settings.
- Session runtimeAgentSessionRuntime services, lifecycle events (settled, start notify, event bus), and embedding sessions without the interactive TUI.
- RPC modeProcess integration via rpc-entry: command IDs, prompt-during-compaction constraints, JSON stream behavior, and unknown-command handling.
- CLI referencepi binary flags and argument parsing, auth subcommands, experimental auth entry points, and package bin wiring.
- Package exportsPublic npm surface for @earendil-works/pi-coding-agent: main, rpc-entry, client exports, bin name, and piConfig.configDir.
- SDK examplesCopy-paste SDK recipes: minimal agent, custom model, skills, tools, extensions, sessions, settings, and full-control setups.
- Extension examplesReference extension packages: subagent agents, plan-mode, doom-overlay, dynamic resources skill, and auto-commit-on-exit.
- TroubleshootingRetry and network failures, credential refresh hangs, SIGTERM cleanup, bash output truncation, and session event settlement issues.
Complete Markdown
The complete agent-readable Markdown files are published separately from this HTML page.