v3
latestOpenAPI 3.1.02026-08-06274467602.9 KBchat
Chat Main Agent
Receives and processes a streaming chat request via the AgentService.
This endpoint streams the agent's response in real-time using Server-Sent Events.
Args: request: The chat request data containing message and project_id (pre-validated). agent_service: The AgentService instance (dependency).
Returns: StreamingResponse with Server-Sent Events containing streaming chat data.
Raises: HTTPException: 400 for validation errors. HTTPException: 404 if project not found or user doesn't own it. HTTPException: 500 for unexpected errors.
post/api/v1/chat/stream
Request body
Example request
{
"project_id": "00000000-0000-0000-0000-000000000001",
"current_focused_layer_id": "00000000-0000-0000-0000-000000000000"
}Response
Successful Response
{"stackTrail":"paths:/api/v1/chat/stream:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}