Pi 0.83 · bilingual source-guided course
Start with one reply.
Build a complete desktop agent.
Learn through visible product goals, then follow each behavior into Pi’s real source call chain.
37-chapter curriculum · source baseline Pi v0.83.0 · English edition in progress
Course map
Grow the product one capability at a time.
Make the desktop agent speak
- 1The desktop agent’s first answerOverview
Meet pi-ai, providers, models, and context through one minimal model call.
- 2Stream the answer token by tokenOverview
Understand AssistantMessageEventStream and streaming events.
- 3Show thinking, tokens, and errorsOverview
Turn model internals into states a desktop application can display.
- 4Let users switch modelsOverview
Understand providers, the model catalog, authentication, and cross-provider compatibility.
Move beyond chat
- 5Let the agent inspect the desktopOverview
Learn ToolCall and ToolResult by building a file-information tool.
- 6Why an agent loop is necessaryOverview
Connect model decisions, tool execution, and returned results into a loop.
- 7Show tool progress in the UIOverview
Map agent events to clear, observable interface states.
- 8Parallel tools, cancellation, and recoveryOverview
Handle concurrent execution, aborts, errors, and stopping conditions.
- 9Require confirmation for dangerous actionsOverview
Define permission, approval, trust, and sandbox boundaries.
Give the agent memory
- 10What a multi-turn conversation storesOverview
Separate agent messages, LLM messages, UI messages, and context.
- 11Save and restore sessionsOverview
Understand sessions, entries, repositories, and persistence.
- 12Why a session is a treeOverview
Learn forks, branches, and retrying from a historical node.
- 13When the conversation grows too longOverview
Understand overflow, cut points, summaries, and compaction records.
- 14Redirect an agent while it runsOverview
Use steering, follow-ups, and queues to control active work.
System prompts and context engineering
- 15A system prompt is not static textOverview
Understand dynamic prompts, project context, and resource merging.
Skills: reusable expertise
- 16Why agents need SkillsOverview
Distinguish Skills, tools, system prompts, and Extensions.
- 17Create your first SkillOverview
Build a runnable error-log analysis Skill.
- 18How Skills are discovered and loadedOverview
Trace directory scans, frontmatter parsing, and conflict diagnostics.
- 19How Skills are invokedOverview
Understand explicit invocation, automatic matching, and progressive loading.
- 20Design high-quality SkillsOverview
Create Skills that are discoverable, executable, verifiable, and safe.
- 21Test, distribute, and govern SkillsOverview
Cover tests, package distribution, conflicts, and security governance.
Extensions: change how Pi runs
- 22Why Pi needs ExtensionsOverview
Use tool approval to understand event-driven extension.
- 23The complete Extension loading pathOverview
Trace discovery, module loading, factory registration, and runtime binding.
- 24Extension API and runtime mechanicsOverview
Understand registration, execution, and AgentSession bindings.
- 25The event system and interception chainOverview
Follow observation, modification, and blocking events through one request.
- 26Add and wrap tools with ExtensionsOverview
Understand tool definitions, wrappers, approval, and auditing.
- 27Change agent behavior with ExtensionsOverview
Choose extension points for prompts, input, models, compaction, and sessions.
- 28Advanced Extensions: providers and resourcesOverview
Extend models, authentication, Skills, resources, sandboxes, and services.
- 29Build reliable ExtensionsOverview
Handle errors, cancellation, conflicts, reloads, concurrency, and compatibility.
Embed Pi in a desktop agent
- 30Choose the right integration layerOverview
Compare pi-ai, agent-core, the harness, SDK, and RPC.
- 31Embed Pi with the SDKOverview
Organize an application with AgentSession, services, and runtime components.
- 32Isolate the agent with RPCOverview
Design the event protocol between a desktop process and a Pi child process.
- 33Design desktop-agent application stateOverview
Map conversation, streaming, tools, permissions, and sessions into UI state.
Put the complete system together
- 34Assemble a complete desktop agentOverview
Connect chat, tools, memory, Skills, and Extensions.
- 35Trace the full source call chainOverview
Follow input through model output, tool execution, and session persistence.
- 36Production readiness and testingOverview
Complete security, recovery, evaluation, diagnostics, packaging, and upgrade checks.
- 37Upgrade to Pi 0.83Full chapter
Learn the new capabilities, TypeBox breaking changes, and a verifiable migration path.