text/plain file payload, and a question — all bundled into one turn.
You’ll end up with. A single streamed answer that references the file contents directly, with optional [Thinking] / [Tool Call] lines if the model emits them.
Demonstrates sending a file as bytes alongside text in a single turn
using send_many with UserSessionMessage.
Expected output
send_many are processed as one turn — the agent sees the intro line, the file bytes (as text/plain), and the question together, and answers once.
See also
Sending files in a session
Single-message file upload via
send(Path).Session send_many
The text-only version of the same batching API.
Session reference
UserSessionMessage and supported MIME types.