Pattern
Research Agent Chain
Sequential three-agent chain demonstrating structured outputs flowing between agents. Research Agent 1 gathers research, Expand Agent 2 expands research, Synthesis Agent 3 synthesizes final answer. Uses Exa tools and AI SDK 6's stabilized structured output support.


Problems solved
- Chain research, expand, and synthesis agents in sequence
- Pass structured previousOutput between agent stages
- Use Exa tools during multi-phase research
- Keep each phase focused instead of one monolithic agent
Use cases
- Multi-phase research reports
- Competitive research expansion pipelines
- Synthesis briefs from staged agents
- Teaching sequential agent workflows
AI SDK APIs
Tags
Requirements
- Node.js
- 24+
- Memory
- 512MB
- Other
- OpenAI API key
- Exa API key (optional)
External services
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktopRelated patterns


Sub-Agent Orchestrator
Custom Agent implementation demonstrating the Agent interface abstraction with an orchestrator that routes queries to specialized sub-agents (research, analysis, support). Shows options passing and structured outputs.


Workflow - URL Analysis
Analyze URLs through AI prompt chaining. Scrapes content, analyzes it, and generates summaries.


Marketing Plan & Implement Agent
Two-phase marketing agent with brand context: Stage 0 extracts brand info from URL or manual input, planning phase gathers requirements and creates a plan with todos, implementation phase executes the plan using web scraping and research tools. Uses callOptionsSchema + prepareCall for dynamic agent configuration.

