agent

Query

AI query endpoint using NEW Planner/Executor workflow.

New Plan-First Workflow (Phases 1 & 2):

  1. Create execution plan from query
  2. Return plan for user approval (via WebSocket)
  3. Execute plan after approval
  4. Stream progress via WebSocket

This replaces the old AIService.stream_with_tools() approach.

SECURITY: user_id is extracted from JWT token (cannot be spoofed).

Args: request: Query request user: Current user (from JWT) db: Database session

Returns: Plan details and approval status

post/ai/query

Request

  • Base URL: https://api.dialogbrain.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.dialogbrain.com/ai/query
  • Auth: none declared

Request body

querystring required
session_idstring required
modelstring nullable
contextobject nullable
use_ragboolean nullable

Response

Successful Response

responsestring required
actionsobject[] nullable

Changes

No recorded changes to this operation across all 5 revisions of this API.