Browse documentation

Start here

OverviewGetting startedThe mental model

Use the runtime

Run the simulatorPi Agent and workspaceInstall and manage AppsESP32-P4 reference targetESP32-S3 supported target

Build Apps

App developer guideBuild your first AppApp source and packageData and migrationsActions and ToolsView and interactionNetworking and native servicesApp resourcesSchedulesPackage and updateTesting and debugging

Understand the runtime

Runtime flowGuests and lifecycleLayers and ownershipHarness boundary

Security

Trust and capabilitiesData isolationLifecycle and recovery

Reference

App manifestPocketPi APIView APICLI referenceLimits and compatibility

Examples

Exa App walkthroughRobinhood App walkthrough

Project

Current boundariesValidation status

The mental model

PocketPi becomes simpler when you follow ownership instead of implementation files. The Agent owns intent and its workspace; an App owns domain behavior and durable product state; PocketJS executes bounded JavaScript and renders the fixed View; the native host owns trusted mechanisms.

Start with actors, not layers

ActorDecidesDoes not own
PersonPrompts, navigation, review and direct UI intentsProvider transport or App database mutation
AgentWhy and when to use capabilities; cross-App coordinationApp schema, raw credentials or View synchronization
AppHow a domain operation validates, calls services, persists and presents dataGlobal workspace, hardware drivers or other Apps' data
Native hostWhether a capability is allowed and how bounded mechanisms reach hardware/servicesRobinhood/Exa product semantics and View policy

Then learn the three App parts

Data
  durable App-owned SQLite/files

Actions
  named behavior shared by Agent Tools, UI events and schedules

View
  fixed PocketJS interface projected from bounded Data

Projection is the Data-to-View binding. It has no independent durable state, so it is not a fourth App concept. A View may keep small in-memory presentation state, but SQLite remains the durable product truth.

Follow one Action through the system

  1. Admission: a Tool route, UI event or App schedule selects a local Action name.
  2. Execution: the Action Guest validates arguments and may call allowed native services.
  3. Persistence: PocketPi.data.transaction() writes App-owned SQLite.
  4. Invalidation: a successful commit increments an in-memory App revision.
  5. Projection: only a visible stale View re-runs its bounded queries at a frame boundary.
  6. Rendering: PocketJS reconciles the fixed View and the host displays its DrawList.

The Agent never calls an update_view Tool. It changes product state through an Action; the View follows the App revision and projects the resulting Data.

What “resident” changes

Pi Agent's Agent loop and Root View share one System Guest created at boot. Opening an ordinary App changes which View owns the display and input; it does not destroy the Agent, its pending model request or its Tool registry. Ordinary View and Action Guests are bounded and may be evicted, so durable state cannot live only in JavaScript objects.

What runs where

Device hardware
└── target OS / RTOS and native host
    ├── credentials, transport, storage enforcement, lifecycle
    ├── AppSupervisor, routing, schedules and recovery
    └── PocketJS / QuickJS platform
        ├── resident Pi Agent System Guest
        ├── ordinary View Guests
        └── ordinary Action Guests

This is where the RTOS boundary belongs: as one implementation layer beneath the product runtime. App developers normally work above it. Host developers use it when providing the native composition for a target.

Current versus target

AreaCurrent on upstream/mainDirection
Resident HarnessImplemented Pi Agent onlyBuild-time Pi or DeepSeek Harness behind one guest/host contract
Ordinary AppsImplemented source install/update/uninstallBroader App ecosystem without moving policy into firmware
HardwareImplemented ESP32-P4 reference target and ESP32-S3 supported targetMore native hosts only after a concrete board need exists
PlaygroundNot implementedMove the macOS product simulator to the web later

Deep implementation detail lives in docs/agentos-architecture.md.