The biggest UX mistake with AI agents:
Making the user stare at a spinner for 60 seconds.
Even if the job is running in the background, your UI should feel 'Realtime'.
Here is how to stream background updates to the frontend 🧵
Standard background jobs are 'Fire and Forget'.
frontend -> POST /api/job
backend -> Job ID: 123
frontend -> Polls /api/job/123 every 5s...
This feels slow and clunky.
We built 'Realtime' streams to bridge this gap.
Your background agent can 'emit' updates as it thinks:
"Reading file..."
"Analyzing data..."
"Drafting response..."
Your React frontend subscribes to these events instantly.