Streaming Response
Monitor task progress in real-time using two streaming methods.
Stream Agent Step Updates
The stream()
method gets the latest step on every change.
Watch All Updates
The watch()
method lets you see the entire state of the task. The generator emits the latest state whenever the task is updated.
Key Differences
.stream()
: Only streams agent steps (recommended).watch()
: Streams all updates including status changes
Make sure to use .stream()
for progress monitoring and .complete()
for the final response.