What is an Agentflow?
Agentflows differ from chatflows in several key ways:- Multi-Node Execution: Execute multiple nodes in sequence or parallel
- Conditional Logic: Branch based on conditions and decisions
- Iteration Support: Loop through data with iteration nodes
- State Management: Advanced state tracking across the workflow
- Human-in-the-Loop: Pause for human input and approval
- Agent Composition: Combine multiple specialized agents
Key Components
Start Node
Every agentflow begins with a Start node. This is automatically added to new agentflows and defines the entry point.Agent Flow Nodes
These specialized nodes include:- LLM Nodes: Language models for reasoning and generation
- Tool Nodes: External capabilities and integrations
- Condition Nodes: Branch based on logic and criteria
- Iteration Nodes: Loop through arrays and collections
- Human Input Nodes: Pause for human decisions
- Variable Nodes: Store and retrieve workflow state
- End Nodes: Terminate execution paths
Creating Your First Agentflow
Navigate to Agentflows
From the main dashboard, click on Agentflows in the sidebar to view your agent workflows.
Create New Agentflow
Click Add New in the top-right corner. The canvas opens with a Start node already placed.
Add Agent Nodes
Click the + button to open the node library. Only Agent Flow category nodes are available in agentflows.Common starting nodes:
- LLM Agent: Reasoning and decision-making
- Tool Calling Agent: Execute tools based on needs
- Workflow Agent: Orchestrate complex sequences
Connect Sequential Flow
Drag from the Start node’s output to your first agent node’s input. Continue connecting nodes in sequence.The connection shows colored edges indicating the data flow type:
- Different colors represent different node types
- Edge labels show conditional branches (if using condition nodes)
Add Conditional Logic
Insert a Condition node to create branches:
- Connect the condition node’s outputs to different paths
- Configure the condition criteria in the node settings
- Each output represents a different branch (e.g., “proceed” or “reject”)
Configure Node Settings
Double-click any node to configure:
- Model selection and parameters
- System prompts and instructions
- Input/output mappings
- Memory and state configuration
AI-Powered Agentflow Generation
Flowise includes an AI generator to create agentflows from natural language descriptions.Describe Your Workflow
Enter a detailed prompt describing what you want to build:Example: “Create an agentflow that analyzes customer feedback, classifies sentiment, and routes to appropriate team based on urgency”
Review Generated Flow
The AI generates nodes and connections based on your description. Review the structure and connections.
Performance of the AI generator varies with different models. GPT-4 and Claude typically produce better results than smaller models.
Advanced Patterns
Sequential Agent Pipeline
Create a pipeline where each agent specializes in one task:Conditional Branching
Route execution based on conditions:- Route based on sentiment analysis
- Check validation criteria
- Implement approval workflows
- Handle error cases differently
Iteration Loops
Process collections of items:Add Iteration Node
Drag an Iteration node onto the canvas. This creates a container for nodes that will execute repeatedly.
Add Nodes Inside Iteration
Drag nodes onto the iteration container. These nodes execute once per iteration item.
Configure Iteration
Set the iteration source (array or collection) and configure how items are processed.
Human-in-the-Loop
Pause execution for human approval:Working with State and Variables
Get Variable
Retrieve values from workflow state:- Access previous node outputs
- Read stored variables
- Reference session data
Set Variable
Store values in workflow state:- Save intermediate results
- Accumulate data across nodes
- Share state between branches
State Management
Agentflows maintain state throughout execution:Memory in Agentflows
Use Agent Memory nodes for conversation persistence:- SQLite Agent Memory: Local file-based storage
- PostgreSQL Agent Memory: Scalable database storage
- MySQL Agent Memory: MySQL database integration
Regular chatflow memory nodes (Buffer Memory, etc.) are NOT available in agentflows. Use Agent Memory nodes instead.
Canvas Features
Snapping and Alignment
- Click the magnet icon in the canvas controls to enable grid snapping
- Nodes align to a 25x25 grid for clean layouts
- Toggle on/off as needed
Background Toggle
- Click the artboard icon to toggle the background grid
- Useful for screenshots or presentations
Node Synchronization
When node versions are outdated:- An orange sync button appears (🔄)
- Click to update all nodes to latest versions
- Review changes before saving
Sticky Notes
Add documentation to your agentflow:- Drag a Sticky Note from the utilities section
- Use to explain complex logic
- Document node purposes and configurations
- Notes don’t affect execution
Testing and Debugging
Chat Panel Testing
Click the chat icon to open the test panel:- Send messages to trigger agentflow execution
- View real-time execution progress
- See which nodes are currently executing
- Review outputs from each node
Validation
The validation popup (if configured) shows:- Required configurations missing
- Connection errors
- Node configuration issues
- Warnings and recommendations
Execution Visualization
During execution, nodes show status:- Highlight: Currently executing
- Success: Completed successfully
- Error: Failed execution (red highlight)
Best Practices
Design Patterns
Start Simple
Begin with a basic linear flow. Add complexity gradually as you test each component.
Modular Agents
Create specialized agents for specific tasks. This makes debugging and maintenance easier.
Error Handling
Add condition nodes to handle errors and edge cases. Always have a fallback path.
State Management
Use variables strategically. Don’t overload state with unnecessary data.
Performance Optimization
- Parallel Execution: When possible, use parallel branches for independent tasks
- Early Termination: Use conditions to exit early when criteria aren’t met
- Efficient Models: Use smaller models (GPT-3.5) for simple tasks, larger for complex reasoning
- Caching: Enable caching on tool nodes to avoid redundant API calls
Organization
- Naming: Give nodes descriptive names that explain their purpose
- Layout: Arrange nodes left-to-right following execution flow
- Grouping: Use visual grouping for related nodes
- Documentation: Add sticky notes to explain complex logic
API Integration
Agentflows expose different endpoints than chatflows:Troubleshooting
Cannot connect nodes
Cannot connect nodes
Agentflows have stricter connection rules than chatflows. Ensure you’re connecting compatible node types. Check the connection validation in the console.
Start node cannot be added
Start node cannot be added
Each agentflow can only have ONE start node. It’s automatically created with new agentflows.
Nodes disappear inside iteration
Nodes disappear inside iteration
Ensure nodes are being dropped within the iteration container boundaries. The node must be fully inside the iteration box.
Human input not working
Human input not working
Human input nodes require special API handling. Ensure you’re using the human-input endpoint to resume execution.
State not persisting
State not persisting
Use Agent Memory nodes for persistence. Regular memory nodes are not available in agentflows.
Migration from Chatflows
Key differences when moving from chatflows to agentflows:| Feature | Chatflow | Agentflow |
|---|---|---|
| Node Types | All categories | Agent Flow only |
| Memory | Buffer, Window, etc. | Agent Memory only |
| Execution | Single node | Multi-node sequence |
| Conditional Logic | Limited | Full support |
| Iteration | Not supported | Supported |
| Human Input | Not supported | Supported |
Next Steps
- Learn about Using Tools in agentflows
- Understand Memory Management for agents
- Master Prompt Engineering for better agent performance
