> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evo-ai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow Agent

> Build complex workflows with visual interface using LangGraph and React Flow for advanced agent orchestration

## Overview

The **Workflow Agent** is the most advanced and flexible type of agent on the Evo AI platform. Using **LangGraph** as the execution engine and **React Flow** for visual interface, it allows creating complex workflows with multiple node types, conditions, delays, and sophisticated flow control.

Unlike other agent types (Sequential, Parallel, Loop), the Workflow Agent offers granular control over each step of the process, enabling the creation of complex business logic with conditional branching, custom loops, and advanced orchestration.

<Note>
  **Based on LangGraph**: Implementation using [LangGraph](https://langchain-ai.github.io/langgraph/) for workflow execution and React Flow for visual construction interface.
</Note>

## Key Features

<CardGroup cols={2}>
  <Card title="Visual Interface" icon="sitemap">
    Drag-and-drop construction with React Flow for intuitive workflows
  </Card>

  <Card title="LangGraph Engine" icon="gear">
    Robust execution based on LangGraph for complex workflows
  </Card>

  <Card title="Multiple Node Types" icon="shapes">
    Agent, Message, Condition and Delay nodes for maximum flexibility
  </Card>

  <Card title="Integrated Testing" icon="flask">
    Individual agent testing and complete workflow testing
  </Card>
</CardGroup>

## Node Types

### 1. Agent Node

<AccordionGroup>
  <Accordion icon="robot" title="Agent Node - Workflow Core">
    **Function:** Executes agents (new or existing) as part of the workflow

    **Settings:**

    * **Select Existing Agent**: Choose from agents already created on the platform
    * **Create New Agent**: Inline creation of agent specific to the workflow
    * **Edit Agent**: Modification of existing agents
    * **Input Mapping**: Input data mapping
    * **Output Key**: Key to store result in context

    **Usage example:**

    ```
    Agent Node: "Sentiment Analyzer"
    - Agent: sentiment_analyzer (existing)
    - Input: text from previous output
    - Output Key: sentiment_analysis
    ```

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow05_agent_node.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=50691eba4aba0711d2eccc9f27c509c2" alt="Agent Node on Canvas" width="1644" height="811" data-path="images/prints/workflow05_agent_node.png" />

    **Configuration form:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow06_agent_form.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=92593476d5e1d9fff287283c3725ec3e" alt="Configuring Agent Node" width="714" height="1373" data-path="images/prints/workflow06_agent_form.png" />
  </Accordion>
</AccordionGroup>

### 2. Message Node

<AccordionGroup>
  <Accordion icon="message" title="Message Node - Step Control">
    **Function:** Sends direct messages as agent in the flow, ideal for step control

    **Settings:**

    * **Type**: Message type (currently only "Text" available)
    * **Content**: Message content to be sent

    **Available type:**

    * **Text**: Message in plain text format

    **Configuration example:**

    ```
    Type: Text
    Content: Starting quality analysis of received content
    ```

    **Practical use cases:**

    * **Instructions for next nodes**: Specific guidance for subsequent agents
    * **Status messages**: Information about workflow progress
    * **Structured data**: Formatted information for processing
    * **Context control**: Messages that define context between steps
    * **Notifications**: Alerts about specific states or conditions
    * **Process logs**: Records of important workflow steps

    **Practical examples:**

    **Analysis Instruction:**

    ```
    Type: Text
    Content: Analyze the document focusing on quality and compliance aspects
    ```

    **Progress Status:**

    ```
    Type: Text
    Content: Validation step completed successfully, proceeding to approval
    ```

    **Context for Next Step:**

    ```
    Type: Text
    Content: Document classified as high priority, apply accelerated process
    ```

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow07_message_node.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=41eeff3deae6eac5a58ea6f7512b3267" alt="Message Node on Canvas" width="1684" height="726" data-path="images/prints/workflow07_message_node.png" />

    **Configuration form:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow09_message_form.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=d34ac5dbabc446964680e2397dcf877c" alt="Configuring Message Node" width="644" height="1377" data-path="images/prints/workflow09_message_form.png" />
  </Accordion>
</AccordionGroup>

### 3. Condition Node

<AccordionGroup>
  <Accordion icon="code-branch" title="Condition Node - Flow Control">
    **Function:** Checks output from previous node and directs execution based on conditions

    **Condition Type:**

    * **Previous output**: Validates the result returned by the previous node (only available type)

    **Settings:**

    * **Output Field**: Field from previous output to check (Content or Status)
    * **Operator**: Comparison operator
    * **Comparison Value**: Value for comparison
    * **Preview**: Preview of configured condition

    **Available Output fields:**

    * **Content**: Content of the response from previous node
    * **Status**: Execution status of previous node

    **Available operators:**

    **Existence Verification:**

    * **is defined**: Checks if field is defined
    * **is not defined**: Checks if field is not defined

    **Equality Comparison:**

    * **is equal to**: Field equals specified value
    * **is not equal to**: Field does not equal specified value

    **Content Verification:**

    * **contains**: Field contains specified text
    * **does not contain**: Field does not contain specified text
    * **starts with**: Field starts with specified text
    * **ends with**: Field ends with specified text

    **Numeric Comparison:**

    * **is greater than**: Field is greater than numeric value
    * **is greater than or equal to**: Field is greater than or equal to value
    * **is less than**: Field is less than numeric value
    * **is less than or equal to**: Field is less than or equal to value

    **Regular Expressions:**

    * **matches the regex**: Field matches regular expression
    * **does not match the regex**: Field does not match regex

    **Configuration examples:**

    **Complete Status Verification:**

    ```
    Condition Type: Previous output
    Output Field: Content
    Operator: contains
    Comparison Value: completed
    Preview: Content contains "completed"
    ```

    **Quality Score Verification:**

    ```
    Condition Type: Previous output
    Output Field: Content
    Operator: contains
    Comparison Value: "score": 8
    Preview: Content contains "score": 8
    ```

    **Execution Status Verification:**

    ```
    Condition Type: Previous output
    Output Field: Status
    Operator: is equal to
    Comparison Value: success
    Preview: Status is equal to "success"
    ```

    **Regex Verification:**

    ```
    Condition Type: Previous output
    Output Field: Content
    Operator: matches the regex
    Comparison Value: "confidence":\s*([0-9.]+)
    Preview: Content matches the regex "confidence":\s*([0-9.]+)
    ```

    **How to configure:**

    1. Select **"Previous output"** as Condition Type
    2. Choose the **Output Field** (Content or Status)
    3. Select appropriate **Operator**
    4. Enter the **Comparison Value**
    5. Check the condition **Preview**
    6. Configure True/False paths by connecting outputs

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow10_condition_node.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=d32199e3425109d25961c29ecb16c194" alt="Condition Node on Canvas" width="2202" height="1026" data-path="images/prints/workflow10_condition_node.png" />

    **Configuration form:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow11_condition_form.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=e5c4f8ca7f8880d14cb4cbb5f58e21d5" alt="Configuring Condition Node" width="628" height="1388" data-path="images/prints/workflow11_condition_form.png" />

    **Condition addition dialog:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow12_condition_dialog.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=9576d7dcef47f07b7c8883e595f54e5b" alt="Dialog to Add Condition" width="1156" height="1156" data-path="images/prints/workflow12_condition_dialog.png" />
  </Accordion>
</AccordionGroup>

### 4. Delay Node

<AccordionGroup>
  <Accordion icon="clock" title="Delay Node - Time Control">
    **Function:** Adds simple delays in workflow for timing control

    **Settings:**

    * **Delay Value**: Numeric delay value
    * **Time Unit**: Time unit (seconds, minutes, hours, days)
    * **Description**: Optional description of delay purpose

    **Available Time Units:**

    * **Seconds**: For short delays (1-59 seconds)
    * **Minutes**: For medium delays (1-59 minutes)
    * **Hours**: For long delays (1-23 hours)
    * **Days**: For very long delays (1+ days)

    **Configuration examples:**

    **Rate Limiting Delay:**

    ```
    Delay Value: 30
    Time Unit: Seconds
    Description: Rate limiting between API calls
    ```

    **Processing Delay:**

    ```
    Delay Value: 5
    Time Unit: Minutes
    Description: Wait for external processing to complete
    ```

    **Prioritization Delay:**

    ```
    Delay Value: 1
    Time Unit: Hours
    Description: Delay for low priority leads
    ```

    **Scheduling Delay:**

    ```
    Delay Value: 1
    Time Unit: Days
    Description: Wait for next business day for processing
    ```

    **Practical use cases:**

    * **Rate limiting**: Avoid overloading external APIs
    * **Wait for processing**: Time for external systems to process
    * **Simulate human time**: Realistic delays in automations
    * **Throughput control**: Manage processing speed
    * **Scheduling**: Delays for specific times
    * **Prioritization**: Different delays based on priority

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow13_delay_node.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=58c5a855d26b105c06eda925df426878" alt="Delay Node on Canvas" width="1484" height="671" data-path="images/prints/workflow13_delay_node.png" />

    **Configuration form:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow14_delay_form.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=b07dd5d7b345b1417888d692c910d816" alt="Configuring Delay Node" width="636" height="1392" data-path="images/prints/workflow14_delay_form.png" />
  </Accordion>
</AccordionGroup>

## Creating a Workflow Agent

### Step by Step on the Platform

<AccordionGroup>
  <Accordion icon="robot" title="1. Start creation">
    1. On the Evo AI main screen, click **"New Agent"**
    2. In the **"Type"** field, select **"Workflow Agent"**
    3. You will see the React Flow visual interface

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow01_menu.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=64dcfcda5a4cf501d80203206f9ddd93" alt="Workflow Agent Creation Menu" width="799" height="836" data-path="images/prints/workflow01_menu.png" />
  </Accordion>

  <Accordion icon="gear" title="2. Configure basic information">
    **Name:** Descriptive workflow name

    ```
    Example: content_approval_pipeline
    ```

    **Description:** Complex workflow summary

    ```
    Example: Complete workflow for content approval with 
    automatic analysis, conditional review and final approval
    ```

    **Goal:** Workflow objective

    ```
    Example: Automate content approval process ensuring 
    quality through multiple verifications and conditional approvals
    ```
  </Accordion>

  <Accordion icon="sitemap" title="3. Build visual workflow">
    **React Flow Interface:**

    **Node Palette:** Drag nodes from palette to canvas

    * 🤖 **Agent Node** - To execute agents
    * 💬 **Message Node** - For direct messages
    * 🔀 **Condition Node** - For conditional logic
    * ⏱️ **Delay Node** - For time delays

    **Connections:** Connect nodes by dragging from outputs to inputs

    **Configuration:** Double-click any node to configure

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow02_canva.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=6b32598f2b4d9917bfdc76a8ef2283b1" alt="Canvas Visual Interface" width="2490" height="1488" data-path="images/prints/workflow02_canva.png" />

    **Content Nodes Menu:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow03_dragdrop_menu_content.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=967725abb9a87cd419d4a9796b761933" alt="Content Nodes Menu" width="862" height="668" data-path="images/prints/workflow03_dragdrop_menu_content.png" />

    **Logic Nodes Menu:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow04_dragdrop_menu_logic.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=6153b95de38c04c3699e90b07140cccd" alt="Logic Nodes Menu" width="870" height="654" data-path="images/prints/workflow04_dragdrop_menu_logic.png" />
  </Accordion>

  <Accordion icon="gear" title="4. Configure individual nodes">
    **For each node in the workflow:**

    **Agent Nodes:**

    * Select existing agent or create new
    * Configure input mapping
    * Define output key

    **Message Nodes:**

    * Write message content
    * Use context variables
    * Configure message type

    **Condition Nodes:**

    * Define verification logic
    * Configure true/false paths
    * Test conditions

    **Delay Nodes:**

    * Configure duration
    * Define skip conditions
    * Configure dynamic delays
  </Accordion>

  <Accordion icon="link" title="5. Connect and validate flow">
    **Connections between nodes:**

    * Drag from one node's output to the next's input
    * Validate that all connections make sense
    * Configure multiple outputs for Condition Nodes

    **Automatic validation:**

    * Infinite loop verification
    * Data type validation
    * Orphan node checking
    * Complete path verification

    **Start and End nodes:**

    * Every workflow needs a Start node
    * Configure End nodes for different scenarios
  </Accordion>
</AccordionGroup>

## Practical Examples

### 1. Content Approval Pipeline

<AccordionGroup>
  <Accordion icon="file-check" title="Workflow Structure">
    **Objective:** Automate content approval with multiple verifications

    **Workflow flow:**

    ```
    START
      ↓
    [Message: Initial Instruction]
      ↓
    [Agent: Quality Analyzer]
      ↓
    [Condition: Score >= 8.0?]
      ├─ TRUE → [Agent: Automatic Approval] → [Message: Content Approved] → END
      └─ FALSE → [Agent: Manual Review]
                   ↓
                 [Condition: Approved in Review?]
                   ├─ TRUE → [Message: Content Approved] → END
                   └─ FALSE → [Agent: Correction Request]
                               ↓
                             [Delay: 1 hour]
                               ↓
                             [back to Quality Analyzer]
    ```

    **Detailed configuration:**

    **1. Message Node: "Initial Instruction"**

    ```
    Type: Text
    Content: Starting quality analysis of received content
    ```

    **2. Agent Node: "Quality Analyzer"**

    ```
    Agent: content_quality_analyzer
    Input: content and quality criteria
    Output Key: quality_analysis
    ```

    **3. Condition Node: "Score >= 8.0?"**

    ```
    Condition Type: Previous output
    Output Field: Content
    Operator: contains
    Comparison Value: score >= 8.0
    Preview: Content contains "score": 8
    ```

    **4. Agent Node: "Automatic Approval"**

    ```
    Agent: auto_approver
    Input: content and quality analysis
    Output Key: approval_result
    ```

    **5. Agent Node: "Manual Review"**

    ```
    Agent: manual_reviewer
    Input: content and identified issues
    Output Key: manual_review
    ```

    **6. Condition Node: "Approved in Review?"**

    ```
    Condition Type: Previous output
    Output Field: Status
    Operator: is equal to
    Comparison Value: approved
    Preview: Status is equal to "approved"
    ```

    **7. Delay Node: "1 hour"**

    ```
    Delay Value: 1
    Time Unit: Hours
    Description: Wait before new analysis
    ```
  </Accordion>
</AccordionGroup>

### 2. Lead Analysis Workflow

<AccordionGroup>
  <Accordion icon="user-check" title="Workflow Structure">
    **Objective:** Process leads with intelligent analysis and automatic routing

    **Workflow flow:**

    ```
    START
      ↓
    [Agent: Data Enricher]
      ↓
    [Agent: Lead Scorer]
      ↓
    [Condition: Score > 70?]
      ├─ TRUE → [Condition: Score > 90?]
      │           ├─ TRUE → [Agent: VIP Router] → [Delay: 5 min] → [Agent: Notifier] → END
      │           └─ FALSE → [Agent: Normal Router] → [Delay: 30 min] → [Agent: Notifier] → END
      └─ FALSE → [Message: Lead Discarded] → END
    ```

    **Main nodes:**

    **1. Agent Node: "Data Enricher"**

    * Enriches lead data with public information
    * Output: enriched\_data

    **2. Agent Node: "Lead Scorer"**

    * Calculates score based on criteria
    * Input: enriched\_data
    * Output: lead\_score

    **3. Condition Node: "Score > 70?"**

    * Filters low quality leads
    * Condition: score greater than 70

    **4. Condition Node: "Score > 90?"**

    * Identifies VIP leads
    * Condition: score greater than 90

    **5. Agent Nodes: "Routers"**

    * VIP Router: For senior salespeople
    * Normal Router: For standard salespeople

    **6. Delay Nodes: "Prioritization"**

    * VIP: 5 minutes (high priority)
    * Normal: 30 minutes (standard priority)
  </Accordion>
</AccordionGroup>

### 3. Document Processing Workflow

<AccordionGroup>
  <Accordion icon="file" title="Workflow Structure">
    **Objective:** Process documents with validation and automatic approval

    **Complex flow with loops:**

    ```
    START
      ↓
    [Agent: Data Extractor]
      ↓
    [Agent: Format Validator]
      ↓
    [Condition: Valid Format?]
      ├─ FALSE → [Message: Format Error] → END
      └─ TRUE → [Agent: Content Analyzer]
                  ↓
                [Condition: Complete Content?]
                  ├─ FALSE → [Agent: Data Requester]
                  │            ↓
                  │          [Delay: Wait for Response]
                  │            ↓
                  │          [Condition: Data Received?]
                  │            ├─ TRUE → [back to Content Analyzer]
                  │            └─ FALSE → [Message: Timeout] → END
                  └─ TRUE → [Agent: Compliance Checker]
                              ↓
                            [Condition: Compliance OK?]
                              ├─ TRUE → [Agent: Final Approver] → [Message: Document Approved] → END
                              └─ FALSE → [Agent: Rejecter] → [Message: Document Rejected] → END
    ```
  </Accordion>
</AccordionGroup>

## Testing Features

### Individual Agent Testing

<AccordionGroup>
  <Accordion icon="flask" title="Agent Form Test">
    **Testing individual agents within the workflow:**

    **How to use:**

    1. Click on any Agent Node in the workflow
    2. Select **"Test Agent"** from context menu
    3. Configure test inputs
    4. Execute isolated test
    5. Analyze outputs and performance

    **Benefits:**

    * Quick validation of individual agents
    * Debug specific issues
    * Test different inputs
    * Verify expected outputs

    **Test interface:**

    ```
    Agent Test: content_quality_analyzer

    Input:
    {
      "content": "Sample text for analysis...",
      "criteria": ["grammar", "clarity", "engagement"]
    }

    Expected Output:
    {
      "score": 8.5,
      "issues": [],
      "recommendations": [...]
    }
    ```
  </Accordion>
</AccordionGroup>

### Complete Workflow Testing

<AccordionGroup>
  <Accordion icon="play" title="Test Workflow">
    **Complete workflow testing with real data:**

    **How to use:**

    1. Click **"Test Workflow"** in the top bar
    2. Configure initial workflow inputs
    3. Execute complete test
    4. Monitor real-time execution
    5. Analyze final results

    **Test features:**

    * **Step-by-step execution**: See each node being executed
    * **Data visualization**: Track data flowing between nodes
    * **Breakpoints**: Pause execution at specific nodes
    * **Detailed logs**: Complete execution records
    * **Performance metrics**: Execution time per node

    **Test interface:**

    ```
    Workflow Test: content_approval_pipeline

    Status: Running
    Current Node: Agent - Quality Analyzer
    Progress: 3/8 nodes completed

    Execution Log:
    ├── [14:32:15] Start - Workflow initiated
    ├── [14:32:16] Message - Instruction sent
    ├── [14:32:17] Agent - Analysis started
    └── [14:32:20] Agent - Analysis in progress...

    Data Flow:
    ├── input_content: "Article about AI..."
    ├── start_message: "Starting analysis..."
    └── quality_analysis: { score: 7.5, ... }
    ```

    **Workflow test interface:**

    <img src="https://mintcdn.com/evoai/Aa4kqZ7vw51IF__0/images/prints/workflow15_test.png?fit=max&auto=format&n=Aa4kqZ7vw51IF__0&q=85&s=5af3c834f076d7f989e859d50437c215" alt="Testing Complete Workflow" width="974" height="1503" data-path="images/prints/workflow15_test.png" />
  </Accordion>
</AccordionGroup>

## Monitoring and Debugging

### Execution Dashboard

<AccordionGroup>
  <Accordion icon="chart-line" title="Real-time Monitoring">
    **Visual execution tracking:**

    **React Flow Visualization:**

    * Active nodes highlighted in green
    * Completed nodes marked with ✓
    * Error nodes marked with ✗
    * Data flow visualized in connections

    **Metrics per node:**

    ```
    Node Performance:
    ├── Agent: Quality Analyzer
    │   ├── Executions: 1,247
    │   ├── Avg Duration: 3.2s
    │   ├── Success Rate: 98.5%
    │   └── Last Error: 2 days ago
    ├── Condition: Score >= 8.0
    │   ├── True Path: 65% (812 times)
    │   ├── False Path: 35% (435 times)
    │   └── Avg Evaluation: 0.1s
    └── Delay: 1 hour
        ├── Skipped: 15% (delays skipped)
        ├── Executed: 85%
        └── Avg Delay: 3600s
    ```

    **Alerts and notifications:**

    * Execution failures
    * Node timeouts
    * Infinite loops detected
    * Performance degradation
  </Accordion>

  <Accordion icon="bug" title="Advanced Debugging">
    **Specific debugging tools:**

    **1. Visual Breakpoints**

    ```
    - Click any node to add breakpoint
    - Execution pauses before node
    - Inspect current context state
    - Continue step-by-step execution
    ```

    **2. Data Inspector**

    ```
    - Visualize data at each workflow point
    - Transformation history
    - Data type validation
    - Corrupted data detection
    ```

    **3. Execution Replay**

    ```
    - Replay previous executions
    - Compare between executions
    - Identify regressions
    - Analyze failure patterns
    ```

    **4. Performance Profiler**

    ```
    - Identify bottlenecks
    - Resource usage analysis
    - Optimize slow nodes
    - Improvement suggestions
    ```
  </Accordion>
</AccordionGroup>

## Advanced Settings

### Performance Optimization

<AccordionGroup>
  <Accordion icon="rocket" title="Execution Optimization">
    **Strategies for efficient workflows:**

    **Intelligent Parallelization:**

    ```
    - Identify nodes that can execute in parallel
    - Configure parallel branches in workflow
    - Use merge nodes to synchronize results
    ```

    **Result Caching:**

    ```
    - Cache outputs from deterministic nodes
    - Configure TTL based on data nature
    - Invalidate cache when necessary
    ```

    **Resource Management:**

    ```
    - Limit resources per node
    - Configure connection pools
    - Manage memory between executions
    ```
  </Accordion>

  <Accordion icon="shield" title="Resilience and Reliability">
    **Settings for robust workflows:**

    **Error Handling:**

    ```
    - Configure retry policies per node
    - Implement fallback paths
    - Use circuit breakers for external nodes
    ```

    **State Management:**

    ```
    - Persist state between executions
    - Configure automatic checkpoints
    - Implement recovery mechanisms
    ```

    **Monitoring and Alerting:**

    ```
    - Configure alerts for failures
    - Monitor execution SLAs
    - Implement health checks
    ```
  </Accordion>

  <Accordion icon="key" title="Output Key - Workflow Result">
    **`Output Key` field in interface:**

    The Output Key allows the Workflow Agent to save the final result of the complex workflow in a specific variable in the shared state, making it available to other agents or processes.

    **How it works:**

    * Configure the `Output Key` field with a descriptive name
    * The final workflow result (last executed node) will be saved automatically
    * Other agents can access using placeholders `{{output_key_name}}`
    * Works in nested workflows, loops and multi-agent systems

    **Configuration examples:**

    ```markdown theme={null}
    Output Key: "content_approval_result"
    → Saves final result in state.content_approval_result

    Output Key: "lead_processing_complete"
    → Saves final result in state.lead_processing_complete

    Output Key: "data_pipeline_result"
    → Saves final result in state.data_pipeline_result
    ```

    **Workflow result:**

    ```json theme={null}
    {
      "workflow_summary": {
        "total_nodes": 12,
        "executed_nodes": 10,
        "skipped_nodes": 2,
        "execution_time": "2m 15s",
        "final_status": "completed"
      },
      "final_result": {
        "decision": "approved",
        "confidence": 0.95,
        "details": {...}
      },
      "execution_path": [
        "start_node",
        "validation_node", 
        "analysis_node",
        "decision_node",
        "end_node"
      ]
    }
    ```

    **Usage in other agents:**

    ```markdown theme={null}
    # In subsequent agent instructions:
    "Analyze the request: {{user_input}} and use approval result: {{content_approval_result}}"
    "Based on processing: {{lead_processing_complete}}"
    "Analyze processed data: {{data_pipeline_result}}"
    ```

    **Best practices:**

    * Use snake\_case: `workflow_result`, `process_complete`
    * Be specific: `credit_approval_workflow` instead of `workflow`
    * Document final result structure
    * Consider including execution metadata (path, timing, status)
    * Use names that reflect business process
    * Configure last node to produce structured result
  </Accordion>
</AccordionGroup>

## Best Practices

<AccordionGroup>
  <Accordion icon="lightbulb" title="Workflow Design">
    **Principles for effective workflows:**

    * **Modularity**: Divide complex workflows into sub-workflows
    * **Idempotence**: Ensure re-executions are safe
    * **Observability**: Add adequate logging and monitoring
    * **Error handling**: Handle failures gracefully
    * **Performance**: Optimize critical paths
  </Accordion>

  <Accordion icon="users" title="Collaboration and Maintenance">
    **Team practices:**

    * **Documentation**: Document purpose of each node
    * **Versioning**: Use version control for workflows
    * **Testing**: Implement automated tests
    * **Code review**: Review workflows before production
    * **Monitoring**: Monitor performance and reliability
  </Accordion>
</AccordionGroup>

## Common Use Cases

<CardGroup cols={2}>
  <Card title="Content Approval" icon="file-check">
    **Quality Workflows:**

    * Automatic quality analysis
    * Conditional approval
    * Correction loops
  </Card>

  <Card title="Lead Processing" icon="user-check">
    **Intelligent Qualification:**

    * Data enrichment
    * Automatic scoring
    * Intelligent routing
  </Card>

  <Card title="Process Automation" icon="gear">
    **Business Process Automation:**

    * Approval workflows
    * Document processing
    * System integration
  </Card>

  <Card title="Data Analysis" icon="chart-bar">
    **Data Pipelines:**

    * Complex ETL
    * Multi-step analysis
    * Automatic reports
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Sequential Agent" icon="arrow-right" href="/agents/sequential">
    Compare with simple sequential workflows
  </Card>

  <Card title="Parallel Agent" icon="arrow-right-arrow-left" href="/agents/parallel">
    Understand basic parallel execution
  </Card>

  <Card title="Loop Agent" icon="recycle" href="/agents/loop">
    Explore simple iterative loops
  </Card>

  <Card title="A2A Agent" icon="network-wired" href="/agents/a2a">
    Integrate external agents in workflows
  </Card>
</CardGroup>

***

The Workflow Agent is the most powerful tool for creating complex automations. Use it when you need granular control over each step of the process and sophisticated business logic with multiple conditions and execution paths.
