PraisonAI 0.0.8__tar.gz → 0.0.10__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.
@@ -0,0 +1,164 @@
1
+ Metadata-Version: 2.1
2
+ Name: praisonAI
3
+ Version: 0.0.10
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
+ Provides-Extra: tools
12
+ Requires-Dist: Flask (>=3.0.0)
13
+ Requires-Dist: crewai (>=0.22.5)
14
+ Requires-Dist: gradio (>=4.20.0)
15
+ Requires-Dist: pyautogen (>=0.2.19)
16
+ Requires-Dist: rich (>=13.7)
17
+ Project-URL: Homepage, https://github.com/mervinpraison/praisonAI
18
+ Project-URL: Repository, https://github.com/mervinpraison/praisonAI
19
+ Description-Content-Type: text/markdown
20
+
21
+ # Praison AI
22
+
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.
24
+
25
+ ## Installation
26
+
27
+ ```bash
28
+ pip install praisonai
29
+ ```
30
+
31
+ ## Initialise
32
+
33
+ ```bash
34
+ praisonai --init create a movie script about dog in moon
35
+ ```
36
+ This will automatically create agents.yaml file in the current directory.
37
+
38
+
39
+ ## Run
40
+
41
+ ```bash
42
+ praisonai
43
+ ```
44
+
45
+ or
46
+
47
+ ```bash
48
+ python -m praisonai
49
+ ```
50
+
51
+ ### Specify the agent framework
52
+
53
+ ```bash
54
+ praisonai --framework autogen
55
+ ```
56
+
57
+ ### Full Automatic Mode
58
+
59
+ ```bash
60
+ praisonai --auto create a movie script about Dog in Moon
61
+ ```
62
+
63
+ ## Test
64
+
65
+ ```bash
66
+ python -m unittest tests.test
67
+ ```
68
+
69
+ ## Agents Playbook
70
+
71
+ ```yaml
72
+ framework: crewai
73
+ topic: Artificial Intelligence
74
+ roles:
75
+ movie_concept_creator:
76
+ backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
77
+ capable of using AI-generated storylines to create unique and compelling movie
78
+ ideas.'
79
+ goal: Generate engaging movie concepts using AI storylines
80
+ role: Movie Concept Creator
81
+ tasks:
82
+ movie_concept_development:
83
+ description: 'Develop movie concepts from AI-generated storylines, ensuring
84
+ they are engaging and have strong narrative arcs.'
85
+ expected_output: 'Well-structured movie concept document with character
86
+ bios, settings, and plot outlines.'
87
+ screenwriter:
88
+ backstory: 'Expert in writing engaging dialogue and script structure, able to
89
+ turn movie concepts into production-ready scripts.'
90
+ goal: Write compelling scripts based on movie concepts
91
+ role: Screenwriter
92
+ tasks:
93
+ scriptwriting_task:
94
+ description: 'Turn movie concepts into polished scripts with well-developed
95
+ characters, strong dialogue, and effective scene transitions.'
96
+ expected_output: 'Production-ready script with a beginning, middle, and
97
+ end, along with character development and engaging dialogues.'
98
+ editor:
99
+ backstory: 'Adept at identifying inconsistencies, improving language usage,
100
+ and maintaining the overall flow of the script.'
101
+ goal: Refine the scripts and ensure continuity of the movie storyline
102
+ role: Editor
103
+ tasks:
104
+ editing_task:
105
+ description: 'Review, edit, and refine the scripts to ensure they are cohesive
106
+ and follow a well-structured narrative.'
107
+ expected_output: 'A polished final draft of the script with no inconsistencies,
108
+ strong character development, and effective dialogue.'
109
+ dependencies: []
110
+ ```
111
+
112
+ ## Include praisonai package in your project
113
+
114
+ ```python
115
+ from praisonai import PraisonAI
116
+
117
+ def basic(): # Basic Mode
118
+ praison_ai = PraisonAI(agent_file="agents.yaml")
119
+ praison_ai.main()
120
+
121
+ def advanced(): # Advanced Mode with options
122
+ praison_ai = PraisonAI(
123
+ agent_file="agents.yaml",
124
+ framework="autogen",
125
+ )
126
+ praison_ai.main()
127
+
128
+ def auto(): # Full Automatic Mode
129
+ praison_ai = PraisonAI(
130
+ auto="Create a movie script about car in mars",
131
+ framework="autogen"
132
+ )
133
+ print(praison_ai.framework)
134
+ praison_ai.main()
135
+
136
+ if __name__ == "__main__":
137
+ basic()
138
+ advanced()
139
+ auto()
140
+ ```
141
+
142
+ ## Deploy
143
+
144
+ ```bash
145
+ gcloud init
146
+ export OPENAI_MODEL_NAME="gpt-4-turbo-preview"
147
+ export OPENAI_API_KEY="Enter your API key"
148
+ export OPENAI_API_BASE="https://api.openai.com/v1"
149
+
150
+ yes | gcloud auth configure-docker us-central1-docker.pkg.dev
151
+ gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
152
+
153
+ PROJECT_ID=$(gcloud config get-value project)
154
+ TAG="latest"
155
+ docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
156
+ docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
157
+ docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
158
+
159
+ gcloud run deploy praisonai-service \
160
+ --image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
161
+ --platform managed \
162
+ --region us-central1 \
163
+ --allow-unauthenticated \
164
+ --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
@@ -0,0 +1,144 @@
1
+ # Praison AI
2
+
3
+ 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.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install praisonai
9
+ ```
10
+
11
+ ## Initialise
12
+
13
+ ```bash
14
+ praisonai --init create a movie script about dog in moon
15
+ ```
16
+ This will automatically create agents.yaml file in the current directory.
17
+
18
+
19
+ ## Run
20
+
21
+ ```bash
22
+ praisonai
23
+ ```
24
+
25
+ or
26
+
27
+ ```bash
28
+ python -m praisonai
29
+ ```
30
+
31
+ ### Specify the agent framework
32
+
33
+ ```bash
34
+ praisonai --framework autogen
35
+ ```
36
+
37
+ ### Full Automatic Mode
38
+
39
+ ```bash
40
+ praisonai --auto create a movie script about Dog in Moon
41
+ ```
42
+
43
+ ## Test
44
+
45
+ ```bash
46
+ python -m unittest tests.test
47
+ ```
48
+
49
+ ## Agents Playbook
50
+
51
+ ```yaml
52
+ framework: crewai
53
+ topic: Artificial Intelligence
54
+ roles:
55
+ movie_concept_creator:
56
+ backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
57
+ capable of using AI-generated storylines to create unique and compelling movie
58
+ ideas.'
59
+ goal: Generate engaging movie concepts using AI storylines
60
+ role: Movie Concept Creator
61
+ tasks:
62
+ movie_concept_development:
63
+ description: 'Develop movie concepts from AI-generated storylines, ensuring
64
+ they are engaging and have strong narrative arcs.'
65
+ expected_output: 'Well-structured movie concept document with character
66
+ bios, settings, and plot outlines.'
67
+ screenwriter:
68
+ backstory: 'Expert in writing engaging dialogue and script structure, able to
69
+ turn movie concepts into production-ready scripts.'
70
+ goal: Write compelling scripts based on movie concepts
71
+ role: Screenwriter
72
+ tasks:
73
+ scriptwriting_task:
74
+ description: 'Turn movie concepts into polished scripts with well-developed
75
+ characters, strong dialogue, and effective scene transitions.'
76
+ expected_output: 'Production-ready script with a beginning, middle, and
77
+ end, along with character development and engaging dialogues.'
78
+ editor:
79
+ backstory: 'Adept at identifying inconsistencies, improving language usage,
80
+ and maintaining the overall flow of the script.'
81
+ goal: Refine the scripts and ensure continuity of the movie storyline
82
+ role: Editor
83
+ tasks:
84
+ editing_task:
85
+ description: 'Review, edit, and refine the scripts to ensure they are cohesive
86
+ and follow a well-structured narrative.'
87
+ expected_output: 'A polished final draft of the script with no inconsistencies,
88
+ strong character development, and effective dialogue.'
89
+ dependencies: []
90
+ ```
91
+
92
+ ## Include praisonai package in your project
93
+
94
+ ```python
95
+ from praisonai import PraisonAI
96
+
97
+ def basic(): # Basic Mode
98
+ praison_ai = PraisonAI(agent_file="agents.yaml")
99
+ praison_ai.main()
100
+
101
+ def advanced(): # Advanced Mode with options
102
+ praison_ai = PraisonAI(
103
+ agent_file="agents.yaml",
104
+ framework="autogen",
105
+ )
106
+ praison_ai.main()
107
+
108
+ def auto(): # Full Automatic Mode
109
+ praison_ai = PraisonAI(
110
+ auto="Create a movie script about car in mars",
111
+ framework="autogen"
112
+ )
113
+ print(praison_ai.framework)
114
+ praison_ai.main()
115
+
116
+ if __name__ == "__main__":
117
+ basic()
118
+ advanced()
119
+ auto()
120
+ ```
121
+
122
+ ## Deploy
123
+
124
+ ```bash
125
+ gcloud init
126
+ export OPENAI_MODEL_NAME="gpt-4-turbo-preview"
127
+ export OPENAI_API_KEY="Enter your API key"
128
+ export OPENAI_API_BASE="https://api.openai.com/v1"
129
+
130
+ yes | gcloud auth configure-docker us-central1-docker.pkg.dev
131
+ gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
132
+
133
+ PROJECT_ID=$(gcloud config get-value project)
134
+ TAG="latest"
135
+ docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
136
+ docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
137
+ docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
138
+
139
+ gcloud run deploy praisonai-service \
140
+ --image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
141
+ --platform managed \
142
+ --region us-central1 \
143
+ --allow-unauthenticated \
144
+ --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
@@ -70,8 +70,6 @@ class AutoGenerator:
70
70
  "roles": {},
71
71
  "dependencies": []
72
72
  }
73
- print(self.topic)
74
- print(self.framework)
75
73
 
76
74
  for role_id, role_details in json_data['roles'].items():
77
75
  yaml_data['roles'][role_id] = {
@@ -131,5 +129,5 @@ The final role you create should satisfy the provided task: """ + self.topic + "
131
129
  return user_content
132
130
 
133
131
 
134
- generator = AutoGenerator(framework="crewai", topic="Create a snake game in python")
135
- print(generator.generate())
132
+ # generator = AutoGenerator(framework="crewai", topic="Create a snake game in python")
133
+ # print(generator.generate())
@@ -13,7 +13,7 @@ import argparse
13
13
  from .auto import AutoGenerator
14
14
 
15
15
  class PraisonAI:
16
- def __init__(self, agent_file="agents.yaml", framework="crewai", auto=False):
16
+ def __init__(self, agent_file="agents.yaml", framework="crewai", auto=False, init=False):
17
17
  self.config_list = [
18
18
  {
19
19
  'model': os.environ.get("OPENAI_MODEL_NAME", "gpt-4-turbo-preview"),
@@ -23,6 +23,7 @@ class PraisonAI:
23
23
  self.agent_file = agent_file
24
24
  self.framework = framework
25
25
  self.auto = auto
26
+ self.init = init
26
27
 
27
28
  def generate_crew_and_kickoff(self):
28
29
  with open(self.agent_file, 'r') as f:
@@ -123,16 +124,24 @@ class PraisonAI:
123
124
  full_path = os.path.abspath(self.agent_file)
124
125
  self.filename = full_path
125
126
 
126
- if args.auto:
127
- self.topic = ' '.join(args.auto)
128
- elif self.auto: # Use the auto attribute if args.auto is not provided
127
+ if args.auto or args.init:
128
+ temp_topic = ' '.join(args.auto) if args.auto else ' '.join(args.init)
129
+ self.topic = temp_topic
130
+ elif self.auto or self.init: # Use the auto attribute if args.auto is not provided
129
131
  self.topic = self.auto
130
132
 
131
133
  if args.auto or self.auto:
134
+ self.filename = "test.yaml"
132
135
  generator = AutoGenerator(topic=self.topic , framework=self.framework)
133
136
  self.agent_file = generator.generate()
134
137
  result = self.generate_crew_and_kickoff()
135
138
  return result
139
+ elif args.init or self.init:
140
+ self.filename = "agents.yaml"
141
+ generator = AutoGenerator(topic=self.topic , framework=self.framework, filename=self.filename)
142
+ self.agent_file = generator.generate()
143
+ print("File {} created successfully".format(self.agent_file))
144
+ return "File {} created successfully".format(self.agent_file)
136
145
 
137
146
  if ui:
138
147
  self.create_gradio_interface()
@@ -145,9 +154,17 @@ class PraisonAI:
145
154
  parser.add_argument("--framework", choices=["crewai", "autogen"], default="crewai", help="Specify the framework")
146
155
  parser.add_argument("--ui", action="store_true", help="Enable UI mode")
147
156
  parser.add_argument("--auto", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
157
+ parser.add_argument("--init", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
148
158
  parser.add_argument("agent_file", nargs="?", help="Specify the agent file")
159
+ parser.add_argument("-b", "--bind", help=argparse.SUPPRESS) # This will catch and ignore -b
160
+
161
+ args = parser.parse_args()
162
+
163
+ # If -b was provided, remove it and its value from args
164
+ if hasattr(args, "bind") and args.bind is not None:
165
+ delattr(args, "bind")
149
166
 
150
- return parser.parse_args()
167
+ return args
151
168
 
152
169
  def create_gradio_interface(self):
153
170
  def generate_crew_and_kickoff_interface(agent_file, framework):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "praisonAI"
3
- version = "0.0.8"
3
+ version = "0.0.10"
4
4
  description = "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
  authors = ["Mervin Praison"]
6
6
  license = ""
@@ -19,6 +19,7 @@ rich = ">=13.7"
19
19
  pyautogen = ">=0.2.19"
20
20
  crewai = ">=0.22.5"
21
21
  gradio = ">=4.20.0"
22
+ Flask = ">=3.0.0"
22
23
 
23
24
  [tool.poetry.dev-dependencies]
24
25
  pytest = "^5.2"
praisonai-0.0.8/PKG-INFO DELETED
@@ -1,40 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: praisonAI
3
- Version: 0.0.8
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
- Provides-Extra: tools
12
- Requires-Dist: crewai (>=0.22.5)
13
- Requires-Dist: gradio (>=4.20.0)
14
- Requires-Dist: pyautogen (>=0.2.19)
15
- Requires-Dist: rich (>=13.7)
16
- Project-URL: Homepage, https://github.com/mervinpraison/praisonAI
17
- Project-URL: Repository, https://github.com/mervinpraison/praisonAI
18
- Description-Content-Type: text/markdown
19
-
20
- # Praison AI
21
-
22
- 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.
23
-
24
- ## Installation
25
-
26
- ```bash
27
- pip install praisonai
28
- ```
29
-
30
- ## Run
31
-
32
- ```bash
33
- praisonai
34
- ```
35
-
36
- ## Test
37
-
38
- ```bash
39
- python -m unittest tests.test
40
- ```
praisonai-0.0.8/README.md DELETED
@@ -1,21 +0,0 @@
1
- # Praison AI
2
-
3
- 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.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pip install praisonai
9
- ```
10
-
11
- ## Run
12
-
13
- ```bash
14
- praisonai
15
- ```
16
-
17
- ## Test
18
-
19
- ```bash
20
- python -m unittest tests.test
21
- ```
File without changes