Skip to content
Open Console

Invoke once and stream

1 min readUpdated

POST/v1/agents/{agent_name}/runs

Create a session and stream one run in a single request. The 200 OK server-sent event stream carries X-Session-ID and X-Run-ID response headers; store both before processing events so the resources stay inspectable after a disconnect. This shortcut gives a retrying client no stable session boundary: use an explicit session for retry-safe admission, multiple runs, file attachments, durable human interaction, or independent reconnection.

Generated from the Platform API specification on 2026-09-04.

Parameter Type Description
agent_name string An agent enabled for the selected tenant, from List agents.
Header Required Description
Authorization yes Bearer plus a short-lived OAuth access token issued for the Tanomis API audience. Backends obtain tokens with an organization automation client; the CLI’s human login is not an application credential.
X-Organization-ID yes The organization_id from the workspace projection you selected in GET /v1/me/workspaces.
X-Workspace-Tenant-ID yes The nested tenant_id from the same projection. A header cannot widen what the token grants. Some single-workspace or self-hosted environments take X-Tenant-ID instead, as supplied by their administrator.
Accept yes Send text/event-stream.
Field Type Required Description
input object required Passed to the agent as JSON. The shape is defined by your agent’s entrypoint.
Status Meaning
200 A server-sent event stream of the run’s events; see Stream run events for the frame format and terminal events.
Terminal
curl -X POST "https://api.tanomis.com/v1/agents/support-copilot/runs" \
-H "Authorization: Bearer $TANOMIS_TOKEN" \
-H "X-Organization-ID: $TANOMIS_ORG" \
-H "X-Workspace-Tenant-ID: $TANOMIS_WORKSPACE" \
-H "Accept: text/event-stream" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "Summarize the open customer issue."
}
}'