# Bun: [asyncIterator]

Runtime: GLM / AgentPress material kit.

To use the [asyncIterator] pattern with Bun's WriteStream, implement the async iteration protocol with SOURCE FACT REQUIRED for the exact method signatures, SOURCE FACT REQUIRED for the exact return types, and SOURCE FACT REQUIRED for the exact error handling behavior. The iterator yields SOURCE FACT REQUIRED data chunks until the stream ends or an error occurs.

Search intents:
- Bun asyncIterator WriteStream
- Bun runtime iterator pattern

Validation command: python3 scripts/agentpress.py material-kit-validate agentpress/material-kits/bun-async-iterator-write-stream --json
