A nightly job processes 10,000 documents with no human watching.
You built it on the streaming API to feel modern.
- AUse batch, non-streaming calls - throughput and cost matter here, not live typing
- BKeep streaming; it’s always the best choice
- CKeep streaming but write each chunk to disk as it arrives, so a crash halfway through loses as little work as possible
- DRun it during the day so someone can watch the stream
Answer: A
Use batch, non-streaming calls - throughput and cost matter here, not live typing
Why
Streaming exists for interactive UX - showing tokens as they arrive. For unattended bulk work, batch processing is simpler, cheaper, and higher-throughput.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path