Back to Developer Roadmap

Streaming Responses

src/data/roadmaps/ai-engineer/content/streaming-responses@MUDBYjR7uCUZQ-kQxi2K_.md

4.01.1 KB
Original Source

Streaming Responses

Streamed responses is one of the techniques an AI agent can use to send its answer to the user. With a streamed response, the agent starts sending words as soon as it generates them. The user sees the text grow on the screen in real time. This feels fast and lets the user stop or change the request early. It is useful for long answers and chat-like apps. By contrast, an unstreamed response waits until the whole answer is ready, then sends it all at once. This makes the code on the client side simpler and is easier to cache or log, but the user must wait longer, especially for big outputs.

Visit the following resources to learn more: