Skip to main content

Class Overview

BaseWorkflowAgent Properties

Key Methods

executeWorkflow()

Each workflow type must implement this method to define its execution logic.

addAgent()

Add an agent step to the workflow using the agent class name.

Workflow Methods

Configuration Methods

Result Access Methods

Workflow Types

Sequential Workflow

Parallel Workflow

Conditional Workflow

Loop Workflow

Step Parameters

Dynamic Parameters

Creating Custom Workflows

Running Workflows

Basic Execution

Using the Workflow Facade

Workflow Results

Sequential Workflow Results

Parallel Workflow Results

Error Handling

Complete Example

OrderProcessingWorkflow.php
Workflow Best Practices:
  • Workflows are agents - they extend BaseWorkflowAgent
  • Use the appropriate workflow type for your use case
  • Set reasonable timeouts and retry limits
  • Leverage callbacks for monitoring and debugging
  • Pass results between steps using closures
  • Handle errors at both step and workflow levels
  • Test workflows with various input scenarios

Next Steps

Evaluation Class

Evaluation class reference

Workflow Concepts

Learn more about workflows