Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Transport method matrix

Which SDK methods work on each transport, and which transport is recommended.

Legend

Symbol
Meaning

βœ…

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

Component
Transport
Methods

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():

  1. Authenticate over HTTPS with appId, secret, and userId

  2. Receive an auth token and plan limits

  3. WebSocket clients complete handshake; HTTP clients proceed immediately

Choosing a transport

See Choose your transport.

See also

Last updated