Cross-Device Continuity
Feature Overview
The ChatBotKit API separates running a completion from watching it. One device dispatches a conversation completion to run in the background and gets back a channel ID. Any other device that holds a valid key can subscribe to that channel and receive the events as the completion progresses.
This makes the platform device-agnostic. The device that starts the work and the device that observes it never have to be the same. Dispatch a long completion from a laptop, then watch the tokens stream in on a phone. Kick one off from a CI job and follow it on a dashboard. Because the work runs server-side and the channel is the handoff, the originating client is free to disconnect the moment it dispatches.
What You Can Do
- Dispatch a completion on one device and subscribe to its channel on another.
- Fire off long-running work and reconnect to its channel later from anywhere.
- Let several devices subscribe to the same channel and follow one run together.
- Replay recent events when a client joins mid-flight, so nothing is missed.
- Build multi-screen experiences where one surface drives the agent and others follow along live.
How It Works
Dispatch and subscribe are two separate calls, joined by a channel ID:
dispatchruns a conversation completion in the background and returns achannelIdimmediately. The completion is processed server-side, publishing events to that channel as it goes - tokens, tool calls, and the final result - the same events the streaming complete endpoint produces.channel.subscribeopens a streaming connection to that channel and delivers each event as it is published. Multiple subscribers can attach to the same channel at once.
Recent events are retained for up to an hour, so a subscriber that connects slightly late can replay what it missed by passing historyLength and then continue live.
The channel ID is the only thing the two devices share, and the completion keeps running on the server regardless of whether either device stays connected. Treat the channel ID as a secret - anyone with it and a valid key can subscribe to the events.
Use Cases
- Draft a report on a desktop and watch the finished version arrive on your phone.
- Trigger an agent from a Slack message and follow its progress in a web dashboard.
- Start a research completion from the CLI and collect the result from an automation later.
- Power companion experiences where a TV or kiosk displays what a handset is driving.
Availability
Cross-device continuity is inherent to the ChatBotKit API - no special mode to enable. Any client with a valid key can dispatch a completion and any client with the channel ID can subscribe to its events, on any device, at any time.