Two ways to read a chat
A simple integration can send with
threads/send and then poll threads/messages until the run finishes. Use threads/subscribe when you want live progress.
Subscribe
threads/subscribe takes the chat (a botId, groupId or externalConversationId) and a cursor. Pass -1 to start from now, or the last seq you saw to resume without gaps. threads/head returns the current cursor.
The response is a stream of server-sent events. Each event carries one product event in the same json envelope:
Event types you will see most
Other types exist (routines, skills, memory, usage). Ignore the ones you do not need. New types may be added, so do not fail on an unknown one.
Resuming
Keep the highestseq you have processed. If the connection drops, subscribe again with that value as cursor and you receive only what you missed.