Engineering · AI Agent Architecture

Agent UX: Streaming, Interrupts, and Clarification

Product patterns for streaming phases, visible tool steps, stop signals, and batch clarification that raise success rates.

1. Streaming and staged feedback

Show planning, retrieving, and generating phases. Label tools in human language. On failure, offer retry and a narrower question.

2. Clarification and slot filling

Ask for every missing slot once. Confirm ambiguous dates and amounts. When intent changes, merge into state instead of dropping history.

3. Interrupt, undo, and transparency

Honor stop for unfinished tool chains. Explain irreversible side effects. Expose a collapsible list of sources used in the turn.

4. Engineering checklist

5. Sample configuration

ui:
  stream: { phases: true, tool_labels: human_readable }
  clarify: { batch_missing_slots: true }

6. FAQ

Do frequent interrupts confuse the agent?
Write cancel_reason and rebuild from a fresh observation instead of continuing a half tool chain.