Human-in-the-Loop

Pattern
Human in the Loop Plan Builder Agent
Uses ToolLoopAgent pattern to gather requirements and generate plans. Generates markdown plans with structured todo lists.
AdvancedDec 2025View the full pattern on desktop


Problems solved
- Gather requirements conversationally before drafting a plan
- Generate markdown plans with structured todo lists
- Refine plans iteratively with user feedback
- Stream ToolLoopAgent plan building through createAgentUIStreamResponse
Use cases
- Feature implementation planning
- Migration and upgrade planning
- API integration checklists
- CI/CD setup planning agents
AI SDK APIs
ToolLoopAgenttool(generateObjecttoModelOutputhasToolCallstepCountIsuseChatcreateUIMessageStreamstreamTextInferAgentUIMessagegateway
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 the pattern on desktop






