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 manifest

app.json is strict install intent. Unknown top-level fields are rejected, the App id anchors storage and routing, and native permissions are reviewed as part of the release.

Minimal manifest

{
  "format": 1,
  "frameworkApi": 1,
  "id": "counter",
  "title": "Counter",
  "description": "A durable counter",
  "version": "0.1.0",
  "schemaVersion": 1,
  "capabilities": ["data.sqlite"],
  "resources": {},
  "toolNamespace": "counter",
  "tools": [],
  "schedules": []
}

Top-level fields

FieldRequired/effective defaultMeaning and validation
formatMust be 1Source package container contract
frameworkApiMust equal current runtime, now 1Compatibility with platform-owned PocketPi.* Framework
idRequiredStable safe component; must match apps/<id>; cannot be pi-agent for ordinary packages
titleNon-emptyHuman-facing review and Apps UI name
descriptionRequired stringHuman/product description
versionNon-emptyRelease metadata shown to people; runtime does not impose SemVer parsing
schemaVersionOrdinary App: positive integerSQLite compatibility, independent from source release version
capabilities[]Unique values from data.fs, data.sqlite, net.http
toolNamespaceApp idEvery public Tool name must start with <namespace>.
tools[]Public Agent Tool definitions plus local action route
schedules[]Periodic local Action declarations
nativeServicesempty HTTP/MCP listsExact native endpoint, connection and credential policy
providerOperations[]Unique non-empty native provider operation allowlist, used by MCP Apps
resources{}Named manifest-declared JSON files under assets/

Tool entry

{
  "name": "research.search",
  "action": "search",
  "description": "Search and save a bounded local result set.",
  "parameters": {
    "type": "object",
    "properties": {
      "query": { "type": "string", "minLength": 1 }
    },
    "required": ["query"],
    "additionalProperties": false
  }
}
  • name must use this App's namespace and be globally unique among installed Apps.
  • action must be a non-empty local name without a dot.
  • The public model definition removes action; it receives name, description and parameters.
  • Installation evaluates actions.js and verifies that the routed function exists.

Schedule entry

{
  "id": "history-cleanup",
  "everyMinutes": 60,
  "action": "cleanup",
  "args": { "maxAgeDays": 7 }
}

action follows the same local-name rule. Runtime cadence is at least one minute.args defaults to JSON null if omitted; prefer an explicit object for reviewability.

HTTP service policy

"nativeServices": {
  "http": [{
    "method": "POST",
    "urls": ["https://api.example.com/search"],
    "allowedRequestHeaders": ["accept", "content-type"],
    "credential": {
      "id": "example.api-key",
      "header": "authorization",
      "prefix": "Bearer "
    }
  }]
}

credential may be null/omitted for an endpoint that needs no secret.

MCP service policy

"nativeServices": {
  "mcp": [{
    "connection": "portfolio",
    "url": "https://provider.example.com/mcp",
    "credential": {
      "id": "portfolio.oauth-token",
      "header": "authorization",
      "prefix": "Bearer "
    }
  }]
},
"providerOperations": ["get_accounts", "get_portfolio"]

Resource entry

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

Declared resource paths must exactly equal the files under assets/. Resource names, App ids and path components accept ASCII letters, digits, dot, dash and underscore, excluding empty, . and .. components.

Complete examples: Exa and Robinhood.