Documentation for the praisonaiagents.agents.agents module
Base64-encode a file.
Split video into frames (base64-encoded).
A Pydantic model for handling loop items.
items: List[Any]
- List of items to loop
through
model_config
- Model configurationThe main class for managing agents and tasks execution.
agents: List[Agent]
- List of agentstasks: List[Task]
- List of tasksverbose: int = 0
- Verbosity levelcompletion_checker: Optional[Callable] = None
-
Custom completion checker
max_retries: int = 5
- Maximum retry attempts
process: str = "sequential"
- Process
type (sequential, workflow, hierarchical)
manager_llm: Optional[str] = None
- Language
model for manager agent
add_task(self, task)
- Add a task to the crew
clean_json_output(self, output: str) → str
-
Clean JSON output
clear_state(self) → None
- Clear all state
values
default_completion_checker(self, task,
agent_output)
- Default completion checker
execute_task(self, task_id)
- Execute a
specific task
get_agent_details(self, agent_name)
- Get agent
details
get_all_tasks_status(self)
- Get status of all
tasks
get_state(self, key: str, default: Any = None) →
Any
- Get a state value
get_task_details(self, task_id)
- Get task
details
get_task_result(self, task_id)
- Get task
result
get_task_status(self, task_id)
- Get task
status
run_all_tasks(self)
- Execute tasks based on
execution mode
run_task(self, task_id)
- Run a specific task
save_output_to_file(self, task, task_output)
-
Save task output to file
set_state(self, key: str, value: Any) → None
-
Set a state value
start(self)
- Start the crew executionupdate_state(self, updates: Dict) → None
-
Update multiple state values
astart(self)
- Async version of start method
aexecute_task(self, task_id)
- Async version of
execute_task
arun_task(self, task_id)
- Async version of
run_task
arun_all_tasks(self)
- Async version of
run_all_tasks
The Praison LabsAgents class provides comprehensive async support through the following methods:
Example usage: