staqlydocs
REST APIAPI referenceWorkspace

One turn of the dashboard's assistant

One turn of the dashboard's assistant (server-sent events)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/assistant/chat

The dashboard's chat assistant: a language model on the server's AI provider (AI_ASSISTANT_MODEL through fal.ai) works on the workspace with staqly's MCP tools, as the caller and with the caller's scopes. Tools that only read run at once; any other tool is announced with a confirm event and runs only when the next request carries the person's decision. The conversation lives with the client: each request sends it (the messages streamed as message events are appended to it). Each model call counts as AI usage. Answers text/event-stream, one JSON event per data line; errors after the stream started come as an error event.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Request Body

application/json
  1. body
messages*array<>
decision?
page?string

The dashboard page the person is on

chat_id?string

The chat to keep the conversation in, named by the client (GET /v1/assistant/chats lists them); the server saves it once the turn ends

Match^ach_[a-z0-9]{8,32}$

Response Body

Events: text (streamed text), tool (a tool ran), confirm (a tool waits for the person), message (add it to the conversation), done, error

response?stringtext/event-stream
Example Request
curl -X POST 'https://staqly.example.com/v1/assistant/chat' \  -H 'Content-Type: application/json' \  -d '{  "messages": [    {      "role": "user",      "content": "string"    }  ]}'
Example Response
"string"