Skip to main content

auto

AI Agents Framework Auto-generation module for PraisonAI agents and workflows. This module uses FULL LAZY LOADING for all heavy dependencies:
  • crewai: Only loaded when framework=‘crewai’ is used
  • autogen: Only loaded when framework=‘autogen’ is used
  • praisonaiagents: Only loaded when framework=‘praisonai’ is used
  • litellm: Only loaded when structured output is needed
  • openai: Fallback for structured output when litellm unavailable
  • praisonai_tools: Only loaded when tools are needed
This ensures minimal import-time overhead.

Import

from praisonai import auto

Classes

BaseAutoGenerator

Base class for auto-generators with shared functionality.

TaskDetails

Details for a single task.

RoleDetails

Details for a single role/agent.

TeamStructure

Structure for multi-agent team.

SingleAgentStructure

Structure for single-agent generation (Anthropic’s ‘start simple’ principle).

PatternRecommendation

LLM-based pattern recommendation with reasoning.

ValidationGate

Validation gate for prompt chaining workflows.

AutoGenerator

Auto-generates agents.yaml files from a topic description.

TaskDetails

Details for a workflow step.

WorkflowRouteDetails

Details for a route step.

WorkflowParallelDetails

Details for a parallel step.

WorkflowAgentDetails

Details for a workflow agent.

WorkflowStructure

Structure for auto-generated workflow.

WorkflowAutoGenerator

Auto-generates workflow.yaml files from a topic description.

Functions

get_all_available_tools()

Get all available tools organized by category.

get_tools_for_task()

Analyze a task description and return appropriate tools.

recommend_agent_count()

Recommend the optimal number of agents based on task complexity.

Constants

NameValue
TTypeVar('T', bound=BaseModel)
AVAILABLE_TOOLS['CodeDocsSearchTool', 'CSVSearchTool', 'DirectorySearchTool', 'DOCXSearchTool', 'DirectoryReadTool', 'FileReadTool', 'TXTSearchTool', 'JSONSearchTool', 'MDXSearchTool', 'PDFSearchTool', 'RagTool', 'S...
TOOL_CATEGORIES{'web_search': ['internet_search', 'duckduckgo', 'tavily_search', 'exa_search', 'search_web', 'ydc_search', 'searxng_search'], 'web_scraping': ['scrape_page', 'extract_links', 'crawl', 'extract_text',...
TASK_KEYWORD_TO_TOOLS{'search': 'web_search', 'find': 'web_search', 'look up': 'web_search', 'google': 'web_search', 'internet': 'web_search', 'online': 'web_search', 'web': 'web_search', 'scrape': 'web_scraping', 'crawl'...