Real-time streaming chat powered by Claude. Supports conversation history, model selection, and custom system prompts.
wss://p417pa2mu2.execute-api.us-east-1.amazonaws.com/prod?token=<idToken>idToken as a query parameter: ?token=<idToken>WebSocketSend a chat message to get a streaming AI response.
action"sendMessage"questionThe user's message/questionknowledgeDbIdKnowledge base contextmodel_id"basic" (default model)system_promptOptional system prompt// Send message
{
"action": "sendMessage",
"question": "What are the key findings?",
"knowledgeDbId": "kb_abc123",
"model_id": "basic"
}startAI has started generating a response.
{ "type": "start" }chunkA piece of the streaming response text.
{ "type": "chunk", "text": "Based on..." }endThe response is complete.
{ "type": "end" }errorAn error occurred during processing.
{ "type": "error", "error": "Rate limit" }historyResponse to load_history action.
{ "type": "history", "messages": [...] }clear_completeConversation history was cleared.
{ "type": "clear_complete" }Load conversation history with pagination.
{ "action": "load_history", "knowledgeDbId": "kb_abc123", "start": 0, "end": 50 }Clear all conversation history for a knowledge base.
{ "action": "clear_conversation", "knowledgeDbId": "kb_abc123" }