Documentation has been published for , adding bidirectional communication for background tasks. Running tasks can now receive real-time signals mid-execution.
This supports workflows like human-in-the-loop approvals, where a task is paused for a user's review, or interactive AI agents that require mid-generation cancellation. Typed data payloads can be pushed into active tasks from backend routes or directly from React frontends via a .
Inside the task, compute resources can be freed using , or continuous listeners can be attached for incoming events. Here is how an input stream is defined:
1export const approval = streams.input<{ approved: boolean }>({ id: "approval" });