Send a message to one of your project agents and stream the response. The
agent answers with text and, when the question calls for a visualization, a
generated chart configuration you can render, save, and add to dashboards.
This endpoint streams its response. It is not part of the OpenAPI playground
— use the examples below to integrate it.
Endpoint
Authentication
Authenticate with a project user token obtained from
Get Project User Token:
The token determines which organization’s data the agent can access, so each
of your end users sees only their own data.
Request body
Response stream
The response is a text/event-stream of newline-separated events, each on a
data: {json} line. Every event has a type; the ones you need are:
Other event types may appear (workflow steps, finish markers); ignore any
type you don’t handle.
The chart result
When the agent builds a chart, a tool-result event arrives with
payload.toolName === "generateChart". Its payload.result contains:
chartConfig is ephemeral — the chat endpoint does not persist charts.
To keep a chart (and add it to a dashboard), pass chartConfig to
Save Chart from Chat. Do not
strip sqlOverride; a chart saved without it cannot load data on a
dashboard. generatedChartRef is a transient session ID, not a chart ID.
Example: call and parse the stream
Rate limits
Requests are rate limited at 180 requests per minute per organization + user.