Answers that stream in
Run a Logic Block with an AI step over the socket and show the answer as it is written. Keep history in an entity.
Every app gets a secure wss:// endpoint. Users connect with their own sign-in token, join channels you name, and receive streams and broadcasts. The server scopes every channel to the caller's org and workspace.
const ws = new WebSocket(`wss://<your app's realtime endpoint>?token=${token}`);
ws.onopen = () => ws.send(JSON.stringify({
action: 'customapi_run', // run a Logic Block, stream it
channel: 'order-board', // you name it; scoped to your workspace
message: { apiName: 'mark_shipped', input: { id: '4821' } },
}));
ws.onmessage = (e) => {
const { type, data } = JSON.parse(e.data);
// customapi_result → your own result
// customapi_message → pushed to everyone on the channel (notifyall)
// turn_event → each step of a crew run
};Send { action, channel, message }. Replies come back as { type, data } frames. A connection sits on one channel at a time and moves when a message names another.
Run a Logic Block with an AI step over the socket and show the answer as it is written. Keep history in an entity.
Show each step of a Logic Block or a crew as it happens, instead of a spinner.
Stream every turn of a crew run, and give admins a live feed of all runs in a workspace.
A user runs a Logic Block over the socket and notifyall pushes its result to the whole channel: an order board, a live scoreboard, a shared queue.
Connect your AI client, build your backend, ship to production.