Add a multi-agent chat example built with the Vercel AI SDK, showing how a main agent delegates specialized tasks to a sub-agent and returns Generated UI inline with regular text.
We are building a chat experience that requires AI analytics. We use a multi-agent architecture where:
A main agent (with a complex system prompt) handles the general conversation.
It delegates specific tasks to an "Analytics" sub-agent.
The sub-agent processes the request and returns an OpenUI spec.
The main agent then needs to return that Generated UI inline alongside its own regular text/markdown response.
Currently, it's difficult to figure out how to render both regular text (e.g., in Streamdown) and the Generated UI together, as the default component strips out other text.
Add a multi-agent chat example built with the Vercel AI SDK, showing how a main agent delegates specialized tasks to a sub-agent and returns Generated UI inline with regular text.
We are building a chat experience that requires AI analytics. We use a multi-agent architecture where:
Currently, it's difficult to figure out how to render both regular text (e.g., in Streamdown) and the Generated UI together, as the default component strips out other text.