Install
Configure
projectId remains in the configuration type for compatibility but is deprecated and ignored.
Chat
messages is required. agent is optional and omission selects the orchestrator. Other fields are loop, sessionId, user, metadata, sandbox, and stream. model can override the selected agent model for this request.
Sandbox isolation and release behavior can be configured independently. See
Sandboxes for the complete policy and precedence.
ChatCompletionStream exposes sessionId, aborted, askUser, missionPreview, vaultPreview, openFile, navigateTo, and openTab, plus abort().
Sessions
sessionId to chat calls to continue a session. The caller should still include the message history needed by the model.
Agents and loops
getLoops, getLoop, createLoop, updateLoop, and deleteLoop for project loops. Agents only store assignedLoops; a chat or task selects a loop explicitly.
Memory and legacy vault
Files
{ type: "file", file_id: "/workspace/report.pdf" }. Agents use their configured file or image tools to inspect it.
Sandbox volumes
Catalog resources and agent grants are distinct from thesandbox.volumes
selection sent with a run:
Skills
Schedules and playbooks
Live events
getEventsUrl() and EventSourceManager use an apiKey query parameter for browser EventSource compatibility. The current Cloud authentication middleware does not accept query-string API keys, so these helpers cannot authenticate a direct Cloud SSE connection. Use a server-side SSE client with an Authorization header or an application-owned authenticated proxy. See Events.
Errors
Application databases
The Databases API usespolpo.listData(),
polpo.createData({name,schema}) and polpo.data(nameOrId).
db.transaction(operations, {idempotencyKey}) runs atomic typed record operations.
db.query supports scoped SQL and explicit write mode; it is a bounded PostgreSQL
subset. Administrators use db.migrate for additive JSON schemas,
db.migrateSql for supported SQL DDL/backfills and db.migrations() for history.
Keep application keys server-side and enforce your application’s user permissions
before calling Polpo. The SDK never needs a Neon key or database URL.