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

App resources

Resources are immutable JSON values packaged with an App release. They are useful for large Tool catalogs, mapping tables and reviewed source data that should not be embedded as executable JavaScript.

Declare every resource

{
  "resources": {
    "toolCatalog": {
      "path": "assets/tool-catalog.json",
      "type": "json"
    }
  }
}

Resource names are safe single path components. Paths must remain under assets/, use safe components and match an actual regular file.

Read the frozen value

const toolCatalog = PocketPi.resources.get("toolCatalog");

function findTool(name) {
  return toolCatalog.tools.find((tool) => tool.name === name) ?? null;
}

The framework deep-freezes parsed resource values before exposing them. Both the Action and View Guest receive the same release data, but they do not share a JavaScript object or heap.

Validation rules

  • Only type: "json" is supported.
  • Files present under assets/ must exactly equal the paths declared by resources.
  • One JSON resource is limited to 256 KiB.
  • All resources together are limited to 512 KiB.
  • The entire .pocketapp, including resources, is limited to 2 MiB.
  • Invalid JSON rejects the candidate before activation.

Choose the right storage

DataPut it in
Reviewed catalog/versioned mapping shipped with sourceassets/*.json
Mutable product state, history or cached View projectionApp-owned SQLite
Raw provider credentialNative credential store
Executable behavioractions.js or view.js
Agent-authored memoryPi Agent /workspace

Robinhood uses a resource for its checked-in provider Tool catalog; see the catalog source.