praisonAI 2.3.80__tar.gz → 2.3.82__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. {praisonai-2.3.80 → praisonai-2.3.82}/PKG-INFO +7 -1
  2. {praisonai-2.3.80 → praisonai-2.3.82}/PraisonAI.egg-info/PKG-INFO +7 -1
  3. {praisonai-2.3.80 → praisonai-2.3.82}/PraisonAI.egg-info/SOURCES.txt +1 -0
  4. {praisonai-2.3.80 → praisonai-2.3.82}/README.md +6 -0
  5. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/auto.py +251 -17
  6. praisonai-2.3.82/praisonai/cli/features/agents.py +375 -0
  7. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/image.py +14 -6
  8. praisonai-2.3.82/praisonai/cli/features/skills.py +649 -0
  9. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/main.py +19 -1
  10. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/deploy.py +1 -1
  11. praisonai-2.3.82/praisonai/version.py +1 -0
  12. praisonai-2.3.80/praisonai/cli/features/skills.py +0 -310
  13. praisonai-2.3.80/praisonai/version.py +0 -1
  14. {praisonai-2.3.80 → praisonai-2.3.82}/PraisonAI.egg-info/dependency_links.txt +0 -0
  15. {praisonai-2.3.80 → praisonai-2.3.82}/PraisonAI.egg-info/entry_points.txt +0 -0
  16. {praisonai-2.3.80 → praisonai-2.3.82}/PraisonAI.egg-info/requires.txt +0 -0
  17. {praisonai-2.3.80 → praisonai-2.3.82}/PraisonAI.egg-info/top_level.txt +0 -0
  18. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/__init__.py +0 -0
  19. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/__main__.py +0 -0
  20. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/agent_scheduler.py +0 -0
  21. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/agents_generator.py +0 -0
  22. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/api/call.py +0 -0
  23. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/chainlit_ui.py +0 -0
  24. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/__init__.py +0 -0
  25. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/__init__.py +0 -0
  26. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/agent_scheduler.py +0 -0
  27. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/at_mentions.py +0 -0
  28. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/auto_memory.py +0 -0
  29. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/autonomy_mode.py +0 -0
  30. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/base.py +0 -0
  31. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/compare.py +0 -0
  32. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/cost_tracker.py +0 -0
  33. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/eval.py +0 -0
  34. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/external_agents.py +0 -0
  35. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/fast_context.py +0 -0
  36. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/flow_display.py +0 -0
  37. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/git_integration.py +0 -0
  38. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/guardrail.py +0 -0
  39. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/handoff.py +0 -0
  40. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/interactive_tui.py +0 -0
  41. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/knowledge.py +0 -0
  42. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/mcp.py +0 -0
  43. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/message_queue.py +0 -0
  44. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/metrics.py +0 -0
  45. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/n8n.py +0 -0
  46. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/profile.py +0 -0
  47. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/profiling.py +0 -0
  48. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/repo_map.py +0 -0
  49. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/router.py +0 -0
  50. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/sandbox_executor.py +0 -0
  51. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/session.py +0 -0
  52. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/slash_commands.py +0 -0
  53. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/telemetry.py +0 -0
  54. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/todo.py +0 -0
  55. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/tools.py +0 -0
  56. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/features/workflow.py +0 -0
  57. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/cli/schedule_cli.py +0 -0
  58. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/__init__.py +0 -0
  59. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/agent_tools.py +0 -0
  60. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/diff/__init__.py +0 -0
  61. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/diff/diff_strategy.py +0 -0
  62. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/__init__.py +0 -0
  63. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/apply_diff.py +0 -0
  64. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/execute_command.py +0 -0
  65. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/list_files.py +0 -0
  66. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/read_file.py +0 -0
  67. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/search_replace.py +0 -0
  68. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/tools/write_file.py +0 -0
  69. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/utils/__init__.py +0 -0
  70. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/utils/file_utils.py +0 -0
  71. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/utils/ignore_utils.py +0 -0
  72. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/code/utils/text_utils.py +0 -0
  73. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/inbuilt_tools/__init__.py +0 -0
  74. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
  75. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/inc/__init__.py +0 -0
  76. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/inc/config.py +0 -0
  77. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/inc/models.py +0 -0
  78. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/integrations/__init__.py +0 -0
  79. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/integrations/base.py +0 -0
  80. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/integrations/claude_code.py +0 -0
  81. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/integrations/codex_cli.py +0 -0
  82. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/integrations/cursor_cli.py +0 -0
  83. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/integrations/gemini_cli.py +0 -0
  84. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/profiler.py +0 -0
  85. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler/__init__.py +0 -0
  86. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler/agent_scheduler.py +0 -0
  87. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler/base.py +0 -0
  88. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler/daemon_manager.py +0 -0
  89. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler/state_manager.py +0 -0
  90. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler/yaml_loader.py +0 -0
  91. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/scheduler.py +0 -0
  92. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/setup/__init__.py +0 -0
  93. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/setup/build.py +0 -0
  94. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/setup/post_install.py +0 -0
  95. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/setup/setup_conda_env.py +0 -0
  96. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/setup.py +0 -0
  97. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/test.py +0 -0
  98. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/train.py +0 -0
  99. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/train_vision.py +0 -0
  100. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/agents.py +0 -0
  101. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/callbacks.py +0 -0
  102. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/chat.py +0 -0
  103. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/code.py +0 -0
  104. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/colab.py +0 -0
  105. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/colab_chainlit.py +0 -0
  106. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/components/aicoder.py +0 -0
  107. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/context.py +0 -0
  108. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/database_config.py +0 -0
  109. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/db.py +0 -0
  110. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/realtime.py +0 -0
  111. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/realtimeclient/__init__.py +0 -0
  112. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/realtimeclient/tools.py +0 -0
  113. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/ui/sql_alchemy.py +0 -0
  114. {praisonai-2.3.80 → praisonai-2.3.82}/praisonai/upload_vision.py +0 -0
  115. {praisonai-2.3.80 → praisonai-2.3.82}/pyproject.toml +0 -0
  116. {praisonai-2.3.80 → praisonai-2.3.82}/setup.cfg +0 -0
  117. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test.py +0 -0
  118. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_agents_playbook.py +0 -0
  119. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_approval_system.py +0 -0
  120. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_basic.py +0 -0
  121. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_cli_features.py +0 -0
  122. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_custom_tools_fix.py +0 -0
  123. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_double_api_fix.py +0 -0
  124. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_n8n_integration.py +0 -0
  125. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_phase2_refactor.py +0 -0
  126. {praisonai-2.3.80 → praisonai-2.3.82}/tests/test_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PraisonAI
3
- Version: 2.3.80
3
+ Version: 2.3.82
4
4
  Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
5
5
  Author: Mervin Praison
6
6
  License: MIT
@@ -375,6 +375,12 @@ npm install praisonai
375
375
  | ↳ Git Integration | [Example](examples/python/cli/git_integration_example.py) | [📖](https://docs.praison.ai/docs/cli/git-integration) |
376
376
  | ↳ Sandbox Execution | [Example](examples/python/cli/sandbox_execution_example.py) | [📖](https://docs.praison.ai/docs/cli/sandbox-execution) |
377
377
  | ↳ CLI Compare | [Example](examples/compare/cli_compare_basic.py) | [📖](https://docs.praison.ai/docs/cli/compare) |
378
+ | ↳ Profile/Benchmark | [Example](#profile-benchmark) | [📖](https://docs.praison.ai/docs/cli/profile) |
379
+ | ↳ Auto Mode | [Example](#auto-mode) | [📖](https://docs.praison.ai/docs/cli/auto) |
380
+ | ↳ Init | [Example](#init) | [📖](https://docs.praison.ai/docs/cli/init) |
381
+ | ↳ File Input | [Example](#file-input) | [📖](https://docs.praison.ai/docs/cli/file-input) |
382
+ | ↳ Final Agent | [Example](#final-agent) | [📖](https://docs.praison.ai/docs/cli/final-agent) |
383
+ | ↳ Max Tokens | [Example](#max-tokens) | [📖](https://docs.praison.ai/docs/cli/max-tokens) |
378
384
  | **🧪 Evaluation** | | |
379
385
  | ↳ Accuracy Evaluation | [Example](examples/eval/accuracy_example.py) | [📖](https://docs.praison.ai/docs/cli/eval) |
380
386
  | ↳ Performance Evaluation | [Example](examples/eval/performance_example.py) | [📖](https://docs.praison.ai/docs/cli/eval) |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PraisonAI
3
- Version: 2.3.80
3
+ Version: 2.3.82
4
4
  Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
5
5
  Author: Mervin Praison
6
6
  License: MIT
@@ -375,6 +375,12 @@ npm install praisonai
375
375
  | ↳ Git Integration | [Example](examples/python/cli/git_integration_example.py) | [📖](https://docs.praison.ai/docs/cli/git-integration) |
376
376
  | ↳ Sandbox Execution | [Example](examples/python/cli/sandbox_execution_example.py) | [📖](https://docs.praison.ai/docs/cli/sandbox-execution) |
377
377
  | ↳ CLI Compare | [Example](examples/compare/cli_compare_basic.py) | [📖](https://docs.praison.ai/docs/cli/compare) |
378
+ | ↳ Profile/Benchmark | [Example](#profile-benchmark) | [📖](https://docs.praison.ai/docs/cli/profile) |
379
+ | ↳ Auto Mode | [Example](#auto-mode) | [📖](https://docs.praison.ai/docs/cli/auto) |
380
+ | ↳ Init | [Example](#init) | [📖](https://docs.praison.ai/docs/cli/init) |
381
+ | ↳ File Input | [Example](#file-input) | [📖](https://docs.praison.ai/docs/cli/file-input) |
382
+ | ↳ Final Agent | [Example](#final-agent) | [📖](https://docs.praison.ai/docs/cli/final-agent) |
383
+ | ↳ Max Tokens | [Example](#max-tokens) | [📖](https://docs.praison.ai/docs/cli/max-tokens) |
378
384
  | **🧪 Evaluation** | | |
379
385
  | ↳ Accuracy Evaluation | [Example](examples/eval/accuracy_example.py) | [📖](https://docs.praison.ai/docs/cli/eval) |
380
386
  | ↳ Performance Evaluation | [Example](examples/eval/performance_example.py) | [📖](https://docs.praison.ai/docs/cli/eval) |
@@ -27,6 +27,7 @@ praisonai/cli/main.py
27
27
  praisonai/cli/schedule_cli.py
28
28
  praisonai/cli/features/__init__.py
29
29
  praisonai/cli/features/agent_scheduler.py
30
+ praisonai/cli/features/agents.py
30
31
  praisonai/cli/features/at_mentions.py
31
32
  praisonai/cli/features/auto_memory.py
32
33
  praisonai/cli/features/autonomy_mode.py
@@ -278,6 +278,12 @@ npm install praisonai
278
278
  | ↳ Git Integration | [Example](examples/python/cli/git_integration_example.py) | [📖](https://docs.praison.ai/docs/cli/git-integration) |
279
279
  | ↳ Sandbox Execution | [Example](examples/python/cli/sandbox_execution_example.py) | [📖](https://docs.praison.ai/docs/cli/sandbox-execution) |
280
280
  | ↳ CLI Compare | [Example](examples/compare/cli_compare_basic.py) | [📖](https://docs.praison.ai/docs/cli/compare) |
281
+ | ↳ Profile/Benchmark | [Example](#profile-benchmark) | [📖](https://docs.praison.ai/docs/cli/profile) |
282
+ | ↳ Auto Mode | [Example](#auto-mode) | [📖](https://docs.praison.ai/docs/cli/auto) |
283
+ | ↳ Init | [Example](#init) | [📖](https://docs.praison.ai/docs/cli/init) |
284
+ | ↳ File Input | [Example](#file-input) | [📖](https://docs.praison.ai/docs/cli/file-input) |
285
+ | ↳ Final Agent | [Example](#final-agent) | [📖](https://docs.praison.ai/docs/cli/final-agent) |
286
+ | ↳ Max Tokens | [Example](#max-tokens) | [📖](https://docs.praison.ai/docs/cli/max-tokens) |
281
287
  | **🧪 Evaluation** | | |
282
288
  | ↳ Accuracy Evaluation | [Example](examples/eval/accuracy_example.py) | [📖](https://docs.praison.ai/docs/cli/eval) |
283
289
  | ↳ Performance Evaluation | [Example](examples/eval/performance_example.py) | [📖](https://docs.praison.ai/docs/cli/eval) |
@@ -62,7 +62,7 @@ except ImportError:
62
62
  logging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO').upper(), format='%(asctime)s - %(levelname)s - %(message)s')
63
63
 
64
64
  # =============================================================================
65
- # Available Tools List (shared between generators)
65
+ # Available Tools List (shared between generators) - Legacy for praisonai_tools
66
66
  # =============================================================================
67
67
  AVAILABLE_TOOLS = [
68
68
  "CodeDocsSearchTool", "CSVSearchTool", "DirectorySearchTool", "DOCXSearchTool",
@@ -72,6 +72,206 @@ AVAILABLE_TOOLS = [
72
72
  "YoutubeChannelSearchTool", "YoutubeVideoSearchTool"
73
73
  ]
74
74
 
75
+ # =============================================================================
76
+ # Enhanced Tool Discovery from praisonaiagents.tools
77
+ # =============================================================================
78
+
79
+ # Tool categories with their tools from praisonaiagents.tools
80
+ TOOL_CATEGORIES = {
81
+ 'web_search': [
82
+ 'internet_search', 'duckduckgo', 'tavily_search', 'exa_search',
83
+ 'search_web', 'ydc_search', 'searxng_search'
84
+ ],
85
+ 'web_scraping': [
86
+ 'scrape_page', 'extract_links', 'crawl', 'extract_text',
87
+ 'crawl4ai', 'crawl4ai_extract', 'get_article'
88
+ ],
89
+ 'file_operations': [
90
+ 'read_file', 'write_file', 'list_files', 'get_file_info',
91
+ 'copy_file', 'move_file', 'delete_file'
92
+ ],
93
+ 'code_execution': [
94
+ 'execute_command', 'execute_code', 'analyze_code', 'format_code'
95
+ ],
96
+ 'data_processing': [
97
+ 'read_csv', 'write_csv', 'analyze_csv', 'read_json', 'write_json',
98
+ 'read_excel', 'write_excel', 'read_yaml', 'write_yaml', 'read_xml'
99
+ ],
100
+ 'research': [
101
+ 'search_arxiv', 'get_arxiv_paper', 'wiki_search', 'wiki_summary',
102
+ 'get_news_sources', 'get_trending_topics'
103
+ ],
104
+ 'finance': [
105
+ 'get_stock_price', 'get_stock_info', 'get_historical_data'
106
+ ],
107
+ 'math': [
108
+ 'evaluate', 'solve_equation', 'convert_units', 'calculate_statistics'
109
+ ],
110
+ 'database': [
111
+ 'query', 'create_table', 'load_data', 'find_documents', 'vector_search'
112
+ ]
113
+ }
114
+
115
+ # Keywords that map to tool categories
116
+ TASK_KEYWORD_TO_TOOLS = {
117
+ # Web search keywords
118
+ 'search': 'web_search',
119
+ 'find': 'web_search',
120
+ 'look up': 'web_search',
121
+ 'google': 'web_search',
122
+ 'internet': 'web_search',
123
+ 'online': 'web_search',
124
+ 'web': 'web_search',
125
+
126
+ # Web scraping keywords
127
+ 'scrape': 'web_scraping',
128
+ 'crawl': 'web_scraping',
129
+ 'extract from website': 'web_scraping',
130
+ 'get from url': 'web_scraping',
131
+ 'fetch page': 'web_scraping',
132
+
133
+ # File operation keywords
134
+ 'read file': 'file_operations',
135
+ 'write file': 'file_operations',
136
+ 'save': 'file_operations',
137
+ 'load': 'file_operations',
138
+ 'open file': 'file_operations',
139
+ 'create file': 'file_operations',
140
+
141
+ # Code execution keywords
142
+ 'execute': 'code_execution',
143
+ 'run code': 'code_execution',
144
+ 'python': 'code_execution',
145
+ 'script': 'code_execution',
146
+ 'command': 'code_execution',
147
+ 'shell': 'code_execution',
148
+
149
+ # Data processing keywords
150
+ 'csv': 'data_processing',
151
+ 'excel': 'data_processing',
152
+ 'json': 'data_processing',
153
+ 'yaml': 'data_processing',
154
+ 'xml': 'data_processing',
155
+ 'data': 'data_processing',
156
+ 'spreadsheet': 'data_processing',
157
+
158
+ # Research keywords
159
+ 'research': 'research',
160
+ 'paper': 'research',
161
+ 'arxiv': 'research',
162
+ 'wikipedia': 'research',
163
+ 'academic': 'research',
164
+ 'news': 'research',
165
+
166
+ # Finance keywords
167
+ 'stock': 'finance',
168
+ 'price': 'finance',
169
+ 'market': 'finance',
170
+ 'financial': 'finance',
171
+ 'trading': 'finance',
172
+
173
+ # Math keywords
174
+ 'calculate': 'math',
175
+ 'math': 'math',
176
+ 'equation': 'math',
177
+ 'compute': 'math',
178
+ 'statistics': 'math',
179
+
180
+ # Database keywords
181
+ 'database': 'database',
182
+ 'sql': 'database',
183
+ 'query': 'database',
184
+ 'mongodb': 'database',
185
+ 'vector': 'database'
186
+ }
187
+
188
+
189
+ def get_all_available_tools() -> Dict[str, List[str]]:
190
+ """
191
+ Get all available tools organized by category.
192
+
193
+ Returns:
194
+ Dict mapping category names to lists of tool names
195
+ """
196
+ return TOOL_CATEGORIES.copy()
197
+
198
+
199
+ def get_tools_for_task(task_description: str) -> List[str]:
200
+ """
201
+ Analyze a task description and return appropriate tools.
202
+
203
+ Args:
204
+ task_description: The task to analyze
205
+
206
+ Returns:
207
+ List of tool names appropriate for the task
208
+ """
209
+ task_lower = task_description.lower()
210
+ matched_categories = set()
211
+
212
+ # Match keywords to categories
213
+ for keyword, category in TASK_KEYWORD_TO_TOOLS.items():
214
+ if keyword in task_lower:
215
+ matched_categories.add(category)
216
+
217
+ # Collect tools from matched categories
218
+ tools = []
219
+ for category in matched_categories:
220
+ if category in TOOL_CATEGORIES:
221
+ tools.extend(TOOL_CATEGORIES[category])
222
+
223
+ # Always include core tools for flexibility
224
+ core_tools = ['read_file', 'write_file', 'execute_command']
225
+ for tool in core_tools:
226
+ if tool not in tools:
227
+ tools.append(tool)
228
+
229
+ # Remove duplicates while preserving order
230
+ seen = set()
231
+ unique_tools = []
232
+ for tool in tools:
233
+ if tool not in seen:
234
+ seen.add(tool)
235
+ unique_tools.append(tool)
236
+
237
+ return unique_tools
238
+
239
+
240
+ def recommend_agent_count(task_description: str) -> int:
241
+ """
242
+ Recommend the optimal number of agents based on task complexity.
243
+
244
+ Args:
245
+ task_description: The task to analyze
246
+
247
+ Returns:
248
+ Recommended number of agents (1-4)
249
+ """
250
+ complexity = BaseAutoGenerator.analyze_complexity(task_description)
251
+
252
+ if complexity == 'simple':
253
+ return 1
254
+ elif complexity == 'moderate':
255
+ return 2
256
+ else: # complex
257
+ # Count distinct aspects of the task
258
+ task_lower = task_description.lower()
259
+ aspects = 0
260
+
261
+ aspect_keywords = [
262
+ ['research', 'search', 'find', 'gather'],
263
+ ['analyze', 'evaluate', 'assess', 'review'],
264
+ ['write', 'create', 'generate', 'produce'],
265
+ ['edit', 'refine', 'improve', 'polish'],
266
+ ['coordinate', 'manage', 'orchestrate', 'delegate']
267
+ ]
268
+
269
+ for keyword_group in aspect_keywords:
270
+ if any(kw in task_lower for kw in keyword_group):
271
+ aspects += 1
272
+
273
+ return min(max(aspects, 2), 4) # Between 2 and 4 agents
274
+
75
275
  # =============================================================================
76
276
  # Base Generator Class (DRY - shared functionality)
77
277
  # =============================================================================
@@ -458,9 +658,19 @@ Tools are not available for {framework}. To use tools, install:
458
658
 
459
659
  return merged_data
460
660
 
661
+ def discover_tools_for_topic(self) -> List[str]:
662
+ """
663
+ Discover appropriate tools for the topic using intelligent matching.
664
+
665
+ Returns:
666
+ List of tool names appropriate for this topic
667
+ """
668
+ return get_tools_for_task(self.topic)
669
+
461
670
  def get_user_content(self):
462
671
  """
463
672
  Generates a prompt for the OpenAI API to generate a team structure.
673
+ Uses intelligent tool discovery based on task analysis.
464
674
 
465
675
  Args:
466
676
  None
@@ -484,42 +694,65 @@ Tools are not available for {framework}. To use tools, install:
484
694
 
485
695
  workflow_guidance = pattern_guidance.get(self.pattern, pattern_guidance["sequential"])
486
696
 
697
+ # Get recommended tools based on task analysis
698
+ recommended_tools = self.discover_tools_for_topic()
699
+ recommended_agent_count = recommend_agent_count(self.topic)
700
+ complexity = self.analyze_complexity(self.topic)
701
+
702
+ # Build comprehensive tool list with categories
703
+ all_tools_by_category = []
704
+ for category, tools in TOOL_CATEGORIES.items():
705
+ all_tools_by_category.append(f" {category}: {', '.join(tools)}")
706
+ tools_reference = "\n".join(all_tools_by_category)
707
+
708
+ # Also include legacy tools for backward compatibility
709
+ legacy_tools = ", ".join(AVAILABLE_TOOLS)
710
+
487
711
  user_content = f"""Analyze and generate a team structure for: "{self.topic}"
488
712
 
489
- STEP 1: TASK COMPLEXITY ANALYSIS
490
- First, analyze the task complexity:
491
- - Is this a simple task that 1-2 agents could handle?
492
- - Does it require multiple specialized perspectives?
493
- - Are there clear sequential dependencies between steps?
713
+ TASK ANALYSIS (Pre-computed):
714
+ - Complexity: {complexity}
715
+ - Recommended agents: {recommended_agent_count}
716
+ - Recommended tools based on task keywords: {', '.join(recommended_tools)}
717
+
718
+ STEP 1: VALIDATE TASK ANALYSIS
719
+ Review the pre-computed analysis above. Adjust if needed based on your understanding.
494
720
 
495
721
  STEP 2: DETERMINE OPTIMAL TEAM SIZE
496
- Based on your analysis, create the minimum number of agents needed:
497
- - Simple tasks: 1-2 agents
498
- - Moderate tasks: 2-3 agents
499
- - Complex tasks: 3-4 agents (maximum)
722
+ Based on complexity analysis:
723
+ - Simple tasks: 1 agent (single focused agent)
724
+ - Moderate tasks: 2 agents (researcher + executor pattern)
725
+ - Complex tasks: 3-4 agents (specialized team)
500
726
 
501
- IMPORTANT: Only create agents that provide meaningful specialization. Avoid unnecessary complexity.
727
+ Recommended for this task: {recommended_agent_count} agent(s)
502
728
 
503
729
  STEP 3: DESIGN THE TEAM (Pattern: {self.pattern})
504
730
  {workflow_guidance}
731
+
505
732
  Each agent should have:
506
733
  - A clear, distinct role
507
734
  - A specific goal
508
735
  - Relevant backstory
509
736
  - 1 focused task with clear description and expected output
510
- - Appropriate tools (only if needed)
737
+ - Appropriate tools from the recommended list
738
+
739
+ AVAILABLE TOOLS BY CATEGORY:
740
+ {tools_reference}
741
+
742
+ LEGACY TOOLS (for backward compatibility):
743
+ {legacy_tools}
511
744
 
512
- Available Tools: CodeDocsSearchTool, CSVSearchTool, DirectorySearchTool, DOCXSearchTool, DirectoryReadTool, FileReadTool, TXTSearchTool, JSONSearchTool, MDXSearchTool, PDFSearchTool, RagTool, ScrapeElementFromWebsiteTool, ScrapeWebsiteTool, WebsiteSearchTool, XMLSearchTool, YoutubeChannelSearchTool, YoutubeVideoSearchTool.
513
- Only use these tools if the task requires them. Use empty list [] if no tools needed.
745
+ RECOMMENDED TOOLS FOR THIS TASK: {', '.join(recommended_tools)}
746
+ Prioritize using the recommended tools. Only add others if specifically needed.
514
747
 
515
- Example structure (2 agents for a writing task):
748
+ Example structure (2 agents for a research + writing task):
516
749
  {{
517
750
  "roles": {{
518
751
  "researcher": {{
519
752
  "role": "Research Analyst",
520
753
  "goal": "Gather comprehensive information on the topic",
521
754
  "backstory": "Expert researcher skilled at finding and synthesizing information.",
522
- "tools": ["WebsiteSearchTool"],
755
+ "tools": ["internet_search", "read_file"],
523
756
  "tasks": {{
524
757
  "research_task": {{
525
758
  "description": "Research key information about the topic and compile findings.",
@@ -531,7 +764,7 @@ Example structure (2 agents for a writing task):
531
764
  "role": "Content Writer",
532
765
  "goal": "Create polished final content",
533
766
  "backstory": "Skilled writer who transforms research into engaging content.",
534
- "tools": [],
767
+ "tools": ["write_file"],
535
768
  "tasks": {{
536
769
  "writing_task": {{
537
770
  "description": "Write the final content based on research findings.",
@@ -543,6 +776,7 @@ Example structure (2 agents for a writing task):
543
776
  }}
544
777
 
545
778
  Now generate the optimal team structure for: {self.topic}
779
+ Use the recommended tools: {', '.join(recommended_tools)}
546
780
  """
547
781
  return user_content
548
782