Skip to content
AyoKoding

Overview

The by-concept track teaches Pi through a sequence of focused narrative sections. Each section explains one concept completely — what it is, how it works, when to use it, and what the trade-offs are — before showing annotated code. The three levels build on each other, so concepts introduced early are assumed known in later sections.

Learning Path

%% Color Palette: Blue #0173B2, Orange #DE8F05, Teal #029E73, Purple #CC78BC, Brown #CA9161
%% All colors are color-blind friendly and meet WCAG AA contrast standards
 
flowchart TD
    START(["Start here"]):::teal
 
    BEG["Beginner<br/>Sections 1–16"]:::blue
    INT["Intermediate<br/>Sections 17–29"]:::orange
    ADV["Advanced<br/>Sections 30–40"]:::purple
 
    B1["What is Pi?"]:::blue
    B2["Four Primitive Tools"]:::blue
    B3["Installation"]:::blue
    B4["Interactive TUI Mode"]:::blue
    B5["Your First Session"]:::blue
    B6["AGENTS.md: Context"]:::blue
    B7["SYSTEM.md: Override"]:::blue
    B8["Session Persistence"]:::blue
    B9["Tree-Structured Sessions"]:::blue
    B10["Multi-Provider LLM"]:::blue
    B11["Pi vs. Other Agents"]:::blue
    B12["Slash Commands"]:::blue
    B13["Session Sharing"]:::blue
    B14["Print/JSON Mode"]:::blue
    B15["Community Extensions"]:::blue
    B16["Basic Context Engineering"]:::blue
 
    I1["Custom TypeScript Extension"]:::orange
    I2["Registering Custom Tools"]:::orange
    I3["Skills System"]:::orange
    I4["Dynamic Skill Injection"]:::orange
    I5["Context Window Management"]:::orange
    I6["Branching for Code Review"]:::orange
    I7["RPC Protocol Mode"]:::orange
    I8["SDK: pi-agent-core"]:::orange
    I9["pi-tui Components"]:::orange
    I10["Supply-Chain Hardening"]:::orange
    I11["Multi-Agent Patterns"]:::orange
    I12["Prompt Templates"]:::orange
    I13["pi-ai: Unified LLM API"]:::orange
 
    A1["Self-Extensibility"]:::purple
    A2["Domain-Specific Agent"]:::purple
    A3["Custom pi-tui Widgets"]:::purple
    A4["Bedrock + Ollama Offline"]:::purple
    A5["Session State Deep Dive"]:::purple
    A6["Hot-Reloading Extensions"]:::purple
    A7["OpenClaw + Pi"]:::purple
    A8["CI/CD Integration"]:::purple
    A9["Production Hardening"]:::purple
    A10["Contributing to Pi"]:::purple
    A11["Future of Pi"]:::purple
 
    START --> BEG
    BEG --> B1 --> B2 --> B3 --> B4 --> B5
    B5 --> B6 --> B7 --> B8 --> B9 --> B10
    B10 --> B11 --> B12 --> B13 --> B14 --> B15 --> B16
    B16 --> INT
    INT --> I1 --> I2 --> I3 --> I4 --> I5 --> I6 --> I7
    I7 --> I8 --> I9 --> I10 --> I11 --> I12 --> I13
    I13 --> ADV
    ADV --> A1 --> A2 --> A3 --> A4 --> A5 --> A6
    A6 --> A7 --> A8 --> A9 --> A10 --> A11
 
    classDef teal fill:#029E73,stroke:#000000,color:#FFFFFF,stroke-width:2px
    classDef blue fill:#0173B2,stroke:#000000,color:#FFFFFF,stroke-width:2px
    classDef orange fill:#DE8F05,stroke:#000000,color:#FFFFFF,stroke-width:2px
    classDef purple fill:#CC78BC,stroke:#000000,color:#FFFFFF,stroke-width:2px

Coverage Map

Each level builds on the previous. Concepts are not repeated once introduced.

LevelCoverageFocus
Beginner0–40%Pi as a CLI tool — install, run, configure, use built-in features
Intermediate40–75%Pi as a platform — write extensions, embed the SDK, wire providers
Advanced75–95%Pi at scale — self-modification, CI/CD, production, contributing

Full Section Table of Contents

Beginner (Sections 1–16)

#SectionWhat You Will Learn
1What is Pi?Minimal harness design philosophy, target audience, creator history
2The Four Primitive ToolsRead, Write, Edit, Bash — why only four, minimal surface area, composability
3Installationnpm install -g @earendil-works/pi-coding-agent, version check, first run
4Interactive TUI ModeTerminal UI layout, panes, keyboard shortcuts, input area
5Your First SessionStarting Pi, giving a task, watching the agentic loop execute
6AGENTS.md: ContextProject-specific context injection at session start, what to put in it
7SYSTEM.md: System OverrideReplacing Pi's 25-line system prompt per project, when and why
8Session PersistenceWhere sessions are stored, history format, resuming a session
9Tree-Structured SessionsForking a session at any message point, parallel exploration
10Multi-Provider LLM15+ providers, configuration syntax, switching providers, cost comparison
11Pi vs. Other AgentsSide-by-side: Claude Code, Cursor, GitHub Copilot, Aider — design philosophy
12Slash CommandsBuilt-in commands (/share, /branch, /clear), discovering available commands
13Session Sharing/share → GitHub gist, format, sharing with teammates
14Print/JSON Output Modepi --json flag, scripting Pi, parsing output programmatically
15Community ExtensionsFinding extensions, installing via npm, loading in a session
16Basic Context EngineeringWhat belongs in context, token budget awareness, context as Pi's primary lever

Intermediate (Sections 17–29)

#SectionWhat You Will Learn
17Custom TypeScript ExtensionExtension anatomy: register() call, Tool definition, package.json shape
18Registering Custom ToolsTool interface, JSON Schema parameters, execute() handler, error handling
19Skills SystemSKILL.md format in Pi, natural language instructions, how skills differ from tools
20Dynamic Skill InjectionRelevance scoring, per-turn skill selection, token budget interaction
21Context Window ManagementAuto-compaction algorithm, kept vs. dropped content, manual control
22Branching for Code ReviewFork at a decision point, parallel investigation, merging findings
23RPC Protocol ModeJSON-RPC interface, protocol schema, embedding Pi in another tool
24SDK: pi-agent-coreUsing @earendil-works/pi-agent-core as library, building a custom agent
25pi-tui ComponentsDifferential rendering, building custom panes, component lifecycle
26Supply-Chain Hardeningnpm-shrinkwrap for CLI packages, pinned deps, auditing Pi's own supply chain
27Multi-Agent PatternsOrchestrating multiple Pi instances via RPC, task delegation, result aggregation
28Prompt TemplatesTemplate variables, per-file context injection, advanced AGENTS.md patterns
29pi-ai: Unified LLM APIProvider-agnostic code, adding providers, failover configuration

Advanced (Sections 30–40)

#SectionWhat You Will Learn
30Self-ExtensibilityAgent writes its own TypeScript extensions, hot-reload workflow, iteration
31Domain-Specific AgentEnd-to-end: code review or docs agent using pi-agent-core SDK
32Custom pi-tui WidgetsDifferential rendering internals, complex TUI widgets, focus management
33Bedrock + Ollama OfflineAir-gapped Pi deployment, provider config, latency trade-offs
34Session State Deep DiveState schema on disk, custom state fields via extensions, migration
35Hot-Reloading ExtensionsTypeScript compilation pipeline, watch mode, reload API, development DX
36OpenClaw + PiHow Pi primitives informed OpenClaw's agent runtime design, architectural overlap
37CI/CD IntegrationPi as automated reviewer in GitHub Actions, structured output, failure handling
38Production HardeningIsolated execution, input sanitization, rate limiting, untrusted repos
39Contributing to PiMonorepo navigation, local build, test suite, PR workflow
40Future of PiCommunity roadmap: MCP integration, GUI mode exploration, ecosystem direction

Choosing Your Entry Point

Read the beginner level if you cannot answer "what does pi.register() do?" without looking it up. Read the intermediate level if you can install Pi and run a session, but have not written a custom tool. Go directly to advanced if you have written at least one extension and understand how the agent loop interacts with the tool schema.

If you are evaluating Pi against another coding agent for your team, the comparison table in Beginner Section 11 and the production hardening material in Advanced Section 38 are the two sections most relevant to an adoption decision.

Last updated May 20, 2026

Command Palette

Search for a command to run...