Skip to main content

AgentsGenerator Module

The AgentsGenerator module generates and runs agents from YAML configuration files, supporting multiple frameworks.

Supported Frameworks

  • PraisonAI Agents (recommended)
  • CrewAI
  • AutoGen
  • AutoGen v4
  • Google ADK (via praisonai-frameworks[google-adk])

Import

Quick Example

Constructor

AgentsGenerator(config, framework)

Creates a new AgentsGenerator instance. Parameters:

YAML Configuration

Basic Structure

Full Example

Methods

run()

Run the configured agents and tasks. Returns: str - The final output

generate_agents()

Generate agent instances without running. Returns: list - List of agent instances

generate_tasks()

Generate task instances without running. Returns: list - List of task instances

Framework Selection

PraisonAI (Default)

CrewAI

AutoGen

Google ADK

Google ADK uses the roles: agents.yaml shape (not the agents: list format). Install with pip install 'praisonai[google-adk]'. Requires GOOGLE_API_KEY or GEMINI_API_KEY.

Tools Configuration

Built-in Tools

Custom Tools

Example: Programmatic Usage