This is preview documentation. The official release is not yet available.
eventsUrl and query statusUrl for results. Follow Endpoint integration to publish and submit requests. Console users handle notifications, approvals and acceptance in Inbox.
Submit, subscribe and query
- Submit a Conversation or Job request. Save
invocationId,eventsUrlandstatusUrl; Conversation also returns identifiers such asconversationIdandturnId. - GET
eventsUrlwith the same credential andAccept: text/event-stream. - Parse SSE frames, persist processed cursors and update the UI according to event type.
- Query
statusUrlwhen the stream ends or disconnects to determine the invocation’s status and result.
202 Accepted acknowledges submission. SSE transports events; receiving an event or observing a closed connection does not by itself prove successful completion.
SSE frames
Each business event containsid, event and JSON data, terminated by a blank line. This Conversation example uses demonstration identifiers, timestamps and content:
While waiting for events, the service may send a
: heartbeat comment. Ignore it rather than parsing it as JSON or treating it as work progress.
[DONE] marker.
Conversation and Job payloads
Fields and event types depend on the execution path; providers need not emit the same types or granularity. Optional fields may be absent. Conversation JSON
id identifies a stored record; resume using SSE id / seq. A Job JSON id likewise cannot replace sequence.
Example Job event fields:
invocationId associates stream termination with the current invocation; it does not filter Session history to that turn. Starting at cursor 0 can replay earlier events. Preserve processed cursors and use available correlation such as frameworkMeta.turnId to distinguish turns rather than displaying old output as a new reply.
Subscribe and resume
SetBASE_URL to the Gateway origin, ENDPOINT_TOKEN to the credential used for submission, and EVENTS_PATH to the full returned relative eventsUrl, including query parameters:
platform authentication, replace the authentication header with Authorization: Bearer $ENDPOINT_TOKEN. Use an absolute returned URL directly instead of prefixing BASE_URL.
Save the SSE id after successfully processing a frame. Query status after disconnection, then resubscribe if events are still needed. Use the same URL and credential; set LAST_EVENT_ID to the last processed cursor:
after query parameter. When both are present, they use the greater valid value and read subsequent events. Scope cursors to the corresponding Session or Run; never reuse them across unrelated streams. A client can disconnect after processing but before saving its cursor, so deduplicate by stream identity and SSE ID to avoid repeated notifications or business actions.
Resubscription does not resubmit work. Use the original Idempotency-Key when retrying submission. Resolve authentication or authorization errors before reconnecting after 401/403. Proxies must forward events promptly, disable event-stream buffering and allow sufficiently long read timeouts.
Retrieve results and files
SetSTATUS_PATH to the submission response’s statusUrl:
- Conversation: the response contains
conversationandturns. Match a returned turn’sidto the submittedinvocationIdand inspect its status and error. Session events provide reply content. - Job: inspect
invocation.status. Readinvocation.resultaftercompleted, orerrorCodeanderrorMessageon failure. The response may also includerunandissuesummaries. - Deliverable files: GET
/invoke/v1/jobs/{invocationId}/artifacts, then download using the returneddownloadUrland the same credential.
accepted, dispatching, running and waiting are nonterminal. completed indicates invocation completion; failed, cancelled and timed_out are unsuccessful terminal outcomes. One successful node does not complete a Run. Check Job results against the published output schema and business criteria, including whether partial success is sufficient.
Handle human approvals or deliverable acceptance in console Inbox according to work policy. Reading SSE does not approve operations or accept deliverables.
Use a Job from the fulfillment case to practice progress subscription, cursor persistence, and final-result queries. Resume the original invocation with its own cursor.