diff --git a/python_a2a/agent_flow/utils/agent_manager.py b/python_a2a/agent_flow/utils/agent_manager.py index 454aa21..8f6fc8a 100644 --- a/python_a2a/agent_flow/utils/agent_manager.py +++ b/python_a2a/agent_flow/utils/agent_manager.py @@ -6,6 +6,7 @@ """ import os +import shlex import time import json import logging @@ -193,9 +194,9 @@ def start_agent_server( logger.info(f"Starting agent server with command: {command}") # Start the server process + cmd_args = shlex.split(command) if isinstance(command, str) else command process = subprocess.Popen( - command, - shell=True, + cmd_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True