Skip to main content

Coach surface

Coach provides conversational guidance, context-aware follow-ups, and sessionized history.

Primary capabilities

  • Bootstrap coach state and active session
  • Create, list, rename, and delete chat sessions
  • Stream assistant responses via SSE
  • Bind conversations to insight context
  • Collect per-message feedback and follow-up questions

Key endpoints

  • GET /api/coach/bootstrap
  • POST /api/chat/session/create
  • GET /api/chat/sessions/list
  • GET /api/chat/history/{session_id}
  • POST /api/chat/send (stream)
  • PUT /api/chat/session/{session_id}/binding
  • POST /api/chat/session/{session_id}/message-feedback
  • POST /api/chat/followup_questions

Request and response examples

GET /api/coach/bootstrap
Authorization: Bearer <accessToken>
POST /api/chat/session/create
Content-Type: application/json
Authorization: Bearer <accessToken>

{
  "chatType": "free",
  "userId": "1005"
}

Transport notes

  • POST /api/chat/send returns server-sent events.
  • Event envelope supports text_chunk, wic, control, and error payload types.

Common error patterns

  • 401 Unauthorized: missing or expired access token
  • 400 Bad Request: invalid sessionId or malformed payload
  • 500 Internal Server Error: orchestration/tooling failure; retry or escalate