Understanding Tasks in Praison Labs
Tasks are units of work that agents execute. Each task has a clear goal, input requirements, and expected outputs.
Clear description of work to be done and expected outputs
Matching tasks with capable agents
Resources available for task completion
Managing and formatting task results
Basic Task
Simple, single-operation tasks with clear inputs and outputs
Decision Task
Tasks involving choices and conditional paths
Loop Task
Repetitive operations over collections
Properly managing task dependencies is crucial for complex workflows. Always ensure proper context sharing and error handling.
Relationship | Description | Example |
---|---|---|
Sequential | Tasks run one after another | Research → Analysis → Report |
Parallel | Independent tasks run simultaneously | Data Collection + Processing |
Conditional | Tasks depend on previous results | Success → Next Task, Failure → Retry |
Install Praison Labs
Install the core package:
Create Agent
Create app.py
:
Design tasks to be atomic and focused. Each task should have a single, clear responsibility.
Clear Task Descriptions
Write precise, unambiguous task descriptions that clearly state the task’s purpose and requirements.
Success Criteria
Define measurable success criteria to ensure task completion can be properly evaluated.
Task Dependencies
Specify any dependencies or prerequisites for the task.
Tool Selection
Choose appropriate tools that match your task’s requirements.
Error Handling
Implement comprehensive error management strategies.
Resource Limits
Set appropriate resource constraints for optimal performance.
Performance Monitoring
Configure monitoring and logging for task execution.
async_execution=True
async_execution=True
Pro Tip: Use async execution for tasks that involve I/O operations (like API calls or file operations) to improve overall performance. Keep CPU-intensive tasks synchronous.
Learn how to create and configure tasks
Explore the complete Task API documentation