agent
Query
AI query endpoint using NEW Planner/Executor workflow.
New Plan-First Workflow (Phases 1 & 2):
- Create execution plan from query
- Return plan for user approval (via WebSocket)
- Execute plan after approval
- 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
Response
Successful Response
Changes
No recorded changes to this operation across all 5 revisions of this API.