Skip to content

Commit b529110

Browse files
committed
Release v3.9.20
1 parent 2a004bc commit b529110

File tree

8 files changed

+46
-9
lines changed

8 files changed

+46
-9
lines changed

docker/Dockerfile.chat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=3.9.19" \
19+
"praisonai>=3.9.20" \
2020
"praisonai[chat]" \
2121
"embedchain[github,youtube]"
2222

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN mkdir -p /root/.praison
2020
# Install Python packages (using latest versions)
2121
RUN pip install --no-cache-dir \
2222
praisonai_tools \
23-
"praisonai>=3.9.19" \
23+
"praisonai>=3.9.20" \
2424
"praisonai[ui]" \
2525
"praisonai[chat]" \
2626
"praisonai[realtime]" \

docker/Dockerfile.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN mkdir -p /root/.praison
1616
# Install Python packages (using latest versions)
1717
RUN pip install --no-cache-dir \
1818
praisonai_tools \
19-
"praisonai>=3.9.19" \
19+
"praisonai>=3.9.20" \
2020
"praisonai[ui]" \
2121
"praisonai[crewai]"
2222

src/praisonai/praisonai.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ 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/v3.9.19.tar.gz"
7-
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.19.tar.gz | shasum -a 256`.split.first
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.20.tar.gz"
7+
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v3.9.20.tar.gz | shasum -a 256`.split.first
88
license "MIT"
99

1010
depends_on "python@3.11"

src/praisonai/praisonai/browser/agent.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,42 @@ def normalize_action(action_dict: Dict[str, Any]) -> Dict[str, Any]:
210210
- **Clicked link but still on same page** → Try clicking again or use a different selector
211211
- **Typed but text didn't appear** → Clear and retype
212212
- **Submit didn't work** → Try clicking the submit button instead
213+
- **On unexpected/wrong page** → Use `navigate` action to go back to the right URL!
214+
- Example: Goal is "search on google" but you see amazon.com → navigate to google.com
215+
- Example: You were clicking a link but ended up on random page → navigate back
213216
214217
DO NOT keep repeating the same failed action. ADAPT!
215218
219+
## CRITICAL: ANTI-LOOP RULES (NEVER VIOLATE!)
220+
221+
⚠️ **NEVER repeat the EXACT SAME action twice in a row!** If you just did:
222+
- `type → #searchInput = "term"` → NEXT must be `submit` or `click`, NOT another type!
223+
- `click → a.link` → Don't click the same link again if it didn't work
224+
- `submit → #form` → Don't submit again if page didn't change
225+
226+
### Type + Submit Workflow
227+
After typing text into an input field, you MUST either:
228+
1. Use `submit` action to press Enter, OR
229+
2. Click a search/submit button
230+
231+
WRONG: type → type → type → type (stuck in loop!)
232+
RIGHT: type → submit → click → done
233+
234+
If you've typed the SAME value 2+ times without result:
235+
→ The input probably worked! Use `submit` or `click` a button to proceed!
236+
237+
238+
## CRITICAL: Recovery from Unexpected Navigation
239+
240+
If the current URL doesn't match what you expect for your goal:
241+
1. Set `error_detected: true`
242+
2. Set `expected_vs_actual` to describe the mismatch (e.g., "Expected: google.com | Actual: amazon.com")
243+
3. Set `on_track: false`
244+
4. Use `navigate` action to go to the correct URL
245+
246+
Example: If your goal is "search for python on google" but the page shows facebook.com:
247+
→ Use `navigate` with `url: "https://www.google.com"` to get back on track!
248+
216249
217250
## CRITICAL: Cookie Consent / Overlay Dialogs
218251

src/praisonai/praisonai/browser/server.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ async def run_browser_agent_with_progress(
771771
session_id = None
772772
step_count = 0
773773
last_thought = ""
774+
session_start_time = time.time() # Track start time for elapsed timestamps
774775

775776
# Listen for messages until completion or timeout
776777
while time.time() - start_time < timeout:
@@ -825,8 +826,11 @@ async def run_browser_agent_with_progress(
825826

826827
if debug:
827828
# === SHOW FULL AGENT DECISION ===
828-
# Action summary line
829-
action_info = f"[Extension] Step {step_count}: {action}"
829+
# Calculate elapsed time from COMMAND start (not session start)
830+
elapsed = time.time() - start_time
831+
832+
# Action summary line with timestamp
833+
action_info = f"[+{elapsed:.1f}s] Step {step_count}: {action}"
830834
if selector:
831835
selector_preview = selector[:40] + "..." if len(selector) > 40 else selector
832836
action_info += f" → {selector_preview}"

src/praisonai/praisonai/deploy.py

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

src/praisonai/praisonai/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.9.19"
1+
__version__ = "3.9.20"

0 commit comments

Comments
 (0)