Task Configuration
This page provides comprehensive documentation for task configuration parameters, including task types, conditional execution, task chaining, and workflow control.Core Task Parameters
Task Type Configuration
task_type
- Type:
str - Default:
"normal" - Options:
"normal","decision","loop","parallel","sequential" - Description: Defines the execution behavior and flow control of the task
task_type parameter determines how a task is executed within the workflow and how it interacts with other tasks.
Task Type Details
Normal Tasks
Standard tasks that execute sequentially with defined inputs and outputs.Decision Tasks
Tasks that evaluate conditions and determine workflow paths.Loop Tasks
Tasks that repeat based on conditions or iterations.Workflow Control Parameters
condition
- Type:
Dict[str, Any] - Default:
None - Description: Defines conditions for task execution or branching
next_tasks
- Type:
Union[List[str], Dict[str, str]] - Default:
[] - Description: Defines subsequent tasks in the workflow
is_start
- Type:
bool - Default:
False - Description: Marks the task as a workflow entry point
Advanced Task Configuration
Complex Workflow Patterns
Parallel Execution Pattern
Sequential Pipeline Pattern
Task Dependencies and Context
Error Handling and Recovery
Task State Management
Loop State Configuration
Configuration Best Practices
Task Naming Conventions
Performance Optimization
Environment Variables
Task behavior can be configured via environment variables:Validation Rules
Parameter Constraints
| Parameter | Validation | Constraints |
|---|---|---|
task_type | Must be valid type | One of: normal, decision, loop, parallel, sequential |
condition | Valid structure | Must have field, operator, value or be compound |
next_tasks | Valid task names | Tasks must exist in workflow |
is_start | Boolean | At least one task must be marked as start |
Condition Operators
| Operator | Description | Example |
|---|---|---|
== | Equals | {"field": "status", "operator": "==", "value": "done"} |
!= | Not equals | {"field": "type", "operator": "!=", "value": "error"} |
>, < | Greater/Less than | {"field": "score", "operator": ">", "value": 0.8} |
>=, <= | Greater/Less or equal | {"field": "count", "operator": ">=", "value": 10} |
in | Contains | {"field": "category", "operator": "in", "value": ["A", "B"]} |
regex | Pattern match | {"field": "email", "operator": "regex", "value": ".*@company.com"} |
See Also
- Agent Configuration - Agent parameter reference
- Workflow Patterns - Advanced workflow design
- Best Practices - Configuration guidelines

