Clatter LabsHelp Center

How do I reconnect to a stream without missing or repeating steps?

How-toUpdated

One connection lasts up to 10 minutes, and networks drop. To resume:

  1. Keep a counter after. After each step event, set after = data.index + 1.
  2. When the connection ends without a done event (a timeout event, an error or a dropped socket), reconnect:
curl -N "https://api.agent.clatterlabs.xyz/v1/runs/RUN_ID/events?after=12" \
  -H "Authorization: Bearer $CLATTER_API_KEY" \
  -H "X-Clatter-Account: $CLATTER_ACCOUNT_ID"
  1. Stop when you receive done.

The docs include complete Python and JavaScript clients that do exactly this.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.