Skip to main content
Agentflows (V2) represent the next generation of AI workflows in Flowise, enabling you to build complex multi-agent systems with conditional logic, loops, and advanced orchestration.

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
Agentflows use a node-based architecture specifically designed for LangGraph and agent orchestration patterns.

Key Components

Start Node

Every agentflow begins with a Start node. This is automatically added to new agentflows and defines the entry point.
Each agentflow can have only ONE start node. Attempting to add a second start node will show an error.

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

1

Navigate to Agentflows

From the main dashboard, click on Agentflows in the sidebar to view your agent workflows.
2

Create New Agentflow

Click Add New in the top-right corner. The canvas opens with a Start node already placed.
3

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
4

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)
5

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”)
6

Configure Node Settings

Double-click any node to configure:
  • Model selection and parameters
  • System prompts and instructions
  • Input/output mappings
  • Memory and state configuration
7

Save and Test

Click the Save button and give your agentflow a descriptive name. Use the chat panel to test execution.

AI-Powered Agentflow Generation

Flowise includes an AI generator to create agentflows from natural language descriptions.
1

Click Generate Button

In the agentflow canvas, click the sparkles icon (⚡) next to the + button.
2

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”
3

Review Generated Flow

The AI generates nodes and connections based on your description. Review the structure and connections.
4

Configure Nodes

The generator creates the structure, but you’ll need to:
  • Fill in API keys and credentials
  • Customize prompts and instructions
  • Configure specific parameters
  • Test and refine the flow
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:
[Start] → [Research Agent] → [Analysis Agent] → [Writing Agent] → [End]
Each agent processes the output of the previous agent, building on the results.

Conditional Branching

Route execution based on conditions:
[Start] → [Classifier Agent] → [Condition]
                                   ├─[true]→ [Path A]
                                   └─[false]→ [Path B]
Use condition nodes to:
  • Route based on sentiment analysis
  • Check validation criteria
  • Implement approval workflows
  • Handle error cases differently

Iteration Loops

Process collections of items:
1

Add Iteration Node

Drag an Iteration node onto the canvas. This creates a container for nodes that will execute repeatedly.
2

Add Nodes Inside Iteration

Drag nodes onto the iteration container. These nodes execute once per iteration item.
3

Configure Iteration

Set the iteration source (array or collection) and configure how items are processed.
4

Connect Exit Condition

Connect the iteration output to continue the flow after all iterations complete.
Nodes cannot be nested inside iteration nodes if they are:
  • Other iteration nodes (no nested loops yet)
  • Human input nodes (not supported in loops)

Human-in-the-Loop

Pause execution for human approval:
[Start] → [Draft Agent] → [Human Input] ──[proceed]→ [Publish Agent]
                               └──[reject]→ [Revision Agent]
The Human Input node pauses workflow execution and waits for user action via API.

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:
// State is automatically passed between nodes
{
  "messages": [...],
  "variables": {...},
  "nodeOutputs": {...}
}

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

  1. Parallel Execution: When possible, use parallel branches for independent tasks
  2. Early Termination: Use conditions to exit early when criteria aren’t met
  3. Efficient Models: Use smaller models (GPT-3.5) for simple tasks, larger for complex reasoning
  4. 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:
# Start agentflow execution
POST /api/v1/agentflows/execute/{agentflowId}

# Check execution status
GET /api/v1/agentflows/execution/{executionId}

# Send human input response
POST /api/v1/agentflows/human-input/{executionId}
See the Agentflow API Reference for complete documentation.

Troubleshooting

Agentflows have stricter connection rules than chatflows. Ensure you’re connecting compatible node types. Check the connection validation in the console.
Each agentflow can only have ONE start node. It’s automatically created with new agentflows.
Ensure nodes are being dropped within the iteration container boundaries. The node must be fully inside the iteration box.
Human input nodes require special API handling. Ensure you’re using the human-input endpoint to resume execution.
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:
FeatureChatflowAgentflow
Node TypesAll categoriesAgent Flow only
MemoryBuffer, Window, etc.Agent Memory only
ExecutionSingle nodeMulti-node sequence
Conditional LogicLimitedFull support
IterationNot supportedSupported
Human InputNot supportedSupported

Next Steps

Build docs developers (and LLMs) love