Search documentation
karat

+

K

User Documentation ↗

Streaming Continue Session

POST/api/v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/streamingContinue
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Continue a conversation session with an Agent, or add the first exchange to a session after creation. Adds a new exchange to the session with the provided inputs, and generates a response from the Agent. Returns a stream of the Agent response text (formatted using markdown) for clients to consume as the response is generated. On completion of the streamed response, clients can load the full details of the exchange that was added to the session by reloading the session content. Streamed exchanges also support cancellation; see cancel for details. Concurrent requests to continue the same session are not supported. Clients should wait to receive a response, or cancel the in-progress exchange, before sending the next message.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:aip-agents-write.

Path parameters

agentRid
string

An RID identifying an AIP Agent created in AIP Agent Studio.

sessionRid
string

The Resource Identifier (RID) of the conversation session.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

StreamingContinueSessionRequest
object
Hide child attributes

Hide child attributes

userInput
object

The user message for the Agent to respond to.

Show child attributes

Show child attributes

parameterInputs
map<ParameterId, ParameterValue>
optional

Any supplied parameter values to pass to the Agent for the exchange.

Show child attributes

Show child attributes

contextsOverride
list<InputContext>
optional

If set, automatic context retrieval is skipped and the list of specified context is provided to the Agent instead. If omitted, relevant context for the user message is automatically retrieved and included in the prompt, based on data sources configured on the Agent for the session.

Show child attributes

Show child attributes

messageId
string
optional

A client-generated Universally Unique Identifier (UUID) to identify the message, which the client can use to cancel the exchange before the streaming response is complete.

Response body

body
string

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/aipAgents/agents/ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1/sessions/ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6/streamingContinue?preview=true" \ -d '{"messageId":"00f8412a-c29d-4063-a417-8052825285a5","userInput":{"text":"What is the status of my order?"}}'