Understanding Process Types
Process types in PraisonAI define how tasks are executed and how agents collaborate. Each process type offers different patterns for task execution and agent coordination.Naming Convention:
AgentTeam uses process parameter for sequential/hierarchical. AgentFlow is a separate class for workflow patterns with route(), parallel(), loop().Process Types Overview
Sequential
Linear task execution in a predefined order via
AgentTeamHierarchical
Manager-coordinated task execution with dynamic assignment via
AgentTeamWorkflow
Complex flows with routing, parallel, and loops via
AgentFlowSequential Process
The simplest form of task execution where tasks are performed one after another.Hierarchical Process
Uses a manager LLM to coordinate task execution and agent assignments dynamically.Workflow Process (AgentFlow)
AgentFlow is a separate class from AgentTeam. Use AgentFlow for deterministic step sequences with advanced patterns.AgentFlow Patterns
Getting Started
Advanced Features
State Management
Task State Tracking
Task State Tracking
Monitor and manage the progress of each task in real-time
Context Preservation
Context Preservation
Maintain important information across different stages of execution
Data Flow Control
Data Flow Control
Manage how data moves between tasks and agents efficiently
Error Handling
Graceful Recovery
Graceful Recovery
Automatically handle failures and continue execution
Alternative Paths
Alternative Paths
Switch to backup plans when primary execution fails
Error Reporting
Error Reporting
Detailed error logs and diagnostic information
Monitoring
Progress Tracking
Progress Tracking
Real-time visibility into task completion status
Performance Metrics
Performance Metrics
Measure execution time and resource efficiency
Resource Usage
Resource Usage
Monitor system resource utilization
Integration
External Systems
External Systems
Connect with other services and platforms
API Sync
API Sync
Maintain data consistency across systems
Event Handling
Event Handling
React to system and external events
Async Processing
All process types support asynchronous execution through async generators, enabling efficient parallel processing and non-blocking operations.
Core Async Methods
asequential
Async version of sequential process for non-blocking linear execution
aworkflow
Async workflow process for complex parallel task execution
ahierarchical
Async hierarchical process for distributed task management
Process-Specific Features
- Sequential Process
- Workflow Process
- Hierarchical Process
- Tasks execute in order but don’t block
- Maintains sequence while allowing async operations
- Perfect for I/O-heavy tasks
Key Benefits
Performance
- Efficient resource utilization
- Reduced waiting time
- Better throughput
Flexibility
- Mix sync and async tasks
- Adaptable execution patterns
- Easy scaling

