Streaming Input vs Single Message Input
People think the two input modes are the same thing in a different form. Single message input sends one prompt and ends. It takes no images and cannot be stopped mid-turn. Streaming input keeps a session open, so you can send more, add images and stop it. Pick single message input for one-shot jobs, and streaming input for a chat.
Streaming Input Mode
The mode that keeps one session open. You can send more, add images and stop it.
Streaming input mode is the way of using the Agent SDK where you feed prompts to one long-lived session as a stream. You can send more messages while the agent works, attach images, stop a turn and change the model mid-session. The docs call it the preferred mode. A limit such as max turns ends a turn but leaves the session alive.
Single Message Input
The mode that sends one prompt and ends, for jobs done in one go.
Single message input is the way to use the Agent SDK where you pass one prompt to query and read the result. It suits one-shot jobs and places that keep no state, such as a lambda. It cannot take images, queue more messages or be stopped. If a run hits a limit, the call raises an error after the result.
In one line
- Streaming Input Mode
- The mode that keeps one session open. You can send more, add images and stop it.
- Single Message Input
- The mode that sends one prompt and ends, for jobs done in one go.