Skip to main content

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. ChatCompletionStream exposes sessionId, aborted, askUser, missionPreview, vaultPreview, openFile, navigateTo, and openTab, plus abort().

Sessions

Pass sessionId to chat calls to continue a session. The caller should still include the message history needed by the model.

Agents and loops

Use 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

Vault list operations return metadata and credential key names, never values. Use project Connections for new shared API keys, OAuth accounts, and external integrations. Vault APIs remain for compatibility with agent-scoped secrets.

Files

Attach an uploaded path with a chat content part such as { type: "file", file_id: "/workspace/report.pdf" }. Agents use their configured file or image tools to inspect it.

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