Skip to main content
Ask a workspace’s agent a question and stream the answer. 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. It always answers from the workspace’s published (production) version.
This endpoint streams its response. It is not part of the OpenAPI playground — use the examples below to integrate it.

Endpoint

This replaces POST /v1/api/project-agents/{agentId}/chat, which has been removed along with project agents. Requests now name the project and the workspace in the path.

Authentication

Authenticate with a project user token obtained from Get Project User Token:
The token must be for the project in the URL. It determines whose 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.