Skip to content

Commit 878a562

Browse files
committed
Release v4.5.8
1 parent 0803bca commit 878a562

File tree

14 files changed

+447
-56
lines changed

14 files changed

+447
-56
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>=4.5.7" \
19+
"praisonai>=4.5.8" \
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>=4.5.7" \
23+
"praisonai>=4.5.8" \
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>=4.5.7" \
19+
"praisonai>=4.5.8" \
2020
"praisonai[ui]" \
2121
"praisonai[crewai]"
2222

src/praisonai-agents/praisonaiagents/agent/agent.py

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6288,10 +6288,37 @@ async def astart(self, prompt: str, **kwargs):
62886288
**kwargs: Additional arguments passed to achat()
62896289
62906290
Returns:
6291-
The agent's response as a string
6291+
The agent's response as a string, or AutonomyResult if autonomy enabled
6292+
6293+
Note:
6294+
If autonomy=True was set on the agent, astart() automatically uses
6295+
the autonomous loop (run_autonomous_async) instead of single-turn chat.
62926296
"""
62936297
import sys
62946298

6299+
# ─────────────────────────────────────────────────────────────────────
6300+
# UNIFIED AUTONOMY API: If autonomy is enabled, route to run_autonomous_async
6301+
# This allows: Agent(autonomy=True) + await agent.astart("Task") to just work!
6302+
# ─────────────────────────────────────────────────────────────────────
6303+
if self.autonomy_enabled:
6304+
# Extract autonomy-specific kwargs
6305+
timeout = kwargs.pop('timeout', None)
6306+
kwargs.pop('stream', None) # Not used in autonomous mode
6307+
6308+
# Get config values from autonomy_config
6309+
auto_config = self.autonomy_config or {}
6310+
max_iterations = auto_config.get('max_iterations', 20)
6311+
completion_promise = auto_config.get('completion_promise')
6312+
clear_context = auto_config.get('clear_context', False)
6313+
6314+
return await self.run_autonomous_async(
6315+
prompt=prompt,
6316+
max_iterations=max_iterations,
6317+
timeout_seconds=timeout,
6318+
completion_promise=completion_promise,
6319+
clear_context=clear_context,
6320+
)
6321+
62956322
# Determine streaming behavior (same logic as start())
62966323
stream_requested = kwargs.get('stream')
62976324
if stream_requested is None:
@@ -6523,6 +6550,9 @@ def start(self, prompt: str = None, **kwargs):
65236550
Unlike .run() which is always silent (production use), .start()
65246551
enables verbose output by default when in a TTY for beginner-friendly
65256552
interactive use. Use .run() for programmatic/scripted usage.
6553+
6554+
If autonomy=True was set on the agent, start() automatically uses
6555+
the autonomous loop (run_autonomous) instead of single-turn chat.
65266556
"""
65276557
import sys
65286558

@@ -6535,6 +6565,28 @@ def start(self, prompt: str = None, **kwargs):
65356565
from praisonaiagents.utils.variables import substitute_variables
65366566
prompt = substitute_variables(prompt, {})
65376567

6568+
# ─────────────────────────────────────────────────────────────────────
6569+
# UNIFIED AUTONOMY API: If autonomy is enabled, route to run_autonomous
6570+
# This allows: Agent(autonomy=True) + agent.start("Task") to just work!
6571+
# ─────────────────────────────────────────────────────────────────────
6572+
if self.autonomy_enabled:
6573+
# Extract autonomy-specific kwargs
6574+
timeout = kwargs.pop('timeout', None)
6575+
6576+
# Get config values from autonomy_config
6577+
auto_config = self.autonomy_config or {}
6578+
max_iterations = auto_config.get('max_iterations', 20)
6579+
completion_promise = auto_config.get('completion_promise')
6580+
clear_context = auto_config.get('clear_context', False)
6581+
6582+
return self.run_autonomous(
6583+
prompt=prompt,
6584+
max_iterations=max_iterations,
6585+
timeout_seconds=timeout,
6586+
completion_promise=completion_promise,
6587+
clear_context=clear_context,
6588+
)
6589+
65386590
# Load history from past sessions
65396591
self._load_history_context()
65406592

src/praisonai-agents/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "praisonaiagents"
7-
version = "1.5.7"
7+
version = "1.5.8"
88
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
99
readme = "README.md"
1010
requires-python = ">=3.10"

0 commit comments

Comments
 (0)