AI Workflow Generation
Let AI help you build workflows by describing what you want to create.
Overview
DUTO's AI Flow Generator (V2) creates complete workflows from natural language descriptions. Instead of manually placing and connecting nodes, describe your goal and the AI builds a validated, ready-to-run workflow.
The system uses a Plan-Based architecture:
- An LLM generates an abstract FlowPlan (logical steps, not raw nodes/edges)
- A TypeScript graphBuilder converts the plan into actual React Flow nodes and edges
- This ensures deterministic graph structure with no LLM-induced wiring errors
How to Access
The AI generator is integrated directly into the Bottom Node Menu at the bottom of the canvas:
- Click the text input area in the Bottom Node Menu
- Type your prompt describing what you want the workflow to do
- Press Enter or click the send button
There is also a standalone AI Flow Generator dialog available for more advanced options.
Quick Actions
The Bottom Node Menu provides one-click quick action suggestions:
Create mode:
- Create image
- Image to video
- Style variations
- Analyze and create
Extend mode (when adding to existing workflows):
- Upscale output
- Add watermark
- Create variants
- Convert to video
- Save to library
Generation Modes
Create Mode
Builds a new workflow from scratch. The generated workflow includes a Start node, input nodes, processing nodes, and output/preview nodes.
Extend Mode
Adds new nodes to an existing workflow. The AI:
- Analyzes your current workflow structure (nodes, edges, endpoints)
- Identifies endpoint nodes (nodes with no outgoing connections)
- Generates new steps that connect to the existing graph
- Preserves all existing nodes and connections
You can also extend from a specific node by right-clicking it and choosing a quick action from the context menu.
Generation Settings
Click the settings icon in the Bottom Node Menu to configure generation behavior:
| Setting | Description | Default |
|---|---|---|
| Image-First | Start with image generation before video | On |
| Upscale Images | Automatically add image upscale nodes | On |
| Upscale Videos | Automatically add video upscale nodes | On |
| Reference Search | Search for reference images via Tavily | On |
| Cinematic Mode | Enable cinematography-aware generation | Off |
| Cinematography Style | Auto, commercial, cinematic, documentary, or anime | Auto |
| Story Bible | Generate story bible for cinematic workflows | Off |
| Require Audio | Include audio generation nodes | Off |
| Prefer Kling (No Audio) | Use Kling models when audio is not needed | On |
| Preview Nodes | Attach Preview Media nodes to outputs | On |
| API Endpoint | Add API Endpoint node (when API mode enabled) | Off |
| Factual Research | Enable web research via Tavily before generation | Off |
| Research Depth | Basic, advanced, or news-focused research | Basic |
Generation Pipeline
When you submit a prompt, the generation goes through these phases:
1. Research (optional)
If factual research is enabled, the system queries Tavily for relevant information before generating the workflow. This grounds the generation in real-world data.
2. LLM Planning
The prompt and settings are sent to the generate-flow edge function. The LLM produces a FlowPlan -- an abstract description of workflow steps using logical step kinds like media.image.generate, media.video.generate, logic.merge, etc.
The LLM also returns:
- Thinking - The AI's reasoning process
- Search results - Any reference searches performed
- Token usage - LLM token consumption
3. Validation
The FlowPlan is validated for:
- Valid step kinds and configurations
- Correct input/output references between steps
- No orphaned or circular references
4. Graph Building
The validated FlowPlan is converted to actual React Flow nodes and edges by the graphBuilder. This deterministic step:
- Maps abstract step kinds to concrete node types (e.g.,
media.image.generatebecomestextToImageNode) - Calculates node positions for a clean layout
- Creates properly typed edges with correct handles
- Handles special cases like Sync Gate chaining for merge points with more than 3 inputs
5. Flow Validation
The generated graph is validated against the node connection schema to ensure all edges connect compatible handle types.
6. Auto-Correction
If validation fails, the system automatically attempts one correction cycle:
- Previous errors are sent back to the LLM
- A corrected FlowPlan is generated
- The correction is re-validated
- If correction also fails, an error is shown
7. Animation
Valid nodes and edges are animated onto the canvas one at a time for a smooth visual experience. A progress indicator shows generation status.
Supported Step Kinds
The AI can generate workflows using these abstract operations:
| Category | Steps |
|---|---|
| Sources | Upload, remote URL, library |
| Prompts | Compose, expand, characteristics |
| Image | Generate, upscale, background removal |
| Video | Generate, upscale, edit, extend, erase, face swap, transform, watermark remove, translate, motion control |
| Audio | Generate (TTS), foley, lip sync, audio extraction |
| Logic | Merge (Sync Gate), conditional switch, analyze, compare, retry, batch process |
| Intelligence | Brain node |
| Creative | Product concept, camera angles |
| Data | Data feed, variant generator |
| Brand | Brand kit |
| Output | Preview media, text preview, API endpoint |
Writing Good Prompts
Be Specific
More detail leads to better results:
Instead of: Generate a product image
Write: Generate a product photography image for an
e-commerce site. The product is a coffee mug. Use
a clean white background with soft lighting.
Photorealistic style, 1:1 aspect ratio. Upscale
to 4K and add a Preview node.
Mention Batch Processing
For multiple items:
Process all 10 product descriptions from a data feed
and generate images for each one using batch processing.
Specify Models When Needed
Use Flux Pro for image generation and Kling 2.6 Pro
for video generation.
Include Output Requirements
Save results to the library and attach Preview Media
nodes so I can see the results inline.
Avoid Vague Descriptions
Bad: Make something cool
Bad: Generate images
Good: Generate a fantasy landscape in cinematic style,
upscale to 4K, then convert to a 5-second video
with slow zoom
Extend from Node
Right-click any node in the canvas to see context-sensitive quick actions:
- Image output nodes: Upscale, To Video, Variants, Save
- Video output nodes: Upscale, Extend, Save
- Text output nodes: Generate Image, Analyze
Selecting a quick action triggers AI generation in extend mode, anchored to that specific node.
Error Handling
If generation fails, you will see a failure card with options to:
- Retry - Try the generation again
- Dismiss - Close the error and try a different prompt
Common failure reasons:
- Invalid FlowPlan from the LLM (auto-correction attempted first)
- Validation errors that could not be auto-corrected
- Network or service errors
Next Steps
- Node Reference - Learn about all available nodes
- Creating Workflows - Manual workflow building
- Executing Workflows - Run your workflows