Complete checkpoint
support.ts
Run it
Verify the result
You should see alookup_order diagnostic and incremental response text reporting Friday. Providers can buffer chunks, so visible token-by-token timing varies.
Consume the iterator until it ends. A finish chunk can finish one model call while the Agent still has tools to run. Do not break the loop on the first finish chunk.
An iterator error must reach your request handler. On an HTTP disconnect, abort the run and release the iterator; cancellation does not undo a tool that already completed. Read the execution lifecycle and observability guide before connecting logs to an external destination.
Expose an HTTP API
Continue to the next chapter.