Process
Understanding Process Types in PraisonAI
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.
Process Types Overview
Sequential Process
Linear task execution in a predefined order
Hierarchical Process
Manager-coordinated task execution with dynamic assignment
Workflow Process
Complex task flows with conditional execution and state management
Sequential Process
The simplest form of task execution where tasks are performed one after another.
Hierarchical Process
Uses a manager agent to coordinate task execution and agent assignments.
Workflow Process
Advanced process type supporting complex task relationships and conditional execution.
Getting Started
Install PraisonAI
Install the core package:
Create Agent
Create app.py
:
Advanced Features
State Management
Error Handling
Monitoring
Integration
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
- Tasks execute in order but don’t block
- Maintains sequence while allowing async operations
- Perfect for I/O-heavy tasks
- Tasks execute in order but don’t block
- Maintains sequence while allowing async operations
- Perfect for I/O-heavy tasks
- Parallel execution of independent tasks
- Async branching and merging
- Dynamic task scheduling based on conditions
- Async manager delegation
- Parallel subtask execution
- Dynamic worker assignment
Key Benefits
Performance
- Efficient resource utilization
- Reduced waiting time
- Better throughput
Flexibility
- Mix sync and async tasks
- Adaptable execution patterns
- Easy scaling