auto • AI Agents Framework
Auto-generation module for PraisonAI agents and workflows.
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 autoClasses
MergeConflictError
Raised when `--merge` targets an existing but un-parseable YAML file.
Base class for auto-generators with shared functionality.
AutoGeneratorAuto-generates agents.yaml files from a topic description.
WorkflowAutoGeneratorAuto-generates workflow.yaml files from a topic description.
JobWorkflowAutoGeneratorAuto-generates job workflow YAML files with agent-centric steps.
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
| Name | Value |
|---|---|
T | TypeVar('T') |
_LLM_TRANSIENT_RETRIES | 2 |
_LLM_RETRY_MAX_DELAY | 30.0 |
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',... |
_TOPIC_TAG_RE | re.compile('<\\s/?\\stopic\\s*>', re.IGNORECASE) |
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'... |
_LAZY_MODEL_EXPORTS | {'PatternRecommendation': ('_get_team_models', 'PatternRecommendation'), 'SingleAgentStructure': ('_get_team_models', 'SingleAgentStructure'), 'ValidationGate': ('_get_team_models', 'ValidationGate'),... |