Skip to main content
CrewAI framework integration with PraisonAI provides collaborative multi-agent workflows with advanced configuration options for agents, tasks, and execution.
Need a framework that isn’t listed here? See Framework Adapter Plugins to register your own via Python entry points.

Quick Start

1

Install

2

Create YAML file

3

Run

CrewAI is no longer the default framework. You must either pass --framework crewai or set framework: crewai in your YAML to use CrewAI.

How CrewAI Works


YAML Format for CrewAI

CrewAI requires the roles 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 each roles.<name>:

Task-Level Fields

Configure advanced task behavior under each roles.<name>.tasks.<task_name>:

Advanced Configuration Example


LLM Configuration

Model Resolution

The CrewAI adapter resolves LLM configuration in this order:
  1. Agent-level llm: roles.<agent>.llm.*
  2. Global llm_config: From CLI dispatcher
  3. Environment: MODEL_NAME environment variable
  4. Default: openai/gpt-4o-mini

Function Calling LLM

Use function_calling_llm to specify a different model for tool calls:

Task Dependencies

Use the context 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

Use output_file with create_directory to save task results:

AgentOps Integration

When agentops is installed, the CrewAI adapter automatically calls finalize_observability(self.name, status=…) (from praisonai.observability.hooks) from a finally block after crew execution. status is derived from sys.exc_info(): "Success" on the happy path, "Failure" on any exception including cancellation. No configuration required. See Observability Hooks for details.

Framework Selection Priority

  1. CLI flag (--framework crewai) takes precedence
  2. YAML file (framework: crewai) is used if no CLI flag
  3. Default: praisonai framework

Auto Mode


Troubleshooting

Common Issues

Task context not found: If context: [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:
The error appears immediately, before YAML parsing — so a typo in --framework is caught before any expensive setup runs.

Installation Errors

  • Missing CrewAI: pip install "praisonai-frameworks[crewai]"
  • Tool resolution issues: Ensure tool names in tools: [] exist in the global tools_dict

Best Practices

Set a cheaper/faster model for function_calling_llm while using a more capable model for reasoning tasks.
Use descriptive task names in context: [] lists. The order doesn’t matter, but referenced tasks must exist.
Use output_file with create_directory: true for tasks that produce artifacts other agents need to reference.
Set max_execution_time for long-running tasks and max_iter to prevent infinite loops.

AutoGen

AutoGen framework integration

PraisonAI Agents

PraisonAI native agents framework