Skip to main content

CrewAI with PraisonAI

Low-code solution to run CrewAI with integrated tools and features.

Installation

# Install with CrewAI support
pip install "praisonai[crewai]"
This installation includes:
  • CrewAI framework
  • PraisonAI tools integration
  • Task delegation capabilities
  • Sequential and parallel task execution

Quick Start

# Set your OpenAI API key
export OPENAI_API_KEY=xxxxxxxxxx

# Initialize with CrewAI
praisonai --framework crewai --init "Create a Movie Script About Cat in Mars"

# Run the agents
praisonai --framework crewai

Auto Mode

praisonai --framework crewai --auto "Create a Movie Script About Cat in Mars"

YAML Format for CrewAI

CrewAI requires the roles format YAML (not the steps workflow format). Here’s the correct structure:
framework: crewai
topic: Create Movie Script About Cat in Mars

roles:
  researcher:
    role: Research Analyst
    goal: Gather information about Mars and cats
    backstory: Skilled in research, with a focus on gathering accurate and relevant information.
    tasks:
      research_task:
        description: Research about Mars environment and cat behavior for the movie concept
        expected_output: Research findings document with key facts

  narrative_designer:
    role: Story Concept Developer
    goal: Create a story concept for a movie about a cat in Mars
    backstory: Skilled in narrative development, with a focus on creating engaging stories.
    tasks:
      story_task:
        description: Create story concept based on research findings
        expected_output: Story concept with narrative arcs, character bios, and settings

  scriptwriter:
    role: Script Writer
    goal: Write a movie script about a cat in Mars
    backstory: Expert in dialogue and script structure, translating concepts into scripts.
    tasks:
      script_task:
        description: Write the final movie script based on the story concept
        expected_output: Production-ready movie script with dialogue and scene details
Important: The --framework crewai flag only works with YAML files using the roles format.The newer steps + agents workflow format only supports the praisonai framework and will ignore the --framework flag.

Running CrewAI

# Run with roles-format YAML
praisonai agents.yaml --framework crewai

# Or if framework is specified in YAML
praisonai agents.yaml

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

Direct Prompts

Direct prompts always use the praisonai framework regardless of the --framework flag:
# This will use praisonai, NOT crewai
praisonai "What is 2+2?" --framework crewai
To use CrewAI, you must provide a YAML file with the roles format.