Multi-Step & Parallel





Pattern
Multi-Step Tool Pattern
Execute multi-step workflows with typed tools. Includes streaming, tool chaining, and decision-making for automated tasks.
IntermediateOct 2025View the full pattern on desktop


Problems solved
- Coordinate multi-step tool calling inside an Experimental_Agent loop
- Chain dependent tool results across several agent steps
- Stream progressive tool activity to the chat UI
- Stop runaway loops with step-count controls
Use cases
- Research agents that gather then synthesize
- Ops assistants that complete multi-step checklists
- Data enrichment chats with sequential tools
- Teaching multi-step tool patterns with AI SDK agents
AI SDK APIs
new Agenttool(stepCountIsgenerateObjectExperimental_Agenttools:gatewayhasToolCall
Tags
aiagentstoolsmulti-stepweb-searchnewsanalysisai-sdk-v5strongly-typedstreaming
Requirements
- Node.js
- 24+
- Memory
- 1GB
- Other
- OpenAI API key
- Perplexity API key
External services
perplexityopenaihackernews
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktopRelated patterns


Orchestrator-Worker Pattern
Coordinate multiple worker agents for project management. Handles task distribution, progress tracking, and result synthesis.
aiagents+8
View pattern β


Evaluator-Optimizer Pattern
Improve output quality with dual agents. Evaluator analyzes quality while optimizer refines results through iterative feedback.
aiagents+9
View pattern β



