I’m looking at implementing multi-agent workflows such as this example in Pydantic AI here: Multi-Agent Patterns - Pydantic AI
I want to have two agents: Joke Selection Agent and Joke Generation Agent.
Joke Selection Agent will ask Joke Generation Agent to generate 5 jokes then Joke Selection Agent will choose the best one.
I want to display the chat output of both the agents in the UI so I was thinking of making both agents have their own API routes and use useChat for both of them. But then it becomes complicated trying to send the output of one agent which is in the UI stream into the tool response for another agent. Has anyone any advice on how to perform multi-agent workflows in Vercel AI SDK.
Thanks!
