Pattern
ADV·Dec 25
Human in the Loop Plan Builder Agent
Uses ToolLoopAgent pattern to gather requirements and generate plans. Generates markdown plans with structured todo lists.
View Full Pattern on Desktop

Problems Solved
- Interactive plan building through conversation
- Structured todo list generation with dependencies
- Iterative plan refinement with user feedback
- Human-in-the-loop approval workflows
- Dynamic question generation with generateObject
- Markdown plan rendering with sections
Use Cases
- Project planning and task breakdown
- Feature implementation planning
- Migration and upgrade planning
- API integration planning
- Performance optimization planning
- CI/CD pipeline setup planning
AI SDK APIs
ToolLoopAgenttool(generateObjecttoModelOutputhasToolCallstepCountIsuseChatcreateUIMessageStreamstreamText
Tags
aihuman-in-the-loopplanningtodo-listmarkdowniterative-refinementapproval-workflowsai-sdktool-loop-agentgenerate-objectstreaming
Requirements
- Node.js
- 24+
- Memory
- 512MB
- Other
- OpenAI API key
Environment Variables
OPENAI_API_KEYGet key →
External Services
openai
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View Pattern on DesktopRelated Patterns


HIL Inquire Text Input
Gather detailed information through AI-driven text input questions. Includes approval workflows and real-time rendering.
aihuman-in-the-loop+9
View →


HIL Inquire Multiple Choice
Gather information through AI-driven multiple choice questions. Includes approval workflows and real-time rendering.
aihuman-in-the-loop+8
View →


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.
aiagents+9
View →
End of Pattern

