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

Data isolation

Every durable or sensitive resource has one owner. Isolation is expressed through native roots, one SQLite owner, Guest-specific mounts and lifecycle deletion, not through a naming convention that App code is expected to honor voluntarily.

Ownership matrix

ResourceOwnerReadWrite
Top-level /workspacePi Agentresident workspace Tools/System mechanismsresident workspace Tools/System mechanisms
Ordinary App SQLitethat AppAction + read-only View ProjectionAction transaction only
Ordinary App files/data rootthat Apponly mounts scoped to that Apponly mounted App-local mechanisms
Packaged JSON resourcesApp releasefrozen value in that App's Guestsnever at runtime
Credential valuesnative host on behalf of Appnative request adapter onlyInstaller/provisioning lifecycle
Wi-Fi/model configurationnative hostbounded System factsnative Settings/provisioning commands
JavaScript heapone Guestthat Guestthat Guest

One SQLite owner

View and Action Guests do not open competing embedded database connections. A nativeDbModule owner serializes operations for the App's SQLite file. The View mount enables PRAGMA query_only around reads; write operations are not exposed there.

View isolation

A View receives bounded query results, declared JSON resources, its own presentation heap and pointer input. It does not receive provider responses, raw credentials or the Action call stack. Returning PocketPi.action() asks native routing to perform a mutation elsewhere.

Agent isolation

The Agent sees public Tool schemas and Tool results. It does not see App table files or native credentials. Cross-App coordination happens through public capabilities, not by joining private databases or walking another App's data root.

Guest isolation

QuickJS globals, objects, promises and job queues never cross Guest boundaries. Shared Framework and App source are evaluated separately in each Guest. Data that must coordinate those isolated instances crosses a native contract or durable App state.

Isolation after lifecycle changes

  • View/Action Guest eviction removes only transient heap and retained nodes.
  • Update replaces source and cached Guests while preserving compatible App Data.
  • Uninstall removes source, private data root, schedule state, Tool routes, credentials and cached Guests.
  • Pi Agent's System lifecycle and workspace are unaffected by ordinary App uninstall.