A transit app team wants riders to see intermediate status while an agent calls arrival-prediction tools. What construction practice supports that experience?
Select an answer to reveal the explanation.
Short Explanation
Riders hate a frozen screen. Streaming status while arrival tools run is like the bus board flipping '2 min' while the system still checks the next stop—progress you can see.
Full Explanation
Build a streaming-aware agent loop that emits status while tools run so riders see intermediate progress during arrival-prediction tool calls. Transit UX suffers when the screen freezes for the full tool duration; a streaming-aware construction flushes interim status ("checking arrivals for stop 1421") while the agent awaits predictions, then updates with results. That practice keeps users informed without waiting for a single buffered finale.
Caching arrival estimates in memory speeds up repeated queries but does not show intermediate status while the current tool run is still in progress, so it fails the intermediate-status requirement. Rendering detailed formatted cards with route maps improves how final results look, but it still waits until tools finish before showing anything, so it fails the intermediate-status requirement. Logging tool calls and latencies to an observability dashboard helps developers debug backend performance, but riders never see those logs, so it does not provide intermediate status in the app.
Exam caveat: streaming status must not leak sensitive tool internals or raw credentials. Emit rider-safe progress messages, not full backend dumps. Streaming improves perceived latency; it does not replace accurate arrival data.
Operational check: implement an agent loop that yields status events on tool start/finish, render those events in the transit app UI, verify no PII/secrets in stream payloads, and measure time-to-first-status versus time-to-final-arrival under load.