diff --git a/.gitignore b/.gitignore index 51e6d273..9445e51f 100644 --- a/.gitignore +++ b/.gitignore @@ -65,4 +65,5 @@ outputs agents/praisonaiagents/build agents/praisonaiagents/dist agents/praisonaiagents/praisonaiagents.egg-info -.codegpt \ No newline at end of file +.codegpt +.praison \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5d87b233..e6be1389 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.11-slim WORKDIR /app COPY . . -RUN pip install flask praisonai==2.0.39 gunicorn markdown +RUN pip install flask praisonai==2.0.40 gunicorn markdown EXPOSE 8080 CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"] diff --git a/agents.yaml b/agents.yaml index c0bf80db..d6eee221 100644 --- a/agents.yaml +++ b/agents.yaml @@ -1,6 +1,7 @@ framework: praisonai process: sequential topic: create movie script about cat in mars +memory: false roles: researcher: backstory: Skilled in research, with a focus on gathering accurate and relevant diff --git a/docs/api/praisonai/deploy.html b/docs/api/praisonai/deploy.html index a25cd014..c34e0938 100644 --- a/docs/api/praisonai/deploy.html +++ b/docs/api/praisonai/deploy.html @@ -110,7 +110,7 @@

Raises

file.write("FROM python:3.11-slim\n") file.write("WORKDIR /app\n") file.write("COPY . .\n") - file.write("RUN pip install flask praisonai==2.0.39 gunicorn markdown\n") + file.write("RUN pip install flask praisonai==2.0.40 gunicorn markdown\n") file.write("EXPOSE 8080\n") file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n') diff --git a/docs/features/langchain.mdx b/docs/features/langchain.mdx index fc1337de..2ba88377 100644 --- a/docs/features/langchain.mdx +++ b/docs/features/langchain.mdx @@ -123,9 +123,10 @@ icon: "link-simple" - Install the PraisonAI package with LangChain support: + (Upcoming Feature) + Install the PraisonAI package: ```bash - pip install "praisonai[langchain]" + pip install "praisonai" ``` diff --git a/praisonai.rb b/praisonai.rb index ec67397a..6a8d03e0 100644 --- a/praisonai.rb +++ b/praisonai.rb @@ -3,7 +3,7 @@ class Praisonai < Formula desc "AI tools for various AI applications" homepage "https://github.com/MervinPraison/PraisonAI" - url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/2.0.39.tar.gz" + url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/2.0.40.tar.gz" sha256 "1828fb9227d10f991522c3f24f061943a254b667196b40b1a3e4a54a8d30ce32" # Replace with actual SHA256 checksum license "MIT" diff --git a/praisonai/agents_generator.py b/praisonai/agents_generator.py index dedef1e9..6858024b 100644 --- a/praisonai/agents_generator.py +++ b/praisonai/agents_generator.py @@ -212,9 +212,9 @@ def load_tools_from_tools_py(self): try: # Try to import tools.py from current directory spec = importlib.util.spec_from_file_location("tools", "tools.py") - self.logger.info(f"Spec: {spec}") + self.logger.debug(f"Spec: {spec}") if spec is None: - self.logger.info("tools.py not found in current directory") + self.logger.debug("tools.py not found in current directory") return tools_list module = importlib.util.module_from_spec(spec) @@ -229,10 +229,10 @@ def load_tools_from_tools_py(self): globals()[name] = obj # Add to tools list tools_list.append(obj) - self.logger.info(f"Loaded and globalized tool function: {name}") + self.logger.debug(f"Loaded and globalized tool function: {name}") - self.logger.info(f"Loaded {len(tools_list)} tool functions from tools.py") - self.logger.info(f"Tools list: {tools_list}") + self.logger.debug(f"Loaded {len(tools_list)} tool functions from tools.py") + self.logger.debug(f"Tools list: {tools_list}") except Exception as e: self.logger.warning(f"Error loading tools from tools.py: {e}") @@ -539,7 +539,7 @@ def _run_praisonai(self, config, topic, tools_dict): # Load tools once at the beginning tools_list = self.load_tools_from_tools_py() - self.logger.info(f"Loaded tools: {tools_list}") + self.logger.debug(f"Loaded tools: {tools_list}") # Create agents from config for role, details in config['roles'].items(): @@ -574,7 +574,7 @@ def _run_praisonai(self, config, topic, tools_dict): agent.step_callback = self.agent_callback agents[role] = agent - self.logger.info(f"Created agent {role_filled} with tools: {agent.tools}") + self.logger.debug(f"Created agent {role_filled} with tools: {agent.tools}") # Create tasks for the agent for task_name, task_details in details.get('tasks', {}).items(): @@ -596,7 +596,7 @@ def _run_praisonai(self, config, topic, tools_dict): create_directory=task_details.get('create_directory', False) ) - self.logger.info(f"Created task {task_name} with tools: {task.tools}") + self.logger.debug(f"Created task {task_name} with tools: {task.tools}") if self.task_callback: task.callback = self.task_callback @@ -613,6 +613,8 @@ def _run_praisonai(self, config, topic, tools_dict): task.context = context_tasks # Create and run the PraisonAI agents + memory = config.get('memory', False) + self.logger.debug(f"Memory: {memory}") if config.get('process') == 'hierarchical': agents = PraisonAIAgents( agents=list(agents.values()), @@ -620,12 +622,14 @@ def _run_praisonai(self, config, topic, tools_dict): verbose=True, process="hierarchical", manager_llm=config.get('manager_llm', 'gpt-4o'), + memory=memory ) else: agents = PraisonAIAgents( agents=list(agents.values()), tasks=tasks, - verbose=2 + verbose=2, + memory=memory ) self.logger.debug("Final Configuration:") diff --git a/praisonai/api/call.py b/praisonai/api/call.py index 63f8c84a..8f2440ee 100644 --- a/praisonai/api/call.py +++ b/praisonai/api/call.py @@ -50,7 +50,7 @@ # Try to import tools from the root directory tools = [] tools_path = os.path.join(os.getcwd(), 'tools.py') -logger.info(f"Tools path: {tools_path}") +logger.debug(f"Tools path: {tools_path}") def import_tools_from_file(file_path): spec = importlib.util.spec_from_file_location("custom_tools", file_path) @@ -63,9 +63,9 @@ def import_tools_from_file(file_path): if os.path.exists(tools_path): # tools.py exists in the root directory, import from file custom_tools_module = import_tools_from_file(tools_path) - logger.info("Successfully imported custom tools from root tools.py") + logger.debug("Successfully imported custom tools from root tools.py") else: - logger.info("No custom tools.py file found in the root directory") + logger.debug("No custom tools.py file found in the root directory") custom_tools_module = None if custom_tools_module: diff --git a/praisonai/cli.py b/praisonai/cli.py index 15f10f9a..0e652f2e 100644 --- a/praisonai/cli.py +++ b/praisonai/cli.py @@ -73,6 +73,12 @@ pass logging.basicConfig(level=os.environ.get('LOGLEVEL', 'INFO'), format='%(asctime)s - %(levelname)s - %(message)s') +logging.getLogger('alembic').setLevel(logging.ERROR) +logging.getLogger('gradio').setLevel(logging.ERROR) +logging.getLogger('gradio').setLevel(os.environ.get('GRADIO_LOGLEVEL', 'WARNING')) +logging.getLogger('rust_logger').setLevel(logging.WARNING) +logging.getLogger('duckduckgo').setLevel(logging.ERROR) +logging.getLogger('_client').setLevel(logging.ERROR) def stream_subprocess(command, env=None): """ diff --git a/praisonai/deploy.py b/praisonai/deploy.py index abebbf80..4a64c2cf 100644 --- a/praisonai/deploy.py +++ b/praisonai/deploy.py @@ -56,7 +56,7 @@ def create_dockerfile(self): file.write("FROM python:3.11-slim\n") file.write("WORKDIR /app\n") file.write("COPY . .\n") - file.write("RUN pip install flask praisonai==2.0.39 gunicorn markdown\n") + file.write("RUN pip install flask praisonai==2.0.40 gunicorn markdown\n") file.write("EXPOSE 8080\n") file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n') diff --git a/pyproject.toml b/pyproject.toml index 78d75b8b..e2ae87dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "PraisonAI" -version = "2.0.39" +version = "2.0.40" 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." readme = "README.md" license = "" @@ -84,7 +84,7 @@ autogen = ["pyautogen>=0.2.19", "praisonai-tools>=0.0.7", "crewai"] [tool.poetry] name = "PraisonAI" -version = "2.0.39" +version = "2.0.40" 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." authors = ["Mervin Praison"] license = "" diff --git a/uv.lock b/uv.lock index 9cc63a54..ff0aabf9 100644 --- a/uv.lock +++ b/uv.lock @@ -3060,7 +3060,7 @@ wheels = [ [[package]] name = "praisonai" -version = "2.0.39" +version = "2.0.40" source = { editable = "." } dependencies = [ { name = "instructor" },