Skip to main content
The stream result exposes replayable consumers for text and structured events.
Use the full event stream when the UI needs reasoning deltas, tool progress, approval checkpoints, or lifecycle changes in addition to provider items.
PHP item values are generic arrays or objects rather than a closed typed item union. Validate the fields your UI consumes and preserve an unknown-item fallback for newer provider events.
PHP consumes the provider stream synchronously and makes the collected sequence replayable. This is appropriate for request workers and CLI programs, but it is not a background push channel by itself.
Last modified on July 26, 2026