AI

Generate streaming AI chat response

Generates an AI response with real-time streaming for improved user experience. This endpoint redirects to the o2-sre-agent service for processing.

post/api/{org_id}/ai/chat_stream

Request

Path parameters

org_idstring required

Organization name

Request body

confirm_timeout_secsinteger nullable

Seconds the agent waits for a tool approval before denying it (capped at 600).

contextobject

Contextual information for the AI assistant. Should include:

  • start_time: Start of the time range in microseconds (required for search queries)
  • end_time: End of the time range in microseconds (required for search queries)
  • stream_name: Current stream being viewed (optional)
  • stream_type: Type of stream - logs, metrics, traces (optional)

The frontend should pass the user's currently selected time range and stream context to enable the AI assistant to search within the relevant data scope.

messagesobject[] required

Chat messages in the conversation.

modelstring

Optional model name override.

providerstring

Optional provider name override.

Response

Server-sent event stream

Changes

No recorded changes to this operation across all 1 revision of this API.