Skip to main content
A long piece of work with a progress view is still run(). AgentRun is awaitable and iterable: run.events is the live feed, and awaiting the same object gives you the report at the end.
Vendo’s chat UI is not handed over here, deliberately. This lane gives you an event stream and a report — the surface is yours to build. If you want Vendo’s own thread, overlay, and generated screens, that is the umbrella (createVendo + <VendoProvider>), not this SDK.

The route

Three details carry their weight:
  • run.threadId is available immediately, before the first event — so the header goes out with the response, not after it.
  • signal: req.signal ties the run to the connection. The browser closes the tab, the request aborts, the run stops. There is no cancel() to call.
  • await run after the loop is the report. Iterating the events does not consume the result; the same object is both.

What comes over the wire

run.events yields RunEvents, each tagged by type: Forward them whole, as above, and branch in your UI — a new event type then reaches your client the day it ships instead of being swallowed by a server that only knew five.

Ending on the report

The report is the honest close: status, the model’s summary, the toolCalls it made, refs.threadId and refs.approvals, and usage.
Anything parked for a human is in refs.approvals. Acting on one of those is a fresh run(), not a resume of this one — see Approvals inside run.

Reference

AgentRun, RunEvent, and the full report shape.

Vendo's own surfaces

The umbrella, if you want the thread, the overlay, and generated screens.