PraisonAI 1.0.0__tar.gz → 2.0.1__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.

Potentially problematic release.


This version of PraisonAI might be problematic. Click here for more details.

Files changed (81) hide show
  1. {praisonai-1.0.0 → praisonai-2.0.1}/PKG-INFO +46 -6
  2. {praisonai-1.0.0 → praisonai-2.0.1}/README.md +37 -1
  3. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/agents_generator.py +145 -4
  4. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/auto.py +13 -1
  5. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/cli.py +39 -15
  6. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/deploy.py +1 -1
  7. praisonai-2.0.1/praisonai/ui/README.md +21 -0
  8. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/chat.py +91 -228
  9. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/code.py +31 -134
  10. praisonai-2.0.1/praisonai/ui/components/aicoder.py +269 -0
  11. praisonai-2.0.1/praisonai/ui/config/.chainlit/config.toml +120 -0
  12. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/bn.json +231 -0
  13. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/en-US.json +229 -0
  14. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/gu.json +231 -0
  15. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/he-IL.json +231 -0
  16. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/hi.json +231 -0
  17. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/kn.json +231 -0
  18. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/ml.json +231 -0
  19. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/mr.json +231 -0
  20. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/ta.json +231 -0
  21. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/te.json +231 -0
  22. praisonai-2.0.1/praisonai/ui/config/.chainlit/translations/zh-CN.json +229 -0
  23. praisonai-2.0.1/praisonai/ui/config/chainlit.md +1 -0
  24. praisonai-2.0.1/praisonai/ui/config/translations/bn.json +231 -0
  25. praisonai-2.0.1/praisonai/ui/config/translations/en-US.json +229 -0
  26. praisonai-2.0.1/praisonai/ui/config/translations/gu.json +231 -0
  27. praisonai-2.0.1/praisonai/ui/config/translations/he-IL.json +231 -0
  28. praisonai-2.0.1/praisonai/ui/config/translations/hi.json +231 -0
  29. praisonai-2.0.1/praisonai/ui/config/translations/kn.json +231 -0
  30. praisonai-2.0.1/praisonai/ui/config/translations/ml.json +231 -0
  31. praisonai-2.0.1/praisonai/ui/config/translations/mr.json +231 -0
  32. praisonai-2.0.1/praisonai/ui/config/translations/ta.json +231 -0
  33. praisonai-2.0.1/praisonai/ui/config/translations/te.json +231 -0
  34. praisonai-2.0.1/praisonai/ui/config/translations/zh-CN.json +229 -0
  35. praisonai-2.0.1/praisonai/ui/db.py +291 -0
  36. praisonai-2.0.1/praisonai/ui/public/praison.css +3 -0
  37. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/sql_alchemy.py +146 -146
  38. {praisonai-1.0.0 → praisonai-2.0.1}/pyproject.toml +115 -7
  39. {praisonai-1.0.0 → praisonai-2.0.1}/LICENSE +0 -0
  40. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/__init__.py +0 -0
  41. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/__main__.py +0 -0
  42. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/api/call.py +0 -0
  43. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/chainlit_ui.py +0 -0
  44. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/inbuilt_tools/__init__.py +0 -0
  45. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
  46. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/inc/__init__.py +0 -0
  47. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/inc/config.py +0 -0
  48. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/inc/models.py +0 -0
  49. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/android-chrome-192x192.png +0 -0
  50. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/android-chrome-512x512.png +0 -0
  51. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/apple-touch-icon.png +0 -0
  52. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/fantasy.svg +0 -0
  53. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/favicon-16x16.png +0 -0
  54. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/favicon-32x32.png +0 -0
  55. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/favicon.ico +0 -0
  56. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/game.svg +0 -0
  57. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/logo_dark.png +0 -0
  58. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/logo_light.png +0 -0
  59. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/movie.svg +0 -0
  60. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/public/thriller.svg +0 -0
  61. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup/__init__.py +0 -0
  62. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup/build.py +0 -0
  63. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup/config.yaml +0 -0
  64. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup/post_install.py +0 -0
  65. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup/setup_conda_env.py +0 -0
  66. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup/setup_conda_env.sh +0 -0
  67. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/setup.py +0 -0
  68. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/test.py +0 -0
  69. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/train.py +0 -0
  70. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/context.py +0 -0
  71. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/public/fantasy.svg +0 -0
  72. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/public/game.svg +0 -0
  73. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/public/logo_dark.png +0 -0
  74. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/public/logo_light.png +0 -0
  75. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/public/movie.svg +0 -0
  76. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/public/thriller.svg +0 -0
  77. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/realtime.py +0 -0
  78. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/realtimeclient/__init__.py +0 -0
  79. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/realtimeclient/realtimedocs.txt +0 -0
  80. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/ui/realtimeclient/tools.py +0 -0
  81. {praisonai-1.0.0 → praisonai-2.0.1}/praisonai/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PraisonAI
3
- Version: 1.0.0
3
+ Version: 2.0.1
4
4
  Summary: PraisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration.
5
5
  Author: Mervin Praison
6
6
  Requires-Python: >=3.10,<3.13
@@ -23,9 +23,10 @@ Provides-Extra: openai
23
23
  Provides-Extra: realtime
24
24
  Provides-Extra: train
25
25
  Provides-Extra: ui
26
+ Requires-Dist: PyYAML (>=6.0)
26
27
  Requires-Dist: agentops (>=0.3.12) ; extra == "agentops"
27
28
  Requires-Dist: aiosqlite (>=0.20.0) ; extra == "chat" or extra == "code" or extra == "realtime"
28
- Requires-Dist: chainlit (==1.3.0rc1) ; extra == "ui" or extra == "chat" or extra == "code" or extra == "realtime"
29
+ Requires-Dist: chainlit (==2.0rc1) ; extra == "ui" or extra == "chat" or extra == "code" or extra == "realtime"
29
30
  Requires-Dist: crawl4ai (==0.3.4) ; extra == "chat" or extra == "code" or extra == "realtime"
30
31
  Requires-Dist: crewai (>=0.32.0) ; extra == "crewai" or extra == "autogen"
31
32
  Requires-Dist: duckduckgo_search (>=6.3.0) ; extra == "realtime"
@@ -34,21 +35,24 @@ Requires-Dist: flaml[automl] (>=2.3.1) ; extra == "call"
34
35
  Requires-Dist: flask (>=3.0.0) ; extra == "api"
35
36
  Requires-Dist: gradio (>=4.26.0) ; extra == "gradio"
36
37
  Requires-Dist: greenlet (>=3.0.3) ; extra == "chat" or extra == "code" or extra == "realtime"
37
- Requires-Dist: instructor (>=0.4.8) ; extra == "crewai" or extra == "autogen"
38
+ Requires-Dist: instructor (>=0.4.8) ; extra == "chat" or extra == "call" or extra == "crewai" or extra == "autogen"
38
39
  Requires-Dist: langchain-anthropic (>=0.1.13) ; extra == "anthropic"
39
40
  Requires-Dist: langchain-cohere (>=0.1.4) ; extra == "cohere"
40
41
  Requires-Dist: langchain-google-genai (>=1.0.4) ; extra == "google"
41
42
  Requires-Dist: langchain-openai (>=0.1.7) ; extra == "openai"
42
43
  Requires-Dist: litellm (>=1.41.8) ; extra == "chat" or extra == "code" or extra == "realtime"
43
44
  Requires-Dist: markdown (>=3.5)
45
+ Requires-Dist: openai (>=1.54.0) ; extra == "call"
44
46
  Requires-Dist: playwright (>=1.47.0) ; extra == "chat" or extra == "code"
45
47
  Requires-Dist: plotly (>=5.24.0) ; extra == "realtime"
46
48
  Requires-Dist: praisonai-tools (>=0.0.7) ; extra == "crewai" or extra == "autogen"
49
+ Requires-Dist: praisonaiagents (>=0.0.4)
47
50
  Requires-Dist: pyautogen (>=0.2.19) ; extra == "autogen"
51
+ Requires-Dist: pydantic (<=2.10.1) ; extra == "chat" or extra == "code"
48
52
  Requires-Dist: pyngrok (>=1.4.0) ; extra == "call"
49
53
  Requires-Dist: pyparsing (>=3.0.0)
50
- Requires-Dist: python-dotenv (>=0.19.0) ; extra == "call"
51
- Requires-Dist: rich (>=13.7) ; extra == "call"
54
+ Requires-Dist: python-dotenv (>=1.0.1) ; extra == "call"
55
+ Requires-Dist: rich (>=13.7) ; extra == "chat" or extra == "call"
52
56
  Requires-Dist: sqlalchemy (>=2.0.36) ; extra == "chat" or extra == "code" or extra == "realtime"
53
57
  Requires-Dist: tavily-python (==0.5.0) ; extra == "chat" or extra == "code" or extra == "realtime"
54
58
  Requires-Dist: twilio (>=7.0.0) ; extra == "call"
@@ -77,6 +81,8 @@ Description-Content-Type: text/markdown
77
81
 
78
82
  # Praison AI
79
83
 
84
+ <a href="https://trendshift.io/repositories/9130" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9130" alt="MervinPraison%2FPraisonAI | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
85
+
80
86
  </div>
81
87
 
82
88
  Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
@@ -112,7 +118,7 @@ Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, rep
112
118
 
113
119
  ## Installation Options
114
120
 
115
- ### Basic Installation
121
+ ### Using pip
116
122
  ```bash
117
123
  pip install praisonai
118
124
  ```
@@ -431,12 +437,26 @@ if __name__ == "__main__":
431
437
  ```
432
438
 
433
439
  4. **Install only dev dependencies:**
440
+
434
441
  ```sh
435
442
  poetry install --with dev
436
443
  ```
437
444
 
438
445
  This configuration ensures that your development dependencies are correctly categorized and installed as needed.
439
446
 
447
+ ### Using uv (Fast Python Package Installer)
448
+ ```bash
449
+ # Install uv if you haven't already
450
+ pip install uv
451
+
452
+ # Install from requirements
453
+ uv pip install -r pyproject.toml
454
+
455
+ # Install with extras
456
+ uv pip install -r pyproject.toml --extra code
457
+ uv pip install -r pyproject.toml --extra "crewai,autogen"
458
+ ```
459
+
440
460
  ## Contributing
441
461
 
442
462
  - Fork on GitHub: Use the "Fork" button on the repository page.
@@ -455,4 +475,24 @@ This configuration ensures that your development dependencies are correctly cate
455
475
 
456
476
  Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
457
477
 
478
+ ## Video Tutorials
479
+
480
+ | Topic | Video |
481
+ |-------|--------|
482
+ | Introduction | [![Introduction](https://img.youtube.com/vi/Fn1lQjC0GO0/0.jpg)](https://www.youtube.com/watch?v=Fn1lQjC0GO0) |
483
+ | Tools Overview | [![Tools Overview](https://img.youtube.com/vi/XaQRgRpV7jo/0.jpg)](https://www.youtube.com/watch?v=XaQRgRpV7jo) |
484
+ | Custom Tools | [![Custom Tools](https://img.youtube.com/vi/JSU2Rndh06c/0.jpg)](https://www.youtube.com/watch?v=JSU2Rndh06c) |
485
+ | Firecrawl Integration | [![Firecrawl](https://img.youtube.com/vi/UoqUDcLcOYo/0.jpg)](https://www.youtube.com/watch?v=UoqUDcLcOYo) |
486
+ | User Interface | [![UI](https://img.youtube.com/vi/tg-ZjNl3OCg/0.jpg)](https://www.youtube.com/watch?v=tg-ZjNl3OCg) |
487
+ | Crawl4AI Integration | [![Crawl4AI](https://img.youtube.com/vi/KAvuVUh0XU8/0.jpg)](https://www.youtube.com/watch?v=KAvuVUh0XU8) |
488
+ | Chat Interface | [![Chat](https://img.youtube.com/vi/sw3uDqn2h1Y/0.jpg)](https://www.youtube.com/watch?v=sw3uDqn2h1Y) |
489
+ | Code Interface | [![Code](https://img.youtube.com/vi/_5jQayO-MQY/0.jpg)](https://www.youtube.com/watch?v=_5jQayO-MQY) |
490
+ | Mem0 Integration | [![Mem0](https://img.youtube.com/vi/KIGSgRxf1cY/0.jpg)](https://www.youtube.com/watch?v=KIGSgRxf1cY) |
491
+ | Training | [![Training](https://img.youtube.com/vi/aLawE8kwCrI/0.jpg)](https://www.youtube.com/watch?v=aLawE8kwCrI) |
492
+ | Realtime Voice Interface | [![Realtime](https://img.youtube.com/vi/frRHfevTCSw/0.jpg)](https://www.youtube.com/watch?v=frRHfevTCSw) |
493
+ | Call Interface | [![Call](https://img.youtube.com/vi/m1cwrUG2iAk/0.jpg)](https://www.youtube.com/watch?v=m1cwrUG2iAk) |
494
+
495
+ ## License
496
+
497
+ Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
458
498
 
@@ -16,6 +16,8 @@
16
16
 
17
17
  # Praison AI
18
18
 
19
+ <a href="https://trendshift.io/repositories/9130" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9130" alt="MervinPraison%2FPraisonAI | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
20
+
19
21
  </div>
20
22
 
21
23
  Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
@@ -51,7 +53,7 @@ Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, rep
51
53
 
52
54
  ## Installation Options
53
55
 
54
- ### Basic Installation
56
+ ### Using pip
55
57
  ```bash
56
58
  pip install praisonai
57
59
  ```
@@ -370,12 +372,26 @@ if __name__ == "__main__":
370
372
  ```
371
373
 
372
374
  4. **Install only dev dependencies:**
375
+
373
376
  ```sh
374
377
  poetry install --with dev
375
378
  ```
376
379
 
377
380
  This configuration ensures that your development dependencies are correctly categorized and installed as needed.
378
381
 
382
+ ### Using uv (Fast Python Package Installer)
383
+ ```bash
384
+ # Install uv if you haven't already
385
+ pip install uv
386
+
387
+ # Install from requirements
388
+ uv pip install -r pyproject.toml
389
+
390
+ # Install with extras
391
+ uv pip install -r pyproject.toml --extra code
392
+ uv pip install -r pyproject.toml --extra "crewai,autogen"
393
+ ```
394
+
379
395
  ## Contributing
380
396
 
381
397
  - Fork on GitHub: Use the "Fork" button on the repository page.
@@ -394,3 +410,23 @@ This configuration ensures that your development dependencies are correctly cate
394
410
 
395
411
  Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
396
412
 
413
+ ## Video Tutorials
414
+
415
+ | Topic | Video |
416
+ |-------|--------|
417
+ | Introduction | [![Introduction](https://img.youtube.com/vi/Fn1lQjC0GO0/0.jpg)](https://www.youtube.com/watch?v=Fn1lQjC0GO0) |
418
+ | Tools Overview | [![Tools Overview](https://img.youtube.com/vi/XaQRgRpV7jo/0.jpg)](https://www.youtube.com/watch?v=XaQRgRpV7jo) |
419
+ | Custom Tools | [![Custom Tools](https://img.youtube.com/vi/JSU2Rndh06c/0.jpg)](https://www.youtube.com/watch?v=JSU2Rndh06c) |
420
+ | Firecrawl Integration | [![Firecrawl](https://img.youtube.com/vi/UoqUDcLcOYo/0.jpg)](https://www.youtube.com/watch?v=UoqUDcLcOYo) |
421
+ | User Interface | [![UI](https://img.youtube.com/vi/tg-ZjNl3OCg/0.jpg)](https://www.youtube.com/watch?v=tg-ZjNl3OCg) |
422
+ | Crawl4AI Integration | [![Crawl4AI](https://img.youtube.com/vi/KAvuVUh0XU8/0.jpg)](https://www.youtube.com/watch?v=KAvuVUh0XU8) |
423
+ | Chat Interface | [![Chat](https://img.youtube.com/vi/sw3uDqn2h1Y/0.jpg)](https://www.youtube.com/watch?v=sw3uDqn2h1Y) |
424
+ | Code Interface | [![Code](https://img.youtube.com/vi/_5jQayO-MQY/0.jpg)](https://www.youtube.com/watch?v=_5jQayO-MQY) |
425
+ | Mem0 Integration | [![Mem0](https://img.youtube.com/vi/KIGSgRxf1cY/0.jpg)](https://www.youtube.com/watch?v=KIGSgRxf1cY) |
426
+ | Training | [![Training](https://img.youtube.com/vi/aLawE8kwCrI/0.jpg)](https://www.youtube.com/watch?v=aLawE8kwCrI) |
427
+ | Realtime Voice Interface | [![Realtime](https://img.youtube.com/vi/frRHfevTCSw/0.jpg)](https://www.youtube.com/watch?v=frRHfevTCSw) |
428
+ | Call Interface | [![Call](https://img.youtube.com/vi/m1cwrUG2iAk/0.jpg)](https://www.youtube.com/watch?v=m1cwrUG2iAk) |
429
+
430
+ ## License
431
+
432
+ Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
@@ -20,6 +20,13 @@ CREWAI_AVAILABLE = False
20
20
  AUTOGEN_AVAILABLE = False
21
21
  PRAISONAI_TOOLS_AVAILABLE = False
22
22
  AGENTOPS_AVAILABLE = False
23
+ PRAISONAI_AVAILABLE = False
24
+
25
+ try:
26
+ from praisonaiagents import Agent as PraisonAgent, Task as PraisonTask, PraisonAIAgents
27
+ PRAISONAI_AVAILABLE = True
28
+ except ImportError:
29
+ pass
23
30
 
24
31
  try:
25
32
  from crewai import Agent, Task, Crew
@@ -37,11 +44,14 @@ except ImportError:
37
44
  try:
38
45
  import agentops
39
46
  AGENTOPS_AVAILABLE = True
47
+ AGENTOPS_API_KEY = os.getenv("AGENTOPS_API_KEY")
48
+ if not AGENTOPS_API_KEY:
49
+ AGENTOPS_AVAILABLE = False
40
50
  except ImportError:
41
51
  pass
42
52
 
43
53
  # Only try to import praisonai_tools if either CrewAI or AutoGen is available
44
- if CREWAI_AVAILABLE or AUTOGEN_AVAILABLE:
54
+ if CREWAI_AVAILABLE or AUTOGEN_AVAILABLE or PRAISONAI_AVAILABLE:
45
55
  try:
46
56
  from praisonai_tools import (
47
57
  CodeDocsSearchTool, CSVSearchTool, DirectorySearchTool, DOCXSearchTool, DirectoryReadTool,
@@ -115,6 +125,8 @@ class AgentsGenerator:
115
125
  raise ImportError("CrewAI is not installed. Please install it with 'pip install praisonai[crewai]'")
116
126
  elif framework == "autogen" and not AUTOGEN_AVAILABLE:
117
127
  raise ImportError("AutoGen is not installed. Please install it with 'pip install praisonai[autogen]'")
128
+ elif framework == "praisonai" and not PRAISONAI_AVAILABLE:
129
+ raise ImportError("PraisonAI is not installed. Please install it with 'pip install praisonaiagents'")
118
130
 
119
131
  def is_function_or_decorated(self, obj):
120
132
  """
@@ -221,7 +233,7 @@ class AgentsGenerator:
221
233
  tools_dict = {}
222
234
 
223
235
  # Only try to use praisonai_tools if it's available and needed
224
- if PRAISONAI_TOOLS_AVAILABLE and (CREWAI_AVAILABLE or AUTOGEN_AVAILABLE):
236
+ if PRAISONAI_TOOLS_AVAILABLE and (CREWAI_AVAILABLE or AUTOGEN_AVAILABLE or PRAISONAI_AVAILABLE):
225
237
  tools_dict = {
226
238
  'CodeDocsSearchTool': CodeDocsSearchTool(),
227
239
  'CSVSearchTool': CSVSearchTool(),
@@ -266,13 +278,19 @@ class AgentsGenerator:
266
278
  if not AUTOGEN_AVAILABLE:
267
279
  raise ImportError("AutoGen is not installed. Please install it with 'pip install praisonai[autogen]'")
268
280
  if AGENTOPS_AVAILABLE:
269
- agentops.init(os.environ.get("AGENTOPS_API_KEY"), tags=["autogen"])
281
+ agentops.init(os.environ.get("AGENTOPS_API_KEY"), default_tags=["autogen"])
270
282
  return self._run_autogen(config, topic, tools_dict)
283
+ elif framework == "praisonai":
284
+ if not PRAISONAI_AVAILABLE:
285
+ raise ImportError("PraisonAI is not installed. Please install it with 'pip install praisonaiagents'")
286
+ if AGENTOPS_AVAILABLE:
287
+ agentops.init(os.environ.get("AGENTOPS_API_KEY"), default_tags=["praisonai"])
288
+ return self._run_praisonai(config, topic, tools_dict)
271
289
  else: # framework=crewai
272
290
  if not CREWAI_AVAILABLE:
273
291
  raise ImportError("CrewAI is not installed. Please install it with 'pip install praisonai[crewai]'")
274
292
  if AGENTOPS_AVAILABLE:
275
- agentops.init(os.environ.get("AGENTOPS_API_KEY"), tags=["crewai"])
293
+ agentops.init(os.environ.get("AGENTOPS_API_KEY"), default_tags=["crewai"])
276
294
  return self._run_crewai(config, topic, tools_dict)
277
295
 
278
296
  def _run_autogen(self, config, topic, tools_dict):
@@ -472,3 +490,126 @@ class AgentsGenerator:
472
490
 
473
491
  return result
474
492
 
493
+ def _run_praisonai(self, config, topic, tools_dict):
494
+ """
495
+ Run agents using the PraisonAI framework.
496
+ """
497
+ agents = {}
498
+ tasks = []
499
+ tasks_dict = {}
500
+
501
+ # Create agents from config
502
+ for role, details in config['roles'].items():
503
+ role_filled = details['role'].format(topic=topic)
504
+ goal_filled = details['goal'].format(topic=topic)
505
+ backstory_filled = details['backstory'].format(topic=topic)
506
+
507
+ # Get agent tools
508
+ agent_tools = [tools_dict[tool] for tool in details.get('tools', [])
509
+ if tool in tools_dict]
510
+
511
+ # Configure LLM
512
+ llm_model = details.get('llm')
513
+ if llm_model:
514
+ llm = llm_model.get("model", os.environ.get("MODEL_NAME", "gpt-4o"))
515
+ else:
516
+ llm = os.environ.get("MODEL_NAME", "gpt-4o")
517
+
518
+ # Configure function calling LLM
519
+ function_calling_llm_model = details.get('function_calling_llm')
520
+ if function_calling_llm_model:
521
+ function_calling_llm = function_calling_llm_model.get("model", os.environ.get("MODEL_NAME", "openai/gpt-4o"))
522
+ else:
523
+ function_calling_llm = os.environ.get("MODEL_NAME", "gpt-4o")
524
+
525
+ # Create PraisonAI agent
526
+ agent = PraisonAgent(
527
+ name=role_filled,
528
+ role=role_filled,
529
+ goal=goal_filled,
530
+ backstory=backstory_filled,
531
+ tools=agent_tools,
532
+ allow_delegation=details.get('allow_delegation', False),
533
+ llm=llm,
534
+ function_calling_llm=function_calling_llm,
535
+ max_iter=details.get('max_iter', 15),
536
+ max_rpm=details.get('max_rpm'),
537
+ max_execution_time=details.get('max_execution_time'),
538
+ verbose=details.get('verbose', True),
539
+ cache=details.get('cache', True),
540
+ system_template=details.get('system_template'),
541
+ prompt_template=details.get('prompt_template'),
542
+ response_template=details.get('response_template'),
543
+ )
544
+
545
+ # Set agent callback if provided
546
+ if self.agent_callback:
547
+ agent.step_callback = self.agent_callback
548
+
549
+ agents[role] = agent
550
+
551
+ # Create tasks for the agent
552
+ for task_name, task_details in details.get('tasks', {}).items():
553
+ description_filled = task_details['description'].format(topic=topic)
554
+ expected_output_filled = task_details['expected_output'].format(topic=topic)
555
+
556
+ # Create task using PraisonAI Task class
557
+ task = PraisonTask(
558
+ description=description_filled,
559
+ expected_output=expected_output_filled,
560
+ agent=agent,
561
+ tools=task_details.get('tools', []),
562
+ async_execution=task_details.get('async_execution', False),
563
+ context=[],
564
+ config=task_details.get('config', {}),
565
+ output_json=task_details.get('output_json'),
566
+ output_pydantic=task_details.get('output_pydantic'),
567
+ output_file=task_details.get('output_file', ""),
568
+ callback=task_details.get('callback'),
569
+ create_directory=task_details.get('create_directory', False)
570
+ )
571
+
572
+ # Set task callback if provided
573
+ if self.task_callback:
574
+ task.callback = self.task_callback
575
+
576
+ tasks.append(task)
577
+ tasks_dict[task_name] = task
578
+
579
+ # Set up task contexts
580
+ for role, details in config['roles'].items():
581
+ for task_name, task_details in details.get('tasks', {}).items():
582
+ task = tasks_dict[task_name]
583
+ context_tasks = [tasks_dict[ctx] for ctx in task_details.get('context', [])
584
+ if ctx in tasks_dict]
585
+ task.context = context_tasks
586
+
587
+ # Create and run the PraisonAI agents
588
+ if config.get('process') == 'hierarchical':
589
+ agents = PraisonAIAgents(
590
+ agents=list(agents.values()),
591
+ tasks=tasks,
592
+ verbose=True,
593
+ process="hierarchical",
594
+ manager_llm=config.get('manager_llm', 'gpt-4o'),
595
+ )
596
+ else:
597
+ agents = PraisonAIAgents(
598
+ agents=list(agents.values()),
599
+ tasks=tasks,
600
+ verbose=2
601
+ )
602
+
603
+ self.logger.debug("Final Configuration:")
604
+ self.logger.debug(f"Agents: {agents.agents}")
605
+ self.logger.debug(f"Tasks: {agents.tasks}")
606
+
607
+ response = agents.start()
608
+ # result = f"### Task Output ###\n{response}"
609
+ self.logger.debug(f"Result: {response}")
610
+ result = ""
611
+
612
+ if AGENTOPS_AVAILABLE:
613
+ agentops.end_session("Success")
614
+
615
+ return result
@@ -12,6 +12,13 @@ import logging
12
12
  CREWAI_AVAILABLE = False
13
13
  AUTOGEN_AVAILABLE = False
14
14
  PRAISONAI_TOOLS_AVAILABLE = False
15
+ PRAISONAI_AVAILABLE = False
16
+
17
+ try:
18
+ from praisonaiagents import Agent as PraisonAgent, Task as PraisonTask, PraisonAIAgents
19
+ PRAISONAI_AVAILABLE = True
20
+ except ImportError:
21
+ pass
15
22
 
16
23
  try:
17
24
  from crewai import Agent, Task, Crew
@@ -71,6 +78,11 @@ CrewAI is not installed. Please install with:
71
78
  AutoGen is not installed. Please install with:
72
79
  pip install "praisonai[autogen]"
73
80
  """)
81
+ elif framework == "praisonai" and not PRAISONAI_AVAILABLE:
82
+ raise ImportError("""
83
+ Praisonai is not installed. Please install with:
84
+ pip install praisonaiagents
85
+ """)
74
86
 
75
87
  # Only show tools message if using a framework and tools are needed
76
88
  if (framework in ["crewai", "autogen"]) and not PRAISONAI_TOOLS_AVAILABLE:
@@ -88,7 +100,7 @@ Tools are not available for {framework}. To use tools, install:
88
100
  ]
89
101
  self.topic = topic
90
102
  self.agent_file = agent_file
91
- self.framework = framework or "crewai"
103
+ self.framework = framework or "praisonai"
92
104
  self.client = instructor.patch(
93
105
  OpenAI(
94
106
  base_url=self.config_list[0]['base_url'],
@@ -24,9 +24,19 @@ GRADIO_AVAILABLE = False
24
24
  CALL_MODULE_AVAILABLE = False
25
25
  CREWAI_AVAILABLE = False
26
26
  AUTOGEN_AVAILABLE = False
27
+ PRAISONAI_AVAILABLE = False
27
28
 
28
29
  try:
29
- os.environ["CHAINLIT_APP_ROOT"] = os.path.join(os.path.expanduser("~"), ".praison")
30
+ # Create necessary directories and set CHAINLIT_APP_ROOT
31
+ if "CHAINLIT_APP_ROOT" not in os.environ:
32
+ chainlit_root = os.path.join(os.path.expanduser("~"), ".praison")
33
+ os.environ["CHAINLIT_APP_ROOT"] = chainlit_root
34
+ else:
35
+ chainlit_root = os.environ["CHAINLIT_APP_ROOT"]
36
+
37
+ os.makedirs(chainlit_root, exist_ok=True)
38
+ os.makedirs(os.path.join(chainlit_root, ".files"), exist_ok=True)
39
+
30
40
  from chainlit.cli import chainlit_run
31
41
  CHAINLIT_AVAILABLE = True
32
42
  except ImportError:
@@ -56,6 +66,12 @@ try:
56
66
  except ImportError:
57
67
  pass
58
68
 
69
+ try:
70
+ from praisonaiagents import Agent as PraisonAgent, Task as PraisonTask, PraisonAIAgents
71
+ PRAISONAI_AVAILABLE = True
72
+ except ImportError:
73
+ pass
74
+
59
75
  logging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO'), format='%(asctime)s - %(levelname)s - %(message)s')
60
76
 
61
77
  def stream_subprocess(command, env=None):
@@ -264,7 +280,7 @@ class PraisonAI:
264
280
  Parse the command-line arguments for the PraisonAI CLI.
265
281
  """
266
282
  parser = argparse.ArgumentParser(prog="praisonai", description="praisonAI command-line interface")
267
- parser.add_argument("--framework", choices=["crewai", "autogen"], help="Specify the framework")
283
+ parser.add_argument("--framework", choices=["crewai", "autogen", "praisonai"], help="Specify the framework")
268
284
  parser.add_argument("--ui", choices=["chainlit", "gradio"], help="Specify the UI framework (gradio or chainlit).")
269
285
  parser.add_argument("--auto", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
270
286
  parser.add_argument("--init", nargs=argparse.REMAINDER, help="Initialize agents with optional topic")
@@ -296,6 +312,19 @@ class PraisonAI:
296
312
  if args.command == 'call':
297
313
  args.call = True
298
314
 
315
+ # Handle both command and flag versions for call
316
+ if args.command == 'call' or args.call:
317
+ if not CALL_MODULE_AVAILABLE:
318
+ print("[red]ERROR: Call feature is not installed. Install with:[/red]")
319
+ print("\npip install \"praisonai[call]\"\n")
320
+ sys.exit(1)
321
+
322
+ call_args = []
323
+ if args.public:
324
+ call_args.append('--public')
325
+ call_module.main(call_args)
326
+ sys.exit(0)
327
+
299
328
  # Handle special commands first
300
329
  special_commands = ['chat', 'code', 'call', 'realtime', 'train', 'ui']
301
330
 
@@ -359,11 +388,12 @@ class PraisonAI:
359
388
 
360
389
  # Only check framework availability for agent-related operations
361
390
  if not args.command and (args.init or args.auto or args.framework):
362
- if not CREWAI_AVAILABLE and not AUTOGEN_AVAILABLE:
391
+ if not CREWAI_AVAILABLE and not AUTOGEN_AVAILABLE and not PRAISONAI_AVAILABLE:
363
392
  print("[red]ERROR: No framework is installed. Please install at least one framework:[/red]")
364
393
  print("\npip install \"praisonai\\[crewai]\" # For CrewAI")
365
394
  print("pip install \"praisonai\\[autogen]\" # For AutoGen")
366
395
  print("pip install \"praisonai\\[crewai,autogen]\" # For both frameworks\n")
396
+ print("pip install praisonaiagents # For PraisonAIAgents\n")
367
397
  sys.exit(1)
368
398
 
369
399
  return args
@@ -376,16 +406,8 @@ class PraisonAI:
376
406
  import praisonai
377
407
  os.environ["CHAINLIT_PORT"] = "8084"
378
408
  root_path = os.path.join(os.path.expanduser("~"), ".praison")
379
- os.environ["CHAINLIT_APP_ROOT"] = root_path
380
- public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
381
- if not os.path.exists(os.path.join(root_path, "public")):
382
- if os.path.exists(public_folder):
383
- shutil.copytree(public_folder, os.path.join(root_path, "public"), dirs_exist_ok=True)
384
- logging.info("Public folder copied successfully!")
385
- else:
386
- logging.info("Public folder not found in the package.")
387
- else:
388
- logging.info("Public folder already exists.")
409
+ if "CHAINLIT_APP_ROOT" not in os.environ:
410
+ os.environ["CHAINLIT_APP_ROOT"] = root_path
389
411
  chat_ui_path = os.path.join(os.path.dirname(praisonai.__file__), 'ui', 'chat.py')
390
412
  chainlit_run([chat_ui_path])
391
413
  else:
@@ -399,7 +421,8 @@ class PraisonAI:
399
421
  import praisonai
400
422
  os.environ["CHAINLIT_PORT"] = "8086"
401
423
  root_path = os.path.join(os.path.expanduser("~"), ".praison")
402
- os.environ["CHAINLIT_APP_ROOT"] = root_path
424
+ if "CHAINLIT_APP_ROOT" not in os.environ:
425
+ os.environ["CHAINLIT_APP_ROOT"] = root_path
403
426
  public_folder = os.path.join(os.path.dirname(__file__), 'public')
404
427
  if not os.path.exists(os.path.join(root_path, "public")):
405
428
  if os.path.exists(public_folder):
@@ -468,7 +491,8 @@ class PraisonAI:
468
491
  import praisonai
469
492
  os.environ["CHAINLIT_PORT"] = "8088"
470
493
  root_path = os.path.join(os.path.expanduser("~"), ".praison")
471
- os.environ["CHAINLIT_APP_ROOT"] = root_path
494
+ if "CHAINLIT_APP_ROOT" not in os.environ:
495
+ os.environ["CHAINLIT_APP_ROOT"] = root_path
472
496
  public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
473
497
  if not os.path.exists(os.path.join(root_path, "public")):
474
498
  if os.path.exists(public_folder):
@@ -56,7 +56,7 @@ class CloudDeployer:
56
56
  file.write("FROM python:3.11-slim\n")
57
57
  file.write("WORKDIR /app\n")
58
58
  file.write("COPY . .\n")
59
- file.write("RUN pip install flask praisonai==1.0.0 gunicorn markdown\n")
59
+ file.write("RUN pip install flask praisonai==2.0.1 gunicorn markdown\n")
60
60
  file.write("EXPOSE 8080\n")
61
61
  file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
62
62
 
@@ -0,0 +1,21 @@
1
+ # Changes to DB
2
+
3
+ The following columns are renamed or modified between the first and second versions of the code:
4
+
5
+ | Table Name | Original Column Name | New Column Name |
6
+ |-------------|----------------------------|--------------------|
7
+ | `users` | `metadata` | `meta` |
8
+ | `users` | `created_at` | `createdAt` |
9
+ | `threads` | `metadata` | `meta` |
10
+ | `threads` | `created_at` | `createdAt` |
11
+ | `steps` | `metadata` | `meta` |
12
+ | `steps` | `start_time` | `startTime` |
13
+ | `steps` | `end_time` | `endTime` |
14
+ | `elements` | `metadata` | (Removed) |
15
+
16
+ Key changes:
17
+ 1. The `metadata` column in several tables is renamed to `meta`.
18
+ 2. Timestamps (`created_at`, `start_time`, and `end_time`) are renamed to PascalCase (`createdAt`, `startTime`, and `endTime`).
19
+ 3. Some columns are removed (e.g., `metadata` in `elements`).
20
+
21
+ These changes make the column names consistent and follow a specific naming convention.