PraisonAI 2.2.98__tar.gz → 2.2.99__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 (59) hide show
  1. praisonai-2.2.99/PKG-INFO +902 -0
  2. praisonai-2.2.99/PraisonAI.egg-info/PKG-INFO +902 -0
  3. praisonai-2.2.99/README.md +805 -0
  4. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/deploy.py +1 -1
  5. praisonai-2.2.99/praisonai/version.py +1 -0
  6. praisonai-2.2.98/PKG-INFO +0 -131
  7. praisonai-2.2.98/PraisonAI.egg-info/PKG-INFO +0 -131
  8. praisonai-2.2.98/README.md +0 -34
  9. praisonai-2.2.98/praisonai/version.py +0 -1
  10. {praisonai-2.2.98 → praisonai-2.2.99}/PraisonAI.egg-info/SOURCES.txt +0 -0
  11. {praisonai-2.2.98 → praisonai-2.2.99}/PraisonAI.egg-info/dependency_links.txt +0 -0
  12. {praisonai-2.2.98 → praisonai-2.2.99}/PraisonAI.egg-info/entry_points.txt +0 -0
  13. {praisonai-2.2.98 → praisonai-2.2.99}/PraisonAI.egg-info/requires.txt +0 -0
  14. {praisonai-2.2.98 → praisonai-2.2.99}/PraisonAI.egg-info/top_level.txt +0 -0
  15. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/__init__.py +0 -0
  16. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/__main__.py +0 -0
  17. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/agents_generator.py +0 -0
  18. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/api/call.py +0 -0
  19. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/auto.py +0 -0
  20. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/chainlit_ui.py +0 -0
  21. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/cli.py +0 -0
  22. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/inbuilt_tools/__init__.py +0 -0
  23. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
  24. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/inc/__init__.py +0 -0
  25. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/inc/config.py +0 -0
  26. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/inc/models.py +0 -0
  27. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/scheduler.py +0 -0
  28. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/setup/__init__.py +0 -0
  29. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/setup/build.py +0 -0
  30. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/setup/post_install.py +0 -0
  31. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/setup/setup_conda_env.py +0 -0
  32. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/setup.py +0 -0
  33. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/test.py +0 -0
  34. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/train.py +0 -0
  35. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/train_vision.py +0 -0
  36. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/agents.py +0 -0
  37. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/callbacks.py +0 -0
  38. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/chat.py +0 -0
  39. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/code.py +0 -0
  40. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/colab.py +0 -0
  41. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/colab_chainlit.py +0 -0
  42. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/components/aicoder.py +0 -0
  43. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/context.py +0 -0
  44. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/database_config.py +0 -0
  45. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/db.py +0 -0
  46. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/realtime.py +0 -0
  47. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/realtimeclient/__init__.py +0 -0
  48. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/realtimeclient/tools.py +0 -0
  49. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/ui/sql_alchemy.py +0 -0
  50. {praisonai-2.2.98 → praisonai-2.2.99}/praisonai/upload_vision.py +0 -0
  51. {praisonai-2.2.98 → praisonai-2.2.99}/pyproject.toml +0 -0
  52. {praisonai-2.2.98 → praisonai-2.2.99}/setup.cfg +0 -0
  53. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test.py +0 -0
  54. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test_agents_playbook.py +0 -0
  55. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test_basic.py +0 -0
  56. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test_custom_tools_fix.py +0 -0
  57. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test_double_api_fix.py +0 -0
  58. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test_phase2_refactor.py +0 -0
  59. {praisonai-2.2.98 → praisonai-2.2.99}/tests/test_runner.py +0 -0
@@ -0,0 +1,902 @@
1
+ Metadata-Version: 2.4
2
+ Name: PraisonAI
3
+ Version: 2.2.99
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
+ Author: Mervin Praison
6
+ License: MIT
7
+ Project-URL: Homepage, https://docs.praison.ai
8
+ Project-URL: Repository, https://github.com/mervinpraison/PraisonAI
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: rich>=13.7
12
+ Requires-Dist: markdown>=3.5
13
+ Requires-Dist: pyparsing>=3.0.0
14
+ Requires-Dist: praisonaiagents>=0.0.169
15
+ Requires-Dist: python-dotenv>=0.19.0
16
+ Requires-Dist: instructor>=1.3.3
17
+ Requires-Dist: PyYAML>=6.0
18
+ Requires-Dist: mcp>=1.6.0
19
+ Provides-Extra: ui
20
+ Requires-Dist: chainlit==2.5.5; extra == "ui"
21
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "ui"
22
+ Requires-Dist: aiosqlite>=0.20.0; extra == "ui"
23
+ Requires-Dist: greenlet>=3.0.3; extra == "ui"
24
+ Requires-Dist: pydantic<=2.10.1; extra == "ui"
25
+ Provides-Extra: gradio
26
+ Requires-Dist: gradio>=4.26.0; extra == "gradio"
27
+ Provides-Extra: api
28
+ Requires-Dist: flask>=3.0.0; extra == "api"
29
+ Requires-Dist: fastapi>=0.115.0; extra == "api"
30
+ Requires-Dist: uvicorn>=0.34.0; extra == "api"
31
+ Provides-Extra: agentops
32
+ Requires-Dist: agentops>=0.3.12; extra == "agentops"
33
+ Provides-Extra: google
34
+ Requires-Dist: langchain-google-genai>=2.1.0; extra == "google"
35
+ Provides-Extra: openai
36
+ Requires-Dist: langchain-openai<0.3.0,>=0.2.1; extra == "openai"
37
+ Provides-Extra: anthropic
38
+ Requires-Dist: langchain-anthropic>=0.3.0; extra == "anthropic"
39
+ Provides-Extra: cohere
40
+ Requires-Dist: langchain-cohere<0.4.0,>=0.3.0; extra == "cohere"
41
+ Provides-Extra: chat
42
+ Requires-Dist: chainlit==2.5.5; extra == "chat"
43
+ Requires-Dist: litellm>=1.72.6; extra == "chat"
44
+ Requires-Dist: aiosqlite>=0.20.0; extra == "chat"
45
+ Requires-Dist: greenlet>=3.0.3; extra == "chat"
46
+ Requires-Dist: tavily-python==0.5.0; extra == "chat"
47
+ Requires-Dist: crawl4ai>=0.7.0; extra == "chat"
48
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "chat"
49
+ Requires-Dist: playwright>=1.47.0; extra == "chat"
50
+ Requires-Dist: rich; extra == "chat"
51
+ Requires-Dist: pydantic<=2.10.1; extra == "chat"
52
+ Provides-Extra: code
53
+ Requires-Dist: chainlit==2.5.5; extra == "code"
54
+ Requires-Dist: litellm>=1.72.6; extra == "code"
55
+ Requires-Dist: aiosqlite>=0.20.0; extra == "code"
56
+ Requires-Dist: greenlet>=3.0.3; extra == "code"
57
+ Requires-Dist: tavily-python==0.5.0; extra == "code"
58
+ Requires-Dist: crawl4ai>=0.7.0; extra == "code"
59
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "code"
60
+ Requires-Dist: playwright>=1.47.0; extra == "code"
61
+ Requires-Dist: pydantic<=2.10.1; extra == "code"
62
+ Provides-Extra: realtime
63
+ Requires-Dist: chainlit==2.5.5; extra == "realtime"
64
+ Requires-Dist: litellm>=1.72.6; extra == "realtime"
65
+ Requires-Dist: aiosqlite>=0.20.0; extra == "realtime"
66
+ Requires-Dist: greenlet>=3.0.3; extra == "realtime"
67
+ Requires-Dist: tavily-python==0.5.0; extra == "realtime"
68
+ Requires-Dist: crawl4ai>=0.7.0; extra == "realtime"
69
+ Requires-Dist: websockets>=12.0; extra == "realtime"
70
+ Requires-Dist: plotly>=5.24.0; extra == "realtime"
71
+ Requires-Dist: yfinance>=0.2.44; extra == "realtime"
72
+ Requires-Dist: duckduckgo_search>=6.3.0; extra == "realtime"
73
+ Requires-Dist: sqlalchemy>=2.0.36; extra == "realtime"
74
+ Provides-Extra: call
75
+ Requires-Dist: twilio>=7.0.0; extra == "call"
76
+ Requires-Dist: fastapi>=0.95.0; extra == "call"
77
+ Requires-Dist: uvicorn>=0.20.0; extra == "call"
78
+ Requires-Dist: websockets>=12.0; extra == "call"
79
+ Requires-Dist: flaml[automl]>=2.3.1; extra == "call"
80
+ Requires-Dist: pyngrok>=1.4.0; extra == "call"
81
+ Requires-Dist: rich; extra == "call"
82
+ Requires-Dist: openai>=1.54.0; extra == "call"
83
+ Provides-Extra: train
84
+ Provides-Extra: crewai
85
+ Requires-Dist: crewai>=0.157.0; extra == "crewai"
86
+ Requires-Dist: praisonai-tools>=0.0.22; extra == "crewai"
87
+ Provides-Extra: autogen
88
+ Requires-Dist: pyautogen==0.2.29; extra == "autogen"
89
+ Requires-Dist: praisonai-tools>=0.0.22; extra == "autogen"
90
+ Requires-Dist: crewai; extra == "autogen"
91
+ Provides-Extra: autogen-v4
92
+ Requires-Dist: autogen-agentchat>=0.4.0; extra == "autogen-v4"
93
+ Requires-Dist: autogen-ext[openai]>=0.4.0; extra == "autogen-v4"
94
+ Requires-Dist: autogen-core>=0.4.0; extra == "autogen-v4"
95
+ Requires-Dist: praisonai-tools>=0.0.22; extra == "autogen-v4"
96
+ Requires-Dist: crewai; extra == "autogen-v4"
97
+
98
+ <p align="center">
99
+ <picture>
100
+ <source media="(prefers-color-scheme: dark)" srcset="docs/logo/dark.png" />
101
+ <source media="(prefers-color-scheme: light)" srcset="docs/logo/light.png" />
102
+ <img alt="PraisonAI Logo" src="docs/logo/light.png" />
103
+ </picture>
104
+ </p>
105
+
106
+ <p align="center">
107
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://static.pepy.tech/badge/PraisonAI" alt="Total Downloads" /></a>
108
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/github/v/release/MervinPraison/PraisonAI" alt="Latest Stable Version" /></a>
109
+ <a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License" /></a>
110
+ </p>
111
+
112
+ <div align="center">
113
+
114
+ # Praison AI
115
+
116
+ <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>
117
+
118
+ </div>
119
+
120
+ PraisonAI is a production-ready Multi-AI Agents framework with self-reflection, designed to create AI Agents to automate and solve problems ranging from simple tasks to complex challenges. By integrating PraisonAI Agents, AG2 (Formerly AutoGen), and CrewAI into a low-code solution, it streamlines the building and management of multi-agent LLM systems, emphasising simplicity, customisation, and effective human-agent collaboration.
121
+
122
+ <div align="center">
123
+ <a href="https://docs.praison.ai">
124
+ <p align="center">
125
+ <img src="https://img.shields.io/badge/📚_Documentation-Visit_docs.praison.ai-blue?style=for-the-badge&logo=bookstack&logoColor=white" alt="Documentation" />
126
+ </p>
127
+ </a>
128
+ </div>
129
+
130
+ ## Key Features
131
+
132
+ - 🤖 Automated AI Agents Creation
133
+ - 🔄 Self Reflection AI Agents
134
+ - 🧠 Reasoning AI Agents
135
+ - 👁️ Multi Modal AI Agents
136
+ - 🤝 Multi Agent Collaboration
137
+ - 🎭 AI Agent Workflow
138
+ - 📚 Add Custom Knowledge
139
+ - 🧠 Agents with Short and Long Term Memory
140
+ - 📄 Chat with PDF Agents
141
+ - 💻 Code Interpreter Agents
142
+ - 📚 RAG Agents
143
+ - 🤔 Async & Parallel Processing
144
+ - 🔄 Auto Agents
145
+ - 🔢 Math Agents
146
+ - 🎯 Structured Output Agents
147
+ - 🔗 LangChain Integrated Agents
148
+ - 📞 Callback Agents
149
+ - 🤏 Mini AI Agents
150
+ - 🛠️ 100+ Custom Tools
151
+ - 📄 YAML Configuration
152
+ - 💯 100+ LLM Support
153
+ - 🔬 **Deep Research Agents** (OpenAI & Gemini)
154
+ - 🔄 **Query Rewriter Agent** (HyDE, Step-back, Multi-query)
155
+
156
+ ## Using Python Code
157
+
158
+ Light weight package dedicated for coding:
159
+ ```bash
160
+ pip install praisonaiagents
161
+ ```
162
+
163
+ ```bash
164
+ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
165
+ ```
166
+
167
+ ### 1. Single Agent
168
+
169
+ Create app.py file and add the code below:
170
+ ```python
171
+ from praisonaiagents import Agent
172
+ agent = Agent(instructions="Your are a helpful AI assistant")
173
+ agent.start("Write a movie script about a robot in Mars")
174
+ ```
175
+
176
+ Run:
177
+ ```bash
178
+ python app.py
179
+ ```
180
+
181
+ ### 2. Multi Agents
182
+
183
+ Create app.py file and add the code below:
184
+ ```python
185
+ from praisonaiagents import Agent, PraisonAIAgents
186
+
187
+ research_agent = Agent(instructions="Research about AI")
188
+ summarise_agent = Agent(instructions="Summarise research agent's findings")
189
+ agents = PraisonAIAgents(agents=[research_agent, summarise_agent])
190
+ agents.start()
191
+ ```
192
+
193
+ Run:
194
+ ```bash
195
+ python app.py
196
+ ```
197
+
198
+ ### 3. Deep Research Agent
199
+
200
+ Automated research with real-time streaming, web search, and citations using OpenAI or Gemini Deep Research APIs.
201
+
202
+ ```python
203
+ from praisonaiagents import DeepResearchAgent
204
+
205
+ # OpenAI Deep Research
206
+ agent = DeepResearchAgent(
207
+ model="o4-mini-deep-research", # or "o3-deep-research"
208
+ verbose=True
209
+ )
210
+
211
+ result = agent.research("What are the latest AI trends in 2025?")
212
+ print(result.report)
213
+ print(f"Citations: {len(result.citations)}")
214
+ ```
215
+
216
+ ```python
217
+ # Gemini Deep Research
218
+ from praisonaiagents import DeepResearchAgent
219
+
220
+ agent = DeepResearchAgent(
221
+ model="deep-research-pro", # Auto-detected as Gemini
222
+ verbose=True
223
+ )
224
+
225
+ result = agent.research("Research quantum computing advances")
226
+ print(result.report)
227
+ ```
228
+
229
+ **Features:**
230
+ - 🔍 Multi-provider support (OpenAI, Gemini, LiteLLM)
231
+ - 📡 Real-time streaming with reasoning summaries
232
+ - 📚 Structured citations with URLs
233
+ - 🛠️ Built-in tools: web search, code interpreter, MCP, file search
234
+ - 🔄 Automatic provider detection from model name
235
+
236
+ ### 4. Query Rewriter Agent
237
+
238
+ Transform user queries to improve RAG retrieval quality using multiple strategies.
239
+
240
+ ```python
241
+ from praisonaiagents import QueryRewriterAgent, RewriteStrategy
242
+
243
+ agent = QueryRewriterAgent(model="gpt-4o-mini")
244
+
245
+ # Basic - expands abbreviations, adds context
246
+ result = agent.rewrite("AI trends")
247
+ print(result.primary_query) # "What are the current trends in Artificial Intelligence?"
248
+
249
+ # HyDE - generates hypothetical document for semantic matching
250
+ result = agent.rewrite("What is quantum computing?", strategy=RewriteStrategy.HYDE)
251
+
252
+ # Step-back - generates broader context question
253
+ result = agent.rewrite("GPT-4 vs Claude 3?", strategy=RewriteStrategy.STEP_BACK)
254
+
255
+ # Sub-queries - decomposes complex questions
256
+ result = agent.rewrite("RAG setup and best embedding models?", strategy=RewriteStrategy.SUB_QUERIES)
257
+
258
+ # Contextual - resolves references using chat history
259
+ result = agent.rewrite("What about cost?", chat_history=[...])
260
+ ```
261
+
262
+ **Strategies:**
263
+ - **BASIC**: Expand abbreviations, fix typos, add context
264
+ - **HYDE**: Generate hypothetical document for semantic matching
265
+ - **STEP_BACK**: Generate higher-level concept questions
266
+ - **SUB_QUERIES**: Decompose multi-part questions
267
+ - **MULTI_QUERY**: Generate multiple paraphrased versions
268
+ - **CONTEXTUAL**: Resolve references using conversation history
269
+ - **AUTO**: Automatically detect best strategy
270
+
271
+ ## Using No Code
272
+
273
+ ### Auto Mode:
274
+ ```bash
275
+ pip install praisonai
276
+ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
277
+ praisonai --auto create a movie script about Robots in Mars
278
+ ```
279
+
280
+ ### Query Rewriting (works with any command):
281
+ ```bash
282
+ # Rewrite query for better results (uses QueryRewriterAgent)
283
+ praisonai "AI trends" --query-rewrite
284
+
285
+ # Rewrite with search tools (agent decides when to search)
286
+ praisonai "latest developments" --query-rewrite --rewrite-tools "internet_search"
287
+
288
+ # Works with any prompt
289
+ praisonai "explain quantum computing" --query-rewrite -v
290
+ ```
291
+
292
+ ### Deep Research CLI:
293
+ ```bash
294
+ # Default: OpenAI (o4-mini-deep-research)
295
+ praisonai research "What are the latest AI trends in 2025?"
296
+
297
+ # Use Gemini
298
+ praisonai research --model deep-research-pro "Your research query"
299
+
300
+ # Rewrite query before research
301
+ praisonai research --query-rewrite "AI trends"
302
+
303
+ # Rewrite with search tools
304
+ praisonai research --query-rewrite --rewrite-tools "internet_search" "AI trends"
305
+
306
+ # Use custom tools from file (gathers context before deep research)
307
+ praisonai research --tools tools.py "Your research query"
308
+ praisonai research -t my_tools.py "Your research query"
309
+
310
+ # Use built-in tools by name (comma-separated)
311
+ praisonai research --tools "internet_search,wiki_search" "Your query"
312
+ praisonai research -t "yfinance,calculator_tools" "Stock analysis query"
313
+
314
+ # Save output to file (output/research/{query}.md)
315
+ praisonai research --save "Your research query"
316
+ praisonai research -s "Your research query"
317
+
318
+ # Combine options
319
+ praisonai research --query-rewrite --tools tools.py --save "Your research query"
320
+
321
+ # Verbose mode (show debug logs)
322
+ praisonai research -v "Your research query"
323
+ ```
324
+
325
+ ## Using JavaScript Code
326
+
327
+ ```bash
328
+ npm install praisonai
329
+ export OPENAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxx
330
+ ```
331
+
332
+ ```javascript
333
+ const { Agent } = require('praisonai');
334
+ const agent = new Agent({ instructions: 'You are a helpful AI assistant' });
335
+ agent.start('Write a movie script about a robot in Mars');
336
+ ```
337
+
338
+ ![PraisonAI CLI Demo](docs/demo/praisonai-cli-demo.gif)
339
+
340
+ ## Star History
341
+
342
+ [![Star History Chart](https://api.star-history.com/svg?repos=MervinPraison/PraisonAI&type=Date)](https://docs.praison.ai)
343
+
344
+ ## AI Agents Flow
345
+
346
+ ```mermaid
347
+ graph LR
348
+ %% Define the main flow
349
+ Start([▶ Start]) --> Agent1
350
+ Agent1 --> Process[⚙ Process]
351
+ Process --> Agent2
352
+ Agent2 --> Output([✓ Output])
353
+ Process -.-> Agent1
354
+
355
+ %% Define subgraphs for agents and their tasks
356
+ subgraph Agent1[ ]
357
+ Task1[📋 Task]
358
+ AgentIcon1[🤖 AI Agent]
359
+ Tools1[🔧 Tools]
360
+
361
+ Task1 --- AgentIcon1
362
+ AgentIcon1 --- Tools1
363
+ end
364
+
365
+ subgraph Agent2[ ]
366
+ Task2[📋 Task]
367
+ AgentIcon2[🤖 AI Agent]
368
+ Tools2[🔧 Tools]
369
+
370
+ Task2 --- AgentIcon2
371
+ AgentIcon2 --- Tools2
372
+ end
373
+
374
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
375
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
376
+ classDef tools fill:#2E8B57,stroke:#7C90A0,color:#fff
377
+ classDef transparent fill:none,stroke:none
378
+
379
+ class Start,Output,Task1,Task2 input
380
+ class Process,AgentIcon1,AgentIcon2 process
381
+ class Tools1,Tools2 tools
382
+ class Agent1,Agent2 transparent
383
+ ```
384
+
385
+ ## AI Agents with Tools
386
+
387
+ Create AI agents that can use tools to interact with external systems and perform actions.
388
+
389
+ ```mermaid
390
+ flowchart TB
391
+ subgraph Tools
392
+ direction TB
393
+ T3[Internet Search]
394
+ T1[Code Execution]
395
+ T2[Formatting]
396
+ end
397
+
398
+ Input[Input] ---> Agents
399
+ subgraph Agents
400
+ direction LR
401
+ A1[Agent 1]
402
+ A2[Agent 2]
403
+ A3[Agent 3]
404
+ end
405
+ Agents ---> Output[Output]
406
+
407
+ T3 --> A1
408
+ T1 --> A2
409
+ T2 --> A3
410
+
411
+ style Tools fill:#189AB4,color:#fff
412
+ style Agents fill:#8B0000,color:#fff
413
+ style Input fill:#8B0000,color:#fff
414
+ style Output fill:#8B0000,color:#fff
415
+ ```
416
+
417
+ ## AI Agents with Memory
418
+
419
+ Create AI agents with memory capabilities for maintaining context and information across tasks.
420
+
421
+ ```mermaid
422
+ flowchart TB
423
+ subgraph Memory
424
+ direction TB
425
+ STM[Short Term]
426
+ LTM[Long Term]
427
+ end
428
+
429
+ subgraph Store
430
+ direction TB
431
+ DB[(Vector DB)]
432
+ end
433
+
434
+ Input[Input] ---> Agents
435
+ subgraph Agents
436
+ direction LR
437
+ A1[Agent 1]
438
+ A2[Agent 2]
439
+ A3[Agent 3]
440
+ end
441
+ Agents ---> Output[Output]
442
+
443
+ Memory <--> Store
444
+ Store <--> A1
445
+ Store <--> A2
446
+ Store <--> A3
447
+
448
+ style Memory fill:#189AB4,color:#fff
449
+ style Store fill:#2E8B57,color:#fff
450
+ style Agents fill:#8B0000,color:#fff
451
+ style Input fill:#8B0000,color:#fff
452
+ style Output fill:#8B0000,color:#fff
453
+ ```
454
+
455
+ ## AI Agents with Different Processes
456
+
457
+ ### Sequential Process
458
+
459
+ The simplest form of task execution where tasks are performed one after another.
460
+
461
+ ```mermaid
462
+ graph LR
463
+ Input[Input] --> A1
464
+ subgraph Agents
465
+ direction LR
466
+ A1[Agent 1] --> A2[Agent 2] --> A3[Agent 3]
467
+ end
468
+ A3 --> Output[Output]
469
+
470
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
471
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
472
+ classDef transparent fill:none,stroke:none
473
+
474
+ class Input,Output input
475
+ class A1,A2,A3 process
476
+ class Agents transparent
477
+ ```
478
+
479
+ ### Hierarchical Process
480
+
481
+ Uses a manager agent to coordinate task execution and agent assignments.
482
+
483
+ ```mermaid
484
+ graph TB
485
+ Input[Input] --> Manager
486
+
487
+ subgraph Agents
488
+ Manager[Manager Agent]
489
+
490
+ subgraph Workers
491
+ direction LR
492
+ W1[Worker 1]
493
+ W2[Worker 2]
494
+ W3[Worker 3]
495
+ end
496
+
497
+ Manager --> W1
498
+ Manager --> W2
499
+ Manager --> W3
500
+ end
501
+
502
+ W1 --> Manager
503
+ W2 --> Manager
504
+ W3 --> Manager
505
+ Manager --> Output[Output]
506
+
507
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
508
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
509
+ classDef transparent fill:none,stroke:none
510
+
511
+ class Input,Output input
512
+ class Manager,W1,W2,W3 process
513
+ class Agents,Workers transparent
514
+ ```
515
+
516
+ ### Workflow Process
517
+
518
+ Advanced process type supporting complex task relationships and conditional execution.
519
+
520
+ ```mermaid
521
+ graph LR
522
+ Input[Input] --> Start
523
+
524
+ subgraph Workflow
525
+ direction LR
526
+ Start[Start] --> C1{Condition}
527
+ C1 --> |Yes| A1[Agent 1]
528
+ C1 --> |No| A2[Agent 2]
529
+ A1 --> Join
530
+ A2 --> Join
531
+ Join --> A3[Agent 3]
532
+ end
533
+
534
+ A3 --> Output[Output]
535
+
536
+ classDef input fill:#8B0000,stroke:#7C90A0,color:#fff
537
+ classDef process fill:#189AB4,stroke:#7C90A0,color:#fff
538
+ classDef decision fill:#2E8B57,stroke:#7C90A0,color:#fff
539
+ classDef transparent fill:none,stroke:none
540
+
541
+ class Input,Output input
542
+ class Start,A1,A2,A3,Join process
543
+ class C1 decision
544
+ class Workflow transparent
545
+ ```
546
+
547
+ #### Agentic Routing Workflow
548
+
549
+ Create AI agents that can dynamically route tasks to specialized LLM instances.
550
+
551
+ ```mermaid
552
+ flowchart LR
553
+ In[In] --> Router[LLM Call Router]
554
+ Router --> LLM1[LLM Call 1]
555
+ Router --> LLM2[LLM Call 2]
556
+ Router --> LLM3[LLM Call 3]
557
+ LLM1 --> Out[Out]
558
+ LLM2 --> Out
559
+ LLM3 --> Out
560
+
561
+ style In fill:#8B0000,color:#fff
562
+ style Router fill:#2E8B57,color:#fff
563
+ style LLM1 fill:#2E8B57,color:#fff
564
+ style LLM2 fill:#2E8B57,color:#fff
565
+ style LLM3 fill:#2E8B57,color:#fff
566
+ style Out fill:#8B0000,color:#fff
567
+ ```
568
+
569
+ #### Agentic Orchestrator Worker
570
+
571
+ Create AI agents that orchestrate and distribute tasks among specialized workers.
572
+
573
+ ```mermaid
574
+ flowchart LR
575
+ In[In] --> Router[LLM Call Router]
576
+ Router --> LLM1[LLM Call 1]
577
+ Router --> LLM2[LLM Call 2]
578
+ Router --> LLM3[LLM Call 3]
579
+ LLM1 --> Synthesizer[Synthesizer]
580
+ LLM2 --> Synthesizer
581
+ LLM3 --> Synthesizer
582
+ Synthesizer --> Out[Out]
583
+
584
+ style In fill:#8B0000,color:#fff
585
+ style Router fill:#2E8B57,color:#fff
586
+ style LLM1 fill:#2E8B57,color:#fff
587
+ style LLM2 fill:#2E8B57,color:#fff
588
+ style LLM3 fill:#2E8B57,color:#fff
589
+ style Synthesizer fill:#2E8B57,color:#fff
590
+ style Out fill:#8B0000,color:#fff
591
+ ```
592
+
593
+ #### Agentic Autonomous Workflow
594
+
595
+ Create AI agents that can autonomously monitor, act, and adapt based on environment feedback.
596
+
597
+ ```mermaid
598
+ flowchart LR
599
+ Human[Human] <--> LLM[LLM Call]
600
+ LLM -->|ACTION| Environment[Environment]
601
+ Environment -->|FEEDBACK| LLM
602
+ LLM --> Stop[Stop]
603
+
604
+ style Human fill:#8B0000,color:#fff
605
+ style LLM fill:#2E8B57,color:#fff
606
+ style Environment fill:#8B0000,color:#fff
607
+ style Stop fill:#333,color:#fff
608
+ ```
609
+
610
+ #### Agentic Parallelization
611
+
612
+ Create AI agents that can execute tasks in parallel for improved performance.
613
+
614
+ ```mermaid
615
+ flowchart LR
616
+ In[In] --> LLM2[LLM Call 2]
617
+ In --> LLM1[LLM Call 1]
618
+ In --> LLM3[LLM Call 3]
619
+ LLM1 --> Aggregator[Aggregator]
620
+ LLM2 --> Aggregator
621
+ LLM3 --> Aggregator
622
+ Aggregator --> Out[Out]
623
+
624
+ style In fill:#8B0000,color:#fff
625
+ style LLM1 fill:#2E8B57,color:#fff
626
+ style LLM2 fill:#2E8B57,color:#fff
627
+ style LLM3 fill:#2E8B57,color:#fff
628
+ style Aggregator fill:#fff,color:#000
629
+ style Out fill:#8B0000,color:#fff
630
+ ```
631
+
632
+ #### Agentic Prompt Chaining
633
+
634
+ Create AI agents with sequential prompt chaining for complex workflows.
635
+
636
+ ```mermaid
637
+ flowchart LR
638
+ In[In] --> LLM1[LLM Call 1] --> Gate{Gate}
639
+ Gate -->|Pass| LLM2[LLM Call 2] -->|Output 2| LLM3[LLM Call 3] --> Out[Out]
640
+ Gate -->|Fail| Exit[Exit]
641
+
642
+ style In fill:#8B0000,color:#fff
643
+ style LLM1 fill:#2E8B57,color:#fff
644
+ style LLM2 fill:#2E8B57,color:#fff
645
+ style LLM3 fill:#2E8B57,color:#fff
646
+ style Out fill:#8B0000,color:#fff
647
+ style Exit fill:#8B0000,color:#fff
648
+ ```
649
+
650
+ #### Agentic Evaluator Optimizer
651
+
652
+ Create AI agents that can generate and optimize solutions through iterative feedback.
653
+
654
+ ```mermaid
655
+ flowchart LR
656
+ In[In] --> Generator[LLM Call Generator]
657
+ Generator -->|SOLUTION| Evaluator[LLM Call Evaluator] -->|ACCEPTED| Out[Out]
658
+ Evaluator -->|REJECTED + FEEDBACK| Generator
659
+
660
+ style In fill:#8B0000,color:#fff
661
+ style Generator fill:#2E8B57,color:#fff
662
+ style Evaluator fill:#2E8B57,color:#fff
663
+ style Out fill:#8B0000,color:#fff
664
+ ```
665
+
666
+ #### Repetitive Agents
667
+
668
+ Create AI agents that can efficiently handle repetitive tasks through automated loops.
669
+
670
+ ```mermaid
671
+ flowchart LR
672
+ In[Input] --> LoopAgent[("Looping Agent")]
673
+ LoopAgent --> Task[Task]
674
+ Task --> |Next iteration| LoopAgent
675
+ Task --> |Done| Out[Output]
676
+
677
+ style In fill:#8B0000,color:#fff
678
+ style LoopAgent fill:#2E8B57,color:#fff,shape:circle
679
+ style Task fill:#2E8B57,color:#fff
680
+ style Out fill:#8B0000,color:#fff
681
+ ```
682
+
683
+ ## Adding Models
684
+
685
+ <div align="center">
686
+ <a href="https://docs.praison.ai/models">
687
+ <p align="center">
688
+ <img src="https://img.shields.io/badge/%F0%9F%93%9A_Models-Visit_docs.praison.ai-blue?style=for-the-badge&logo=bookstack&logoColor=white" alt="Models" />
689
+ </p>
690
+ </a>
691
+ </div>
692
+
693
+ ## Ollama Integration
694
+ ```bash
695
+ export OPENAI_BASE_URL=http://localhost:11434/v1
696
+ ```
697
+
698
+ ## Groq Integration
699
+ Replace xxxx with Groq API KEY:
700
+ ```bash
701
+ export OPENAI_API_KEY=xxxxxxxxxxx
702
+ export OPENAI_BASE_URL=https://api.groq.com/openai/v1
703
+ ```
704
+
705
+ ## No Code Options
706
+
707
+ ## Agents Playbook
708
+
709
+ ### Simple Playbook Example
710
+
711
+ Create `agents.yaml` file and add the code below:
712
+
713
+ ```yaml
714
+ framework: praisonai
715
+ topic: Artificial Intelligence
716
+ roles:
717
+ screenwriter:
718
+ backstory: "Skilled in crafting scripts with engaging dialogue about {topic}."
719
+ goal: Create scripts from concepts.
720
+ role: Screenwriter
721
+ tasks:
722
+ scriptwriting_task:
723
+ description: "Develop scripts with compelling characters and dialogue about {topic}."
724
+ expected_output: "Complete script ready for production."
725
+ ```
726
+
727
+ *To run the playbook:*
728
+ ```bash
729
+ praisonai agents.yaml
730
+ ```
731
+
732
+ ## Use 100+ Models
733
+
734
+ - https://docs.praison.ai/models/
735
+ <div align="center">
736
+ <a href="https://docs.praison.ai">
737
+ <p align="center">
738
+ <img src="https://img.shields.io/badge/📚_Documentation-Visit_docs.praison.ai-blue?style=for-the-badge&logo=bookstack&logoColor=white" alt="Documentation" />
739
+ </p>
740
+ </a>
741
+ </div>
742
+
743
+
744
+ ## Custom Tools
745
+
746
+ ### Using `@tool` Decorator
747
+
748
+ ```python
749
+ from praisonaiagents import Agent, tool
750
+
751
+ @tool
752
+ def search(query: str) -> str:
753
+ """Search the web for information."""
754
+ return f"Results for: {query}"
755
+
756
+ @tool
757
+ def calculate(expression: str) -> float:
758
+ """Evaluate a math expression."""
759
+ return eval(expression)
760
+
761
+ agent = Agent(
762
+ instructions="You are a helpful assistant",
763
+ tools=[search, calculate]
764
+ )
765
+ agent.start("Search for AI news and calculate 15*4")
766
+ ```
767
+
768
+ ### Using `BaseTool` Class
769
+
770
+ ```python
771
+ from praisonaiagents import Agent, BaseTool
772
+
773
+ class WeatherTool(BaseTool):
774
+ name = "weather"
775
+ description = "Get current weather for a location"
776
+
777
+ def run(self, location: str) -> str:
778
+ return f"Weather in {location}: 72°F, Sunny"
779
+
780
+ agent = Agent(
781
+ instructions="You are a weather assistant",
782
+ tools=[WeatherTool()]
783
+ )
784
+ agent.start("What's the weather in Paris?")
785
+ ```
786
+
787
+ ### Creating a Tool Package (pip installable)
788
+
789
+ ```toml
790
+ # pyproject.toml
791
+ [project]
792
+ name = "my-praisonai-tools"
793
+ version = "1.0.0"
794
+ dependencies = ["praisonaiagents"]
795
+
796
+ [project.entry-points."praisonaiagents.tools"]
797
+ my_tool = "my_package:MyTool"
798
+ ```
799
+
800
+ ```python
801
+ # my_package/__init__.py
802
+ from praisonaiagents import BaseTool
803
+
804
+ class MyTool(BaseTool):
805
+ name = "my_tool"
806
+ description = "My custom tool"
807
+
808
+ def run(self, param: str) -> str:
809
+ return f"Result: {param}"
810
+ ```
811
+
812
+ After `pip install`, tools are auto-discovered:
813
+ ```python
814
+ agent = Agent(tools=["my_tool"]) # Works automatically!
815
+ ```
816
+
817
+
818
+ ## Development:
819
+
820
+ Below is used for development only.
821
+
822
+ ### Using uv
823
+ ```bash
824
+ # Install uv if you haven't already
825
+ pip install uv
826
+
827
+ # Install from requirements
828
+ uv pip install -r pyproject.toml
829
+
830
+ # Install with extras
831
+ uv pip install -r pyproject.toml --extra code
832
+ uv pip install -r pyproject.toml --extra "crewai,autogen"
833
+ ```
834
+
835
+ ### Version Bump
836
+
837
+ ```bash
838
+ # From project root
839
+ python src/praisonai/scripts/bump_version.py 2.2.96
840
+
841
+ # With praisonaiagents dependency
842
+ python src/praisonai/scripts/bump_version.py 2.2.96 --agents 0.0.167
843
+ ```
844
+
845
+ ### Release
846
+
847
+ ```bash
848
+ # From project root (runs uv lock, build, git tag, gh release)
849
+ python src/praisonai/scripts/release.py
850
+
851
+ # Then publish
852
+ cd src/praisonai && uv publish
853
+ ```
854
+
855
+ ## Contributing
856
+
857
+ - Fork on GitHub: Use the "Fork" button on the repository page.
858
+ - Clone your fork: `git clone https://github.com/yourusername/praisonAI.git`
859
+ - Create a branch: `git checkout -b new-feature`
860
+ - Make changes and commit: `git commit -am "Add some feature"`
861
+ - Push to your fork: `git push origin new-feature`
862
+ - Submit a pull request via GitHub's web interface.
863
+ - Await feedback from project maintainers.
864
+
865
+ ## Other Features
866
+
867
+ - 🔄 Use CrewAI or AG2 (Formerly AutoGen) Framework
868
+ - 💻 Chat with ENTIRE Codebase
869
+ - 🎨 Interactive UIs
870
+ - 📄 YAML-based Configuration
871
+ - 🛠️ Custom Tool Integration
872
+ - 🔍 Internet Search Capability (using Crawl4AI and Tavily)
873
+ - 🖼️ Vision Language Model (VLM) Support
874
+ - 🎙️ Real-time Voice Interaction
875
+
876
+ ## Video Tutorials
877
+
878
+ | Topic | Video |
879
+ |-------|--------|
880
+ | AI Agents with Self Reflection | [![Self Reflection](https://img.youtube.com/vi/vLXobEN2Vc8/0.jpg)](https://www.youtube.com/watch?v=vLXobEN2Vc8) |
881
+ | Reasoning Data Generating Agent | [![Reasoning Data](https://img.youtube.com/vi/fUT332Y2zA8/0.jpg)](https://www.youtube.com/watch?v=fUT332Y2zA8) |
882
+ | AI Agents with Reasoning | [![Reasoning](https://img.youtube.com/vi/KNDVWGN3TpM/0.jpg)](https://www.youtube.com/watch?v=KNDVWGN3TpM) |
883
+ | Multimodal AI Agents | [![Multimodal](https://img.youtube.com/vi/hjAWmUT1qqY/0.jpg)](https://www.youtube.com/watch?v=hjAWmUT1qqY) |
884
+ | AI Agents Workflow | [![Workflow](https://img.youtube.com/vi/yWTH44QPl2A/0.jpg)](https://www.youtube.com/watch?v=yWTH44QPl2A) |
885
+ | Async AI Agents | [![Async](https://img.youtube.com/vi/VhVQfgo00LE/0.jpg)](https://www.youtube.com/watch?v=VhVQfgo00LE) |
886
+ | Mini AI Agents | [![Mini](https://img.youtube.com/vi/OkvYp5aAGSg/0.jpg)](https://www.youtube.com/watch?v=OkvYp5aAGSg) |
887
+ | AI Agents with Memory | [![Memory](https://img.youtube.com/vi/1hVfVxvPnnQ/0.jpg)](https://www.youtube.com/watch?v=1hVfVxvPnnQ) |
888
+ | Repetitive Agents | [![Repetitive](https://img.youtube.com/vi/dAYGxsjDOPg/0.jpg)](https://www.youtube.com/watch?v=dAYGxsjDOPg) |
889
+ | Introduction | [![Introduction](https://img.youtube.com/vi/Fn1lQjC0GO0/0.jpg)](https://www.youtube.com/watch?v=Fn1lQjC0GO0) |
890
+ | Tools Overview | [![Tools Overview](https://img.youtube.com/vi/XaQRgRpV7jo/0.jpg)](https://www.youtube.com/watch?v=XaQRgRpV7jo) |
891
+ | Custom Tools | [![Custom Tools](https://img.youtube.com/vi/JSU2Rndh06c/0.jpg)](https://www.youtube.com/watch?v=JSU2Rndh06c) |
892
+ | Firecrawl Integration | [![Firecrawl](https://img.youtube.com/vi/UoqUDcLcOYo/0.jpg)](https://www.youtube.com/watch?v=UoqUDcLcOYo) |
893
+ | User Interface | [![UI](https://img.youtube.com/vi/tg-ZjNl3OCg/0.jpg)](https://www.youtube.com/watch?v=tg-ZjNl3OCg) |
894
+ | Crawl4AI Integration | [![Crawl4AI](https://img.youtube.com/vi/KAvuVUh0XU8/0.jpg)](https://www.youtube.com/watch?v=KAvuVUh0XU8) |
895
+ | Chat Interface | [![Chat](https://img.youtube.com/vi/sw3uDqn2h1Y/0.jpg)](https://www.youtube.com/watch?v=sw3uDqn2h1Y) |
896
+ | Code Interface | [![Code](https://img.youtube.com/vi/_5jQayO-MQY/0.jpg)](https://www.youtube.com/watch?v=_5jQayO-MQY) |
897
+ | Mem0 Integration | [![Mem0](https://img.youtube.com/vi/KIGSgRxf1cY/0.jpg)](https://www.youtube.com/watch?v=KIGSgRxf1cY) |
898
+ | Training | [![Training](https://img.youtube.com/vi/aLawE8kwCrI/0.jpg)](https://www.youtube.com/watch?v=aLawE8kwCrI) |
899
+ | Realtime Voice Interface | [![Realtime](https://img.youtube.com/vi/frRHfevTCSw/0.jpg)](https://www.youtube.com/watch?v=frRHfevTCSw) |
900
+ | Call Interface | [![Call](https://img.youtube.com/vi/m1cwrUG2iAk/0.jpg)](https://www.youtube.com/watch?v=m1cwrUG2iAk) |
901
+ | Reasoning Extract Agents | [![Reasoning Extract](https://img.youtube.com/vi/2PPamsADjJA/0.jpg)](https://www.youtube.com/watch?v=2PPamsADjJA) |
902
+