diff --git a/python_a2a/agent_flow/utils/agent_manager.py b/python_a2a/agent_flow/utils/agent_manager.py index 454aa21..68504bb 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 @@ -194,8 +195,8 @@ def start_agent_server( # Start the server process process = subprocess.Popen( - command, - shell=True, + shlex.split(command) if isinstance(command, str) else command, + shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True