PraisonAI 0.0.1__py3-none-any.whl → 0.0.23__py3-none-any.whl
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.
- praisonai/__init__.py +2 -0
- praisonai/__main__.py +10 -0
- praisonai/agents_generator.py +272 -0
- praisonai/auto.py +186 -0
- praisonai/chainlit_ui.py +59 -0
- praisonai/cli.py +221 -0
- praisonai/deploy.py +138 -0
- praisonai/inbuilt_tools/__init__.py +2 -0
- praisonai/inbuilt_tools/autogen_tools.py +203 -0
- {praisonAI → praisonai}/test.py +12 -1
- praisonai-0.0.23.dist-info/LICENSE +20 -0
- praisonai-0.0.23.dist-info/METADATA +314 -0
- praisonai-0.0.23.dist-info/RECORD +16 -0
- {praisonAI-0.0.1.dist-info → praisonai-0.0.23.dist-info}/WHEEL +1 -2
- praisonai-0.0.23.dist-info/entry_points.txt +3 -0
- praisonAI/__init__.py +0 -1
- praisonAI/__main__.py +0 -4
- praisonAI/cli.py +0 -114
- praisonAI-0.0.1.dist-info/METADATA +0 -22
- praisonAI-0.0.1.dist-info/RECORD +0 -9
- praisonAI-0.0.1.dist-info/top_level.txt +0 -1
- {praisonAI → praisonai}/version.py +0 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: PraisonAI
|
|
3
|
+
Version: 0.0.23
|
|
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
|
+
Author: Mervin Praison
|
|
6
|
+
Requires-Python: >=3.10,<3.13
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Requires-Dist: Flask (>=3.0.0)
|
|
12
|
+
Requires-Dist: crewai (>=0.30.4)
|
|
13
|
+
Requires-Dist: crewai-tools (>=0.2.6,<0.3.0)
|
|
14
|
+
Requires-Dist: gradio (>=4.26.0)
|
|
15
|
+
Requires-Dist: markdown (>=3.5)
|
|
16
|
+
Requires-Dist: praisonai-tools (>=0.0.4)
|
|
17
|
+
Requires-Dist: pyautogen (>=0.2.19)
|
|
18
|
+
Requires-Dist: rich (>=13.7)
|
|
19
|
+
Project-URL: Homepage, https://docs.praison.ai
|
|
20
|
+
Project-URL: Repository, https://github.com/mervinpraison/PraisonAI
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# Praison AI
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
## TL;DR
|
|
28
|
+
```bash
|
|
29
|
+
pip install praisonai
|
|
30
|
+
export OPENAI_API_KEY="Enter your API key"
|
|
31
|
+
praisonai --init create a movie script about dog in moon
|
|
32
|
+
praisonai
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install praisonai
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Initialise
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
export OPENAI_API_KEY="Enter your API key"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Generate your OPENAI API KEY from here: https://platform.openai.com/api-keys
|
|
48
|
+
|
|
49
|
+
Note: You can use other providers such as Ollama, Mistral ... etc. Details are provided at the bottom.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
praisonai --init create a movie script about dog in moon
|
|
53
|
+
```
|
|
54
|
+
This will automatically create agents.yaml file in the current directory.
|
|
55
|
+
|
|
56
|
+
### To initialse with a specific agent framework (Optional):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
praisonai --framework autogen --init create movie script about cat in mars
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Run
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
praisonai
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
or
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
python -m praisonai
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Specify the agent framework (Optional):
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
praisonai --framework autogen
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Full Automatic Mode
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
praisonai --auto create a movie script about Dog in Moon
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Create Custom Tools
|
|
87
|
+
|
|
88
|
+
### TL;DR to Create a Custom Tool
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install praisonai duckduckgo-search
|
|
92
|
+
export OPENAI_API_KEY="Enter your API key"
|
|
93
|
+
praisonai --init research about the latest AI News and prepare a detailed report
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
- Add `- InternetSearchTool` in the agents.yaml file in the tools section.
|
|
97
|
+
- Create a file called tools.py and add this code [tools.py](./tools.py)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
praisonai
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Pre-requisite to Create a Custom Tool
|
|
104
|
+
`agents.yaml` file should be present in the current directory.
|
|
105
|
+
|
|
106
|
+
If it doesn't exist, create it by running the command `praisonai --init research about the latest AI News and prepare a detailed report`.
|
|
107
|
+
|
|
108
|
+
### Step 1 to Create a Custom Tool
|
|
109
|
+
|
|
110
|
+
Create a file called tools.py in the same directory as the agents.yaml file.
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
# example tools.py
|
|
114
|
+
from duckduckgo_search import DDGS
|
|
115
|
+
from praisonai_tools import BaseTool
|
|
116
|
+
|
|
117
|
+
class InternetSearchTool(BaseTool):
|
|
118
|
+
name: str = "InternetSearchTool"
|
|
119
|
+
description: str = "Search Internet for relevant information based on a query or latest news"
|
|
120
|
+
|
|
121
|
+
def _run(self, query: str):
|
|
122
|
+
ddgs = DDGS()
|
|
123
|
+
results = ddgs.text(keywords=query, region='wt-wt', safesearch='moderate', max_results=5)
|
|
124
|
+
return results
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Step 2 to Create a Custom Tool
|
|
128
|
+
|
|
129
|
+
Add the tool to the agents.yaml file as show below under the tools section `- InternetSearchTool`.
|
|
130
|
+
|
|
131
|
+
```yaml
|
|
132
|
+
framework: crewai
|
|
133
|
+
topic: research about the latest AI News and prepare a detailed report
|
|
134
|
+
roles:
|
|
135
|
+
research_analyst:
|
|
136
|
+
backstory: Experienced in gathering and analyzing data related to AI news trends.
|
|
137
|
+
goal: Analyze AI News trends
|
|
138
|
+
role: Research Analyst
|
|
139
|
+
tasks:
|
|
140
|
+
gather_data:
|
|
141
|
+
description: Conduct in-depth research on the latest AI News trends from reputable
|
|
142
|
+
sources.
|
|
143
|
+
expected_output: Comprehensive report on current AI News trends.
|
|
144
|
+
tools:
|
|
145
|
+
- InternetSearchTool
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Test
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
python -m unittest tests.test
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Agents Playbook
|
|
155
|
+
|
|
156
|
+
### Simple Playbook Example
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
framework: crewai
|
|
160
|
+
topic: Artificial Intelligence
|
|
161
|
+
roles:
|
|
162
|
+
screenwriter:
|
|
163
|
+
backstory: 'Skilled in crafting scripts with engaging dialogue about {topic}.'
|
|
164
|
+
goal: Create scripts from concepts.
|
|
165
|
+
role: Screenwriter
|
|
166
|
+
tasks:
|
|
167
|
+
scriptwriting_task:
|
|
168
|
+
description: 'Develop scripts with compelling characters and dialogue about {topic}.'
|
|
169
|
+
expected_output: 'Complete script ready for production.'
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Detailed Playbook Example
|
|
173
|
+
|
|
174
|
+
```yaml
|
|
175
|
+
framework: crewai
|
|
176
|
+
topic: Artificial Intelligence
|
|
177
|
+
roles:
|
|
178
|
+
movie_concept_creator:
|
|
179
|
+
backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
|
|
180
|
+
capable of using AI-generated storylines to create unique and compelling movie
|
|
181
|
+
ideas.'
|
|
182
|
+
goal: Generate engaging movie concepts using AI storylines
|
|
183
|
+
role: Movie Concept Creator
|
|
184
|
+
tasks:
|
|
185
|
+
movie_concept_development:
|
|
186
|
+
description: 'Develop movie concepts from AI-generated storylines, ensuring
|
|
187
|
+
they are engaging and have strong narrative arcs.'
|
|
188
|
+
expected_output: 'Well-structured movie concept document with character
|
|
189
|
+
bios, settings, and plot outlines.'
|
|
190
|
+
screenwriter:
|
|
191
|
+
backstory: 'Expert in writing engaging dialogue and script structure, able to
|
|
192
|
+
turn movie concepts into production-ready scripts.'
|
|
193
|
+
goal: Write compelling scripts based on movie concepts
|
|
194
|
+
role: Screenwriter
|
|
195
|
+
tasks:
|
|
196
|
+
scriptwriting_task:
|
|
197
|
+
description: 'Turn movie concepts into polished scripts with well-developed
|
|
198
|
+
characters, strong dialogue, and effective scene transitions.'
|
|
199
|
+
expected_output: 'Production-ready script with a beginning, middle, and
|
|
200
|
+
end, along with character development and engaging dialogues.'
|
|
201
|
+
editor:
|
|
202
|
+
backstory: 'Adept at identifying inconsistencies, improving language usage,
|
|
203
|
+
and maintaining the overall flow of the script.'
|
|
204
|
+
goal: Refine the scripts and ensure continuity of the movie storyline
|
|
205
|
+
role: Editor
|
|
206
|
+
tasks:
|
|
207
|
+
editing_task:
|
|
208
|
+
description: 'Review, edit, and refine the scripts to ensure they are cohesive
|
|
209
|
+
and follow a well-structured narrative.'
|
|
210
|
+
expected_output: 'A polished final draft of the script with no inconsistencies,
|
|
211
|
+
strong character development, and effective dialogue.'
|
|
212
|
+
dependencies: []
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Include praisonai package in your project
|
|
216
|
+
|
|
217
|
+
```python
|
|
218
|
+
from praisonai import PraisonAI
|
|
219
|
+
|
|
220
|
+
def basic(): # Basic Mode
|
|
221
|
+
praison_ai = PraisonAI(agent_file="agents.yaml")
|
|
222
|
+
praison_ai.main()
|
|
223
|
+
|
|
224
|
+
def advanced(): # Advanced Mode with options
|
|
225
|
+
praison_ai = PraisonAI(
|
|
226
|
+
agent_file="agents.yaml",
|
|
227
|
+
framework="autogen",
|
|
228
|
+
)
|
|
229
|
+
praison_ai.main()
|
|
230
|
+
|
|
231
|
+
def auto(): # Full Automatic Mode
|
|
232
|
+
praison_ai = PraisonAI(
|
|
233
|
+
auto="Create a movie script about car in mars",
|
|
234
|
+
framework="autogen"
|
|
235
|
+
)
|
|
236
|
+
print(praison_ai.framework)
|
|
237
|
+
praison_ai.main()
|
|
238
|
+
|
|
239
|
+
if __name__ == "__main__":
|
|
240
|
+
basic()
|
|
241
|
+
advanced()
|
|
242
|
+
auto()
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## Include CrewAI Tools
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
pip install "praisonai[crewai-tools]"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Deploy
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
gcloud init
|
|
255
|
+
gcloud services enable run.googleapis.com
|
|
256
|
+
gcloud services enable containerregistry.googleapis.com
|
|
257
|
+
gcloud services enable cloudbuild.googleapis.com
|
|
258
|
+
|
|
259
|
+
export OPENAI_MODEL_NAME="gpt-4o"
|
|
260
|
+
export OPENAI_API_KEY="Enter your API key"
|
|
261
|
+
export OPENAI_API_BASE="https://api.openai.com/v1"
|
|
262
|
+
|
|
263
|
+
yes | gcloud auth configure-docker us-central1-docker.pkg.dev
|
|
264
|
+
gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
|
|
265
|
+
|
|
266
|
+
PROJECT_ID=$(gcloud config get-value project)
|
|
267
|
+
TAG="latest"
|
|
268
|
+
docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
|
|
269
|
+
docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
|
|
270
|
+
docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
|
|
271
|
+
|
|
272
|
+
gcloud run deploy praisonai-service \
|
|
273
|
+
--image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
|
|
274
|
+
--platform managed \
|
|
275
|
+
--region us-central1 \
|
|
276
|
+
--allow-unauthenticated \
|
|
277
|
+
--set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Other Models
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
Ollama
|
|
284
|
+
OPENAI_API_BASE='http://localhost:11434/v1'
|
|
285
|
+
OPENAI_MODEL_NAME='mistral'
|
|
286
|
+
OPENAI_API_KEY='NA'
|
|
287
|
+
|
|
288
|
+
FastChat¶
|
|
289
|
+
OPENAI_API_BASE="http://localhost:8001/v1"
|
|
290
|
+
OPENAI_MODEL_NAME='oh-2.5m7b-q51'
|
|
291
|
+
OPENAI_API_KEY=NA
|
|
292
|
+
|
|
293
|
+
LM Studio¶
|
|
294
|
+
OPENAI_API_BASE="http://localhost:8000/v1"
|
|
295
|
+
OPENAI_MODEL_NAME=NA
|
|
296
|
+
OPENAI_API_KEY=NA
|
|
297
|
+
|
|
298
|
+
Mistral API¶
|
|
299
|
+
OPENAI_API_BASE=https://api.mistral.ai/v1
|
|
300
|
+
OPENAI_MODEL_NAME="mistral-small"
|
|
301
|
+
OPENAI_API_KEY=your-mistral-api-key
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## Contributing
|
|
305
|
+
|
|
306
|
+
- Fork on GitHub: Use the "Fork" button on the repository page.
|
|
307
|
+
- Clone your fork: `git clone https://github.com/yourusername/praisonAI.git`
|
|
308
|
+
- Create a branch: `git checkout -b new-feature`
|
|
309
|
+
- Make changes and commit: `git commit -am "Add some feature"`
|
|
310
|
+
- Push to your fork: `git push origin new-feature`
|
|
311
|
+
- Submit a pull request via GitHub's web interface.
|
|
312
|
+
- Await feedback from project maintainers.
|
|
313
|
+
|
|
314
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
praisonai/__init__.py,sha256=5SwxMGd4vNUmYedF_HLLQBo4u8zMEWuEfKhHqJrEE1I,59
|
|
2
|
+
praisonai/__main__.py,sha256=MVgsjMThjBexHt4nhd760JCqvP4x0IQcwo8kULOK4FQ,144
|
|
3
|
+
praisonai/agents_generator.py,sha256=OXrSzl6thcjgKc7bLzir0nksMPrpL3fMsF7hYYl4XM8,12807
|
|
4
|
+
praisonai/auto.py,sha256=evK0RxnR89e-HBTZD0fyJSD_m9k6rNj1Cmdn7dZKZ7A,7378
|
|
5
|
+
praisonai/chainlit_ui.py,sha256=luw3-Zvq1pWmvOb0e2kDsQ_Rd-SaF7bptkD4uzZajYE,2292
|
|
6
|
+
praisonai/cli.py,sha256=hXLZB8C_Bvrcd0QOD99tpU4ZiE0yICw_HiLDiLadStA,9206
|
|
7
|
+
praisonai/deploy.py,sha256=n9XLTmAt4MRRKiljEQKL8K9NmIKwli0rgdXvXfMG2YA,6031
|
|
8
|
+
praisonai/inbuilt_tools/__init__.py,sha256=mUKnbL6Gram9c9f2m8wJwEzURBLmPEOcHzwySBH89YA,74
|
|
9
|
+
praisonai/inbuilt_tools/autogen_tools.py,sha256=m3Ws2444hzgkiEjqw9Y4PFb_LsU9ZDD23C03uNsyeu0,14556
|
|
10
|
+
praisonai/test.py,sha256=DkS_z3w7TmXt9lc57ToYQzdKN2IkWqXEMDBYUmZiGNk,4040
|
|
11
|
+
praisonai/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
12
|
+
praisonai-0.0.23.dist-info/LICENSE,sha256=kqvFysVlnFxYOu0HxCe2HlmZmJtdmNGOxWRRkT9TsWc,1035
|
|
13
|
+
praisonai-0.0.23.dist-info/METADATA,sha256=yPdZmBNjYqd5MunyFaWIhSa8C90ItqQN2B2qFp28f0M,9398
|
|
14
|
+
praisonai-0.0.23.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
15
|
+
praisonai-0.0.23.dist-info/entry_points.txt,sha256=Qg41eW3A1-dvdV5tF7LqChfYof8Rihk2rN1fiEE3vnk,53
|
|
16
|
+
praisonai-0.0.23.dist-info/RECORD,,
|
praisonAI/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .version import __version__
|
praisonAI/__main__.py
DELETED
praisonAI/cli.py
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from .version import __version__
|
|
3
|
-
import yaml, os
|
|
4
|
-
from rich import print
|
|
5
|
-
from dotenv import load_dotenv
|
|
6
|
-
from crewai import Agent, Task, Crew
|
|
7
|
-
load_dotenv()
|
|
8
|
-
import autogen
|
|
9
|
-
config_list = [
|
|
10
|
-
{
|
|
11
|
-
'model': os.environ.get("OPENAI_MODEL_NAME", "gpt-3.5-turbo"),
|
|
12
|
-
'base_url': os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1"),
|
|
13
|
-
}
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
def generate_crew_and_kickoff(agent_file, framework=None):
|
|
17
|
-
with open(agent_file, 'r') as f:
|
|
18
|
-
config = yaml.safe_load(f)
|
|
19
|
-
|
|
20
|
-
topic = config['topic']
|
|
21
|
-
framework = framework or config.get('framework')
|
|
22
|
-
|
|
23
|
-
agents = {}
|
|
24
|
-
tasks = []
|
|
25
|
-
if framework == "autogen":
|
|
26
|
-
# Load the LLM configuration dynamically
|
|
27
|
-
print(config_list)
|
|
28
|
-
llm_config = {"config_list": config_list}
|
|
29
|
-
|
|
30
|
-
for role, details in config['roles'].items():
|
|
31
|
-
agent_name = details['role'].format(topic=topic).replace("{topic}", topic)
|
|
32
|
-
agent_goal = details['goal'].format(topic=topic)
|
|
33
|
-
# Creating an AssistantAgent for each role dynamically
|
|
34
|
-
agents[role] = autogen.AssistantAgent(
|
|
35
|
-
name=agent_name,
|
|
36
|
-
llm_config=llm_config,
|
|
37
|
-
system_message=details['backstory'].format(topic=topic)+". Reply \"TERMINATE\" in the end when everything is done.",
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
# Preparing tasks for initiate_chats
|
|
41
|
-
for task_name, task_details in details.get('tasks', {}).items():
|
|
42
|
-
description_filled = task_details['description'].format(topic=topic)
|
|
43
|
-
expected_output_filled = task_details['expected_output'].format(topic=topic)
|
|
44
|
-
|
|
45
|
-
chat_task = {
|
|
46
|
-
"recipient": agents[role],
|
|
47
|
-
"message": description_filled,
|
|
48
|
-
"summary_method": "last_msg", # Customize as needed
|
|
49
|
-
# Additional fields like carryover can be added based on dependencies
|
|
50
|
-
}
|
|
51
|
-
tasks.append(chat_task)
|
|
52
|
-
|
|
53
|
-
# Assuming the user proxy agent is set up as per your requirements
|
|
54
|
-
user = autogen.UserProxyAgent(
|
|
55
|
-
name="User",
|
|
56
|
-
human_input_mode="NEVER",
|
|
57
|
-
is_termination_msg=lambda x: (x.get("content") or "").rstrip().endswith("TERMINATE"),
|
|
58
|
-
code_execution_config={
|
|
59
|
-
"work_dir": "coding",
|
|
60
|
-
"use_docker": False,
|
|
61
|
-
},
|
|
62
|
-
# additional setup for the user proxy agent
|
|
63
|
-
)
|
|
64
|
-
response = user.initiate_chats(tasks)
|
|
65
|
-
result = "### Output ###\n"+response[-1].summary if hasattr(response[-1], 'summary') else ""
|
|
66
|
-
else:
|
|
67
|
-
for role, details in config['roles'].items():
|
|
68
|
-
role_filled = details['role'].format(topic=topic)
|
|
69
|
-
goal_filled = details['goal'].format(topic=topic)
|
|
70
|
-
backstory_filled = details['backstory'].format(topic=topic)
|
|
71
|
-
|
|
72
|
-
# Assume tools are loaded and handled here as per your requirements
|
|
73
|
-
agent = Agent(role=role_filled, goal=goal_filled, backstory=backstory_filled)
|
|
74
|
-
agents[role] = agent
|
|
75
|
-
|
|
76
|
-
for task_name, task_details in details.get('tasks', {}).items():
|
|
77
|
-
description_filled = task_details['description'].format(topic=topic)
|
|
78
|
-
expected_output_filled = task_details['expected_output'].format(topic=topic)
|
|
79
|
-
|
|
80
|
-
task = Task(description=description_filled, expected_output=expected_output_filled, agent=agent)
|
|
81
|
-
tasks.append(task)
|
|
82
|
-
|
|
83
|
-
crew = Crew(
|
|
84
|
-
agents=list(agents.values()),
|
|
85
|
-
tasks=tasks,
|
|
86
|
-
verbose=2
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
result = crew.kickoff()
|
|
90
|
-
return result
|
|
91
|
-
|
|
92
|
-
def main(args=None):
|
|
93
|
-
if args is None:
|
|
94
|
-
args = sys.argv[1:] # Skip the script name
|
|
95
|
-
|
|
96
|
-
invocation_cmd = "praisonai"
|
|
97
|
-
version_string = f"PraisonAI version {__version__}"
|
|
98
|
-
framework = "crewai" # Default framework
|
|
99
|
-
|
|
100
|
-
if "--framework" in args:
|
|
101
|
-
framework_index = args.index("--framework")
|
|
102
|
-
framework = args[framework_index + 1]
|
|
103
|
-
args = args[:framework_index] + args[framework_index + 2:]
|
|
104
|
-
|
|
105
|
-
if args:
|
|
106
|
-
agent_file = args[-1] # Assuming the last argument is the agent file
|
|
107
|
-
else:
|
|
108
|
-
agent_file = "agents.yaml"
|
|
109
|
-
|
|
110
|
-
result = generate_crew_and_kickoff(agent_file, framework)
|
|
111
|
-
print(result)
|
|
112
|
-
|
|
113
|
-
if __name__ == "__main__":
|
|
114
|
-
main()
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: praisonAI
|
|
3
|
-
Version: 0.0.1
|
|
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
|
-
Author: Mervin Praison
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
|
|
8
|
-
# Praison AI
|
|
9
|
-
|
|
10
|
-
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.
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
pip install praisonai
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Run
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
praisonai
|
|
22
|
-
```
|
praisonAI-0.0.1.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
praisonAI/__init__.py,sha256=8zLGg-DfQhnDl2Ky0n-zXpN-8e-g7iR0AcaI4l4Vvpk,32
|
|
2
|
-
praisonAI/__main__.py,sha256=0g3iknXOS9gZUcpL_trgAcuCJnZZKjdsT_xt61WOVb4,60
|
|
3
|
-
praisonAI/cli.py,sha256=OQYvURs2HCxoUruhAhkolqSAnx7kXxaeg2XzUPZMwIw,4345
|
|
4
|
-
praisonAI/test.py,sha256=4bAqitWeywjZtxoOAdcBTLaYDRflZH3LSYtOpWrZBI4,3707
|
|
5
|
-
praisonAI/version.py,sha256=ugyuFliEqtAwQmH4sTlc16YXKYbFWDmfyk87fErB8-8,21
|
|
6
|
-
praisonAI-0.0.1.dist-info/METADATA,sha256=nHYm4Z2hEsqYeEDZs5N8_UfCTIip9Bj4adIiGIGhto4,747
|
|
7
|
-
praisonAI-0.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
8
|
-
praisonAI-0.0.1.dist-info/top_level.txt,sha256=7tEg2pqQqKr4CaCDaFHktvbpEswYcW-pHXGrAwY-6qk,10
|
|
9
|
-
praisonAI-0.0.1.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
praisonAI
|
|
File without changes
|