Skip to content

Commit 8555b5a

Browse files
committed
Release v4.5.29
1 parent 16f9325 commit 8555b5a

File tree

13 files changed

+294
-19
lines changed

13 files changed

+294
-19
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.28" \
19+
"praisonai>=4.5.29" \
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.28" \
23+
"praisonai>=4.5.29" \
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.28" \
19+
"praisonai>=4.5.29" \
2020
"praisonai[ui]" \
2121
"praisonai[crewai]"
2222

src/praisonai-agents/AGENTS.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ Pattern: Each major module has a protocols.py file
123123
- Protocols define WHAT (interface contract)
124124
- Adapters implement HOW (concrete implementation)
125125
- Naming: XProtocol for interfaces, XAdapter for implementations
126+
(ALWAYS suffix with "Protocol" — never use bare concept names like TraceSink)
127+
- File placement: All protocols live in protocols.py within their module
126128
- Users can implement any protocol for custom behavior
127129
```
128130

@@ -286,9 +288,19 @@ save() / load() # Disk persistence (NOT store)
286288
# Configuration
287289
class XConfig: # Configuration dataclass (MemoryConfig, HooksConfig)
288290

289-
# Protocols
290-
class XProtocol(Protocol): # Abstract interface
291-
class XAdapter: # Implementation
291+
# Protocols — ALWAYS suffix with "Protocol"
292+
class XProtocol(Protocol): # Abstract interface (TraceSinkProtocol, MemoryProtocol)
293+
class XAdapter: # Concrete implementation (ChromaAdapter, FileAdapter)
294+
295+
# ✅ CORRECT protocol naming:
296+
class MemoryProtocol(Protocol): ... # Clear it's a protocol
297+
class SessionStoreProtocol(Protocol): ... # Descriptive + Protocol suffix
298+
class TraceSinkProtocol(Protocol): ... # In protocols.py + suffixed
299+
300+
# ❌ WRONG protocol naming:
301+
class TraceSink(Protocol): ... # Missing Protocol suffix — ambiguous
302+
class IMemory(Protocol): ... # TypeScript convention, not Python
303+
class MemoryBase(Protocol): ... # "Base" implies ABC, not Protocol
292304

293305
# Execution
294306
run() # Synchronous, blocking

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.28"
7+
version = "1.5.29"
88
description = "Praison AI agents for completing complex tasks with Self Reflection Agents"
99
readme = "README.md"
1010
requires-python = ">=3.10"

src/praisonai-agents/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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/v4.5.28.tar.gz"
7-
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v4.5.28.tar.gz | shasum -a 256`.split.first
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v4.5.29.tar.gz"
7+
sha256 `curl -sL https://github.com/MervinPraison/PraisonAI/archive/refs/tags/v4.5.29.tar.gz | shasum -a 256`.split.first
88
license "MIT"
99

1010
depends_on "python@3.11"

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==4.5.28 gunicorn markdown\n")
60+
file.write("RUN pip install flask praisonai==4.5.29 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/gateway/server.py

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,22 +815,76 @@ def _resolve(obj):
815815
return _resolve(raw)
816816

817817
def _create_agents_from_config(self, agents_cfg: Dict[str, Dict[str, Any]]) -> None:
818-
"""Create and register Agent instances from the agents section of gateway.yaml."""
818+
"""Create and register Agent instances from the agents section of gateway.yaml.
819+
820+
Supports all agent configuration options including:
821+
- tools: List of tool names to resolve via ToolResolver
822+
- tool_choice: Tool selection mode ('auto', 'required', 'none')
823+
- reflection: Enable reflection/interactive mode (default: True)
824+
- allow_delegation: Allow task delegation
825+
- role: Agent role (CrewAI-style)
826+
- goal: Agent goal (CrewAI-style)
827+
- backstory: Agent backstory (CrewAI-style)
828+
"""
819829
from praisonaiagents import Agent
820830

831+
# G1: Resolve tool names to callables (same pattern as agents_generator)
832+
tool_resolver = None
833+
try:
834+
from praisonai.tool_resolver import ToolResolver
835+
tool_resolver = ToolResolver()
836+
except ImportError:
837+
logger.debug("ToolResolver not available, agents will have no tools")
838+
821839
for agent_id, agent_def in agents_cfg.items():
822840
instructions = agent_def.get("instructions", "")
823841
model = agent_def.get("model", None)
824842
memory = agent_def.get("memory", False)
843+
844+
# G4: Support role/goal/backstory for CrewAI-style agents
845+
role = agent_def.get("role", None)
846+
goal = agent_def.get("goal", None)
847+
backstory = agent_def.get("backstory", None)
848+
849+
# G1: Resolve tools from YAML config
850+
agent_tools = []
851+
yaml_tool_names = agent_def.get("tools", [])
852+
if yaml_tool_names and tool_resolver:
853+
for tool_name in yaml_tool_names:
854+
if not tool_name or not isinstance(tool_name, str):
855+
continue
856+
tool_name = tool_name.strip()
857+
resolved = tool_resolver.resolve(tool_name)
858+
if resolved:
859+
agent_tools.append(resolved)
860+
logger.debug(f"Resolved tool '{tool_name}' for agent '{agent_id}'")
861+
else:
862+
logger.warning(f"Tool '{tool_name}' not found for agent '{agent_id}'")
863+
864+
# Additional agent options from YAML
865+
tool_choice = agent_def.get("tool_choice", None)
866+
reflection = agent_def.get("reflection", True) # Default: enable reflection/interactive mode
867+
allow_delegation = agent_def.get("allow_delegation", False)
825868

826869
agent = Agent(
827870
name=agent_id,
828871
instructions=instructions,
829872
llm=model,
830873
memory=memory,
874+
tools=agent_tools if agent_tools else None,
875+
reflection=reflection,
876+
allow_delegation=allow_delegation,
877+
role=role,
878+
goal=goal,
879+
backstory=backstory,
831880
)
881+
882+
# Store tool_choice for later use in chat()
883+
if tool_choice:
884+
agent._yaml_tool_choice = tool_choice
885+
832886
self.register_agent(agent, agent_id=agent_id)
833-
logger.info(f"Created agent '{agent_id}' (model={model})")
887+
logger.info(f"Created agent '{agent_id}' (model={model}, tools={len(agent_tools)}, reflection={reflection})")
834888

835889
def _determine_routing_context(
836890
self, channel_type: str, message_metadata: Dict[str, Any]

src/praisonai/praisonai/version.py

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

0 commit comments

Comments
 (0)