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
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.
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.