CrewAI framework integration with PraisonAI provides collaborative multi-agent workflows with advanced configuration options for agents, tasks, and execution.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Need a framework that isn’t listed here? See Framework Adapter Plugins to register your own via Python entry points.
Quick Start
How CrewAI Works
YAML Format for CrewAI
CrewAI requires theroles format YAML (not the steps workflow format):
The
--framework crewai flag only works with YAML files using the roles format. The newer steps + agents workflow format only supports the praisonai framework.Advanced YAML Fields
PraisonAI’s CrewAI adapter supports extensive configuration options for both agents and tasks:Agent-Level Fields
Configure advanced agent behavior under eachroles.<name>:
| YAML Key | Type | Default | Description | Maps to CrewAI |
|---|---|---|---|---|
llm | object | inherits dispatcher | LLM configuration via PraisonAIModel | llm= |
function_calling_llm | object | inherits dispatcher | Separate LLM for function calls | function_calling_llm= |
allow_delegation | bool | False | Allow agent to delegate tasks | allow_delegation= |
max_iter | int | 15 | Maximum iterations per agent | max_iter= |
max_rpm | int | None | Requests per minute throttle | max_rpm= |
max_execution_time | int | None | Execution timeout in seconds | max_execution_time= |
verbose | bool | True | Enable verbose output | verbose= |
cache | bool | True | Enable LLM response caching | cache= |
system_template | str | None | Override system prompt template | system_template= |
prompt_template | str | None | Override prompt template | prompt_template= |
response_template | str | None | Override response template | response_template= |
Task-Level Fields
Configure advanced task behavior under eachroles.<name>.tasks.<task_name>:
| YAML Key | Type | Default | Description | Maps to CrewAI |
|---|---|---|---|---|
description | str | required | Task description | description= |
expected_output | str | required | Expected output format | expected_output= |
tools | list[str] | [] | Tool names from tools_dict | tools= |
async_execution | bool | False | Execute task asynchronously | async_execution= |
context | list[str] | [] | Task dependencies by name | context= (resolved to Task objects) |
config | object | {} | Free-form task configuration | config= |
output_json | type | None | Pydantic schema for JSON output | output_json= |
output_pydantic | type | None | Pydantic model class | output_pydantic= |
output_file | str | "" | Output file path | output_file= |
callback | callable | None | Task completion callback | callback= |
human_input | bool | False | Require human input | human_input= |
create_directory | bool | False | Create parent directories | create_directory= |
Advanced Configuration Example
LLM Configuration
Model Resolution
The CrewAI adapter resolves LLM configuration in this order:- Agent-level
llm:roles.<agent>.llm.* - Global
llm_config: From CLI dispatcher - Environment:
MODEL_NAMEenvironment variable - Default:
openai/gpt-4o-mini
Function Calling LLM
Usefunction_calling_llm to specify a different model for tool calls:
Task Dependencies
Use thecontext field to create task dependencies. Reference tasks by name:
The
context field accepts a list of task names (strings), not Task objects. The adapter resolves them automatically after all tasks are created.File Output
Useoutput_file with create_directory to save task results:
AgentOps Integration
Whenagentops is installed, the CrewAI adapter automatically calls agentops.end_session("Success") after crew execution completes. No configuration required.
Framework Selection Priority
- CLI flag (
--framework crewai) takes precedence - YAML file (
framework: crewai) is used if no CLI flag - Default: praisonai framework
Auto Mode
Troubleshooting
Common Issues
Task context not found: Ifcontext: [some_task] fails, ensure some_task exists as a key under any role’s tasks: block in the same YAML file.
Function calling LLM inheritance: function_calling_llm falls back to MODEL_NAME environment variable or openai/gpt-4o-mini, not the agent’s main llm configuration.
Direct prompt limitation: Direct prompts (praisonai "question" --framework crewai) always use the praisonai framework. Use YAML files with roles format for CrewAI.
Missing installation error: If the framework is not installed, PraisonAI now fails fast at CLI entry with:
--framework is caught before any expensive setup runs.
Installation Errors
- Missing CrewAI:
pip install "praisonai[crewai]" - Tool resolution issues: Ensure tool names in
tools: []exist in the globaltools_dict
Best Practices
Use function_calling_llm for cost optimization
Use function_calling_llm for cost optimization
Set a cheaper/faster model for
function_calling_llm while using a more capable model for reasoning tasks.Structure task dependencies clearly
Structure task dependencies clearly
Use descriptive task names in
context: [] lists. The order doesn’t matter, but referenced tasks must exist.Leverage output files for complex workflows
Leverage output files for complex workflows
Use
output_file with create_directory: true for tasks that produce artifacts other agents need to reference.Configure timeouts appropriately
Configure timeouts appropriately
Set
max_execution_time for long-running tasks and max_iter to prevent infinite loops.Related
AutoGen
AutoGen framework integration
PraisonAI Agents
PraisonAI native agents framework

