BizKitHub
DocsAPI ReferenceBff/bff/ai/agent-stream
postBffAdmin BFF

/bff/ai/agent-stream

Runs a multi-step agent loop. Model must be one of the allowed identifiers (see body.model). Max steps default 10, hard cap 12. SSE events: start, step-start, text-delta, reasoning-delta, tool-input-start, tool-call, tool-result, step-finish, finish, error.

bffpostBffAiAgent-stream

Parameters

JSON body

Request body

application/json
messagesobject[]Required

Full multi-turn conversation history including the last user turn.

Each array item:
role"user" | "assistant"Required
contentstringRequired
Length: 124000
model"gemini-flash-latest" | "gemini-2.5-flash-lite" | "gpt-5" | "gpt-4o" | "gpt-5-mini"Optional

Allowed model identifier. Defaults to gemini-flash-latest.

maxStepsstring | integerOptional

Maximum agent-loop steps before stopping. Hard-capped at 12 to bound cost per turn.

One of 2:
Variant 1
stringinteger
Default: 0
Variant 2
integer

Maximum agent-loop steps before stopping. Hard-capped at 12 to bound cost per turn.

Range: 112
roomIdstringOptional
Length: 2424

Response schema

1 status code documented

200Success

This response returns no JSON body.

Response example

application/json
{
  "success": true
}

Request example

POST /bff/ai/agent-stream

post
curl -X POST "https://api.bizkithub.com/bff/ai/agent-stream" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "messages": [
    {
      "content": "example_content"
    }
  ],
  "roomId": "example_roomId"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key