SessionsAG-UI
Run an agent
POST
For a person, named by a trusted issuer's token or by Nylorun-Subject. The thread is one session per person, agent and thread, created on its first run with forwardedProps.nylorun.session. The trailing user message starts a turn (its id is the idempotency key); resume answers interrupts. A busy session is a RUN_ERROR in the stream.
header
AuthorizationBearer <token>An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).
agentId*stringNylorun-Protocol*stringThe protocol version, 8
Nylorun-Subject?stringThe person an application key acts for
Nylorun-Scopes?stringThe subject's space-separated scopes; required with a subject
application/json- body
threadId*stringrunId*stringprotocolVersion?stringparentRunId?stringstate?unknown|nullmessages*array<||||||>tools?array<>Default
[]context?array<>Default
[]forwardedProps?unknownresume?array<>[key: string]?unknownThe run's events, from RUN_STARTED to its end
text/event-streamcurl -X POST "https://example.com/v1/ag-ui/agents/string" \ -H "Nylorun-Protocol: string" \ -H "Content-Type: application/json" \ -d '{ "threadId": "string", "runId": "string", "messages": [ { "id": "string", "role": "developer", "content": "string", "property1": null, "property2": null } ], "property1": null, "property2": null }'Empty