Skip to content

Stream an agent chat turn

POST
/api/agent/chat
curl --request POST \
--url http://localhost:8080/api/agent/chat \
--header 'Content-Type: application/json' \
--cookie auth_session=<auth_session> \
--data '{ "additionalProperty": "example" }'

Runs an agent chat turn and streams the response using the Vercel AI SDK UI message stream protocol.

Media typeapplication/json
object
key
additional properties

Example generated

{
"additionalProperty": "example"
}

Streaming response (AI SDK UI message stream / SSE).

Media typetext/event-stream
string

Invalid request

Media typeapplication/json
object
success
boolean
error
string

Example

{
"error": "Error message"
}

Internal server error

Media typeapplication/json
object
success
boolean
error
string

Example

{
"error": "Error message"
}