Skip to content

Commit 177027d

Browse files
committed
Update PraisonAI to version 2.0.52 and enhance repetitive agents functionality
- Bumped PraisonAI version from 2.0.51 to 2.0.52 in `Dockerfile`, `pyproject.toml`, and `uv.lock` to reflect the latest updates. - Updated the `praisonai.rb` formula to point to the new version's tarball. - Updated the `praisonaiagents` dependency version from `0.0.42` to `0.0.43` across relevant files for improved functionality. - Introduced new files for repetitive agents in `agents/repetitive-agents.py` and `examples/concepts/repetitive-agents.py`, enabling automated task loops. - Enhanced documentation with a new section on repetitive agents in `docs/features/repetitive.mdx` and updated `mint.json` to include the new feature. These changes improve the overall functionality and usability of the PraisonAI framework, particularly in handling repetitive tasks and enhancing agent capabilities.
1 parent edf70d1 commit 177027d

File tree

10 files changed

+173
-14
lines changed

10 files changed

+173
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.11-slim
22
WORKDIR /app
33
COPY . .
4-
RUN pip install flask praisonai==2.0.51 gunicorn markdown
4+
RUN pip install flask praisonai==2.0.52 gunicorn markdown
55
EXPOSE 8080
66
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]
File renamed without changes.

docs/api/praisonai/deploy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ <h2 id="raises">Raises</h2>
110110
file.write(&#34;FROM python:3.11-slim\n&#34;)
111111
file.write(&#34;WORKDIR /app\n&#34;)
112112
file.write(&#34;COPY . .\n&#34;)
113-
file.write(&#34;RUN pip install flask praisonai==2.0.51 gunicorn markdown\n&#34;)
113+
file.write(&#34;RUN pip install flask praisonai==2.0.52 gunicorn markdown\n&#34;)
114114
file.write(&#34;EXPOSE 8080\n&#34;)
115115
file.write(&#39;CMD [&#34;gunicorn&#34;, &#34;-b&#34;, &#34;0.0.0.0:8080&#34;, &#34;api:app&#34;]\n&#39;)
116116

docs/features/repetitive.mdx

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
title: "Repetitive Agents"
3+
description: "Learn how to create AI agents that can efficiently handle repetitive tasks through automated loops."
4+
icon: "repeat"
5+
---
6+
7+
```mermaid
8+
flowchart LR
9+
In[Input] --> LoopAgent[("Looping Agent")]
10+
LoopAgent --> Task[Task]
11+
Task --> |Next iteration| LoopAgent
12+
Task --> |Done| Out[Output]
13+
14+
style In fill:#8B0000,color:#fff
15+
style LoopAgent fill:#2E8B57,color:#fff,shape:circle
16+
style Task fill:#2E8B57,color:#fff
17+
style Out fill:#8B0000,color:#fff
18+
```
19+
20+
A workflow optimization pattern where agents handle repetitive tasks through automated loops, processing multiple instances efficiently while maintaining consistency.
21+
22+
## Quick Start
23+
24+
<Steps>
25+
<Step title="Install Package">
26+
First, install the PraisonAI Agents package:
27+
```bash
28+
pip install praisonaiagents
29+
```
30+
</Step>
31+
32+
<Step title="Set API Key">
33+
Set your OpenAI API key as an environment variable in your terminal:
34+
```bash
35+
export OPENAI_API_KEY=your_api_key_here
36+
```
37+
</Step>
38+
39+
<Step title="Create a file">
40+
Create a new file `repetitive_agent.py` with the basic setup:
41+
```python
42+
from praisonaiagents import Agent, Task, PraisonAIAgents
43+
44+
agent = Agent(
45+
instructions="You are a loop agent that creating a loop of tasks."
46+
)
47+
48+
task = Task(
49+
description="Create the list of tasks to be looped through.",
50+
agent=agent,
51+
task_type="loop",
52+
input_file="tasks.csv"
53+
)
54+
55+
agents = PraisonAIAgents(
56+
agents=[agent],
57+
tasks=[task],
58+
process="workflow"
59+
)
60+
61+
agents.start()
62+
```
63+
</Step>
64+
65+
<Step title="Start Agents">
66+
Type this in your terminal to run your agents:
67+
```bash
68+
python repetitive_agent.py
69+
```
70+
</Step>
71+
</Steps>
72+
73+
<Note>
74+
**Requirements**
75+
- Python 3.10 or higher
76+
- OpenAI API key. Generate OpenAI API key [here](https://platform.openai.com/api-keys). Use Other models using [this guide](/models).
77+
</Note>
78+
79+
## Understanding Repetitive Agents
80+
81+
<Card title="What are Repetitive Agents?" icon="question">
82+
Repetitive agents enable:
83+
- Automated task loops
84+
- Batch processing
85+
- Consistent task execution
86+
- Efficient handling of multiple similar tasks
87+
</Card>
88+
89+
## Features
90+
91+
<CardGroup cols={2}>
92+
<Card title="Task Looping" icon="repeat">
93+
Process multiple tasks through automated loops.
94+
</Card>
95+
<Card title="Batch Processing" icon="layer-group">
96+
Handle multiple similar tasks efficiently.
97+
</Card>
98+
<Card title="Input Management" icon="file-csv">
99+
Process tasks from structured input files.
100+
</Card>
101+
<Card title="Progress Tracking" icon="chart-line">
102+
Monitor task completion and progress.
103+
</Card>
104+
</CardGroup>
105+
106+
## Troubleshooting
107+
108+
<CardGroup cols={2}>
109+
<Card title="Loop Issues" icon="triangle-exclamation">
110+
If loops aren't working as expected:
111+
- Verify input file format
112+
- Check task configurations
113+
- Enable verbose mode for debugging
114+
</Card>
115+
116+
<Card title="Performance Issues" icon="gauge-high">
117+
If processing is slow:
118+
- Check batch sizes
119+
- Verify resource allocation
120+
- Monitor memory usage
121+
</Card>
122+
</CardGroup>
123+
124+
## Next Steps
125+
126+
<CardGroup cols={2}>
127+
<Card title="AutoAgents" icon="robot" href="./autoagents">
128+
Learn about automatically created and managed AI agents
129+
</Card>
130+
<Card title="Mini Agents" icon="microchip" href="./mini">
131+
Explore lightweight, focused AI agents
132+
</Card>
133+
</CardGroup>
134+
135+
<Note>
136+
For optimal results, ensure your input files are properly formatted and your task configurations are appropriate for your use case.
137+
</Note>

docs/mint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
108108
"features/autonomous-workflow",
109109
"features/parallelisation",
110110
"features/promptchaining",
111-
"features/evaluator-optimiser"
111+
"features/evaluator-optimiser",
112+
"features/repetitive"
112113
]
113114
},
114115
{
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from praisonaiagents import Agent, Task, PraisonAIAgents
2+
3+
agent = Agent(
4+
instructions="You are a loop agent that creating a loop of tasks.",
5+
llm="gpt-4o-mini"
6+
)
7+
8+
task = Task(
9+
description="Create the list of tasks to be looped through.",
10+
agent=agent,
11+
task_type="loop",
12+
input_file="tasks.csv"
13+
)
14+
15+
agents = PraisonAIAgents(
16+
agents=[agent],
17+
tasks=[task],
18+
process="workflow"
19+
)
20+
21+
agents.start()

praisonai.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class Praisonai < Formula
33

44
desc "AI tools for various AI applications"
55
homepage "https://github.com/MervinPraison/PraisonAI"
6-
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/2.0.51.tar.gz"
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/2.0.52.tar.gz"
77
sha256 "1828fb9227d10f991522c3f24f061943a254b667196b40b1a3e4a54a8d30ce32" # Replace with actual SHA256 checksum
88
license "MIT"
99

praisonai/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_dockerfile(self):
5656
file.write("FROM python:3.11-slim\n")
5757
file.write("WORKDIR /app\n")
5858
file.write("COPY . .\n")
59-
file.write("RUN pip install flask praisonai==2.0.51 gunicorn markdown\n")
59+
file.write("RUN pip install flask praisonai==2.0.52 gunicorn markdown\n")
6060
file.write("EXPOSE 8080\n")
6161
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
6262

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "PraisonAI"
3-
version = "2.0.51"
3+
version = "2.0.52"
44
description = "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."
55
readme = "README.md"
66
license = ""
@@ -12,7 +12,7 @@ dependencies = [
1212
"rich>=13.7",
1313
"markdown>=3.5",
1414
"pyparsing>=3.0.0",
15-
"praisonaiagents>=0.0.42",
15+
"praisonaiagents>=0.0.43",
1616
"python-dotenv>=0.19.0",
1717
"instructor>=1.3.3",
1818
"PyYAML>=6.0",
@@ -84,7 +84,7 @@ autogen = ["pyautogen>=0.2.19", "praisonai-tools>=0.0.7", "crewai"]
8484

8585
[tool.poetry]
8686
name = "PraisonAI"
87-
version = "2.0.51"
87+
version = "2.0.52"
8888
description = "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."
8989
authors = ["Mervin Praison"]
9090
license = ""
@@ -102,7 +102,7 @@ python = ">=3.10,<3.13"
102102
rich = ">=13.7"
103103
markdown = ">=3.5"
104104
pyparsing = ">=3.0.0"
105-
praisonaiagents = ">=0.0.42"
105+
praisonaiagents = ">=0.0.43"
106106
python-dotenv = ">=0.19.0"
107107
instructor = ">=1.3.3"
108108
PyYAML = ">=6.0"

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)