Agent as Flow Node
Use agents within flows for intelligent processing: Use Cases:- Add reasoning to structured workflows
- Dynamic decision making within flows
- Context-aware processing
- Multi-step analysis
Common Patterns
Agent-Driven Workflow Selection
Agent chooses which workflow to execute: Use Case: Intelligent routing based on request analysis Configuration:- Agent has access to multiple flows as tools
- Instructions guide flow selection
- Agent explains reasoning
- Results returned to user
Multi-Agent Orchestration
Coordinate multiple specialized agents: Use Case: Break complex tasks into specialized subtasks Configuration:- Main orchestrator agent with delegation tools
- Specialized agents for specific domains
- Result aggregation logic
- Quality control steps
Agent with Human Review
Agent proposes action, human approves: Use Case: High-stakes decisions requiring human approval Configuration:- Agent generates proposal
- Human-in-the-loop node
- Approval workflow
- Revision loop
Iterative Refinement
Agent iterates until quality threshold met: Use Case: Content generation with quality control Configuration:- Quality evaluation criteria
- Maximum iterations
- Feedback generation
- Acceptance threshold
Flow Provides Tools to Agent
Flows as tools that agents can execute:Pattern: Agent Orchestrator
Use Case: Agent uses flows as tools to accomplish tasks Configuration:- Agent instructions mention available flows
- Flows configured as agent tools
- Agent decides when to use each flow
- Results integrated into conversation
Pattern: Agentic Workflow
Use Case: Agent plans and executes multi-step workflow Configuration:- Agent has planning instructions
- Multiple flows available as tools
- Agent evaluates results between steps
- Adaptive execution based on outcomes
Advanced Scenarios
Research and Report Generation
Use Case: Comprehensive research reports with multiple sourcesCustomer Support Automation
Use Case: Automated first-line support with escalationData Processing Pipeline
Use Case: Intelligent data processing with validationBest Practices
Agent-Flow Integration:- Give agents clear instructions about available flows
- Name flows descriptively
- Document flow inputs/outputs
- Test flows independently before giving to agents
- Handle flow failures in agent logic
- Provide fallback options
- Log errors for debugging
- Notify humans when needed
- Use flows for heavy processing
- Use agents for decision making
- Cache expensive operations
- Monitor execution times
- Use appropriate models for agents
- Minimize agent iterations
- Leverage flows for deterministic tasks
- Monitor token usage