Here's a pattern in AI SDK v5 beta that can run multiple agents in a loop. It's built on three primitives: - Custom data stream parts (new in v5) - Custom shared context (in a class) - A while loop This is the most flexible setup I've found for shipping workflows & agents
Went a bit overboard and did you a personal YouTube video, enjoy gist.github.com/mattpocock/ff8…