Skip to content
BENIBIX Learn

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.

AI🧩 Claude Agent SDK

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.

Example
Mia's chat app sends each new user message into the same stream. Users can add a screenshot or stop Claude mid-answer.
Why it matters
Real apps need follow-ups, images and a stop button. Only this mode has all three.
Full entry
AI🧩 Claude Agent SDK

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.

Example
Leo's nightly job asks the agent to sum up the day's commits. One prompt is all it needs, so he uses single message input.
Why it matters
It is the simplest way to run a task, as long as the task needs no follow-up.
Full entry

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.