Transport method matrix
Which SDK methods work on each transport, and which transport is recommended.
Legend
β
Supported and recommended
β οΈ
Supported but not recommended for this use case
β
Not supported or impractical
Matrix
Method
WebSocket (ws)
HTTP (http)
Recommended
connect()
β
β
Both β auth is always HTTP
getPlanLimits()
β
β
Both
disconnect()
β
β
WS
send()
β
β οΈ
WS for live chat
sendBinary()
β
β
WS only
sendAI()
β οΈ async via onMessage
β sync response
HTTP
fetchAIHistory()
β οΈ
β
HTTP
deleteAIHistoryMessage()
β οΈ
β
HTTP
fetchChatHistory()
β οΈ via onMessage
β
HTTP for sync; WS if already connected
deleteChatHistoryMessage()
β οΈ
β
HTTP
search()
β οΈ
β
HTTP
addDocument()
β οΈ
β
HTTP
updateDocument()
β οΈ
β
HTTP
deleteDocument()
β οΈ
β
HTTP
listDocuments()
β οΈ
β
HTTP
getDocument()
β οΈ
β
HTTP
runWorkflow()
β οΈ
β
HTTP
sendWithOpenAI()
β οΈ deprecated
β οΈ deprecated
Use sendAI on HTTP
β οΈ on WebSocket means the method sends a framed packet and may return only a message id; the full response arrives on onMessage (or not at all for fire-and-forget operations).
Incoming messages
Transport
onMessage behavior
ws
Real-time delivery of messages, AI replies (code 300), chat history responses
http
Not used for push β each method returns its response directly
Typical dual-transport architecture
Chat client
ws
send(), onMessage, optional fetchChatHistory
Backend AI service
http
sendAI(), search(), runWorkflow(), document CRUD
Both instances use the same appId and secret with different userId values as needed.
Authentication
Both transports authenticate identically during connect():
Authenticate over HTTPS with
appId,secret, anduserIdReceive an auth token and plan limits
WebSocket clients complete handshake; HTTP clients proceed immediately
Choosing a transport
See also
Last updated