Skip to main content
POST
Run one stateless text-chat completion turn.

Body

Completion request with the agent reference, conversation, and prior state.

Stateless text-chat completion request. Carries the full conversation history (client-owned) plus the encrypted server-issued DashaAI.BlackBox.AgentAPI.TextChat.Dtos.TextChatCompletionRequest.State from the previous turn.

agent
object
required

Agent to drive the completion — by id or by inline config.

messages
object[]
required

Complete conversation history including the new user message at the end. Tool calls are bundled in the previous assistant turn(s).

state
string | null

Opaque encrypted state from the previous turn. Null/omitted on the first turn.

additional_data
object | null

Free-form variable bag merged into agent prompt template variables (e.g. {{customerName}}). Matches the project-wide AdditionalData convention.

finish
boolean | null

Client/user signal to end the conversation. When true, this turn still produces an assistant reply (if any) and then runs the same finish pipeline as the agent's finishTheConversation built-in: post-call analysis + completion webhook + persistence + audit events.

Response

Completion succeeded.

Result of a single stateless text-chat completion turn.

messages
object[] | null

New messages produced during this turn. Ordered: any assistant tool-turns first (each bundling its tool calls with their executed responses), followed by the final plain-text assistant reply.

state
string | null

Opaque encrypted state to carry forward to the next turn.

is_final
boolean

True when the agent has signalled end-of-conversation (e.g. finishTheConversation).

chat_id
string | null

Server-issued correlation id. Stable across turns. Surfaced for logging.

call_id
string | null

Internal Blackbox call id for this conversation. Stable across turns. Referenced in completion webhooks, the persisted call result, and audit events.