From b181d282ca76c525242b5d246a5ec6cf20e0d3cf Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 29 Aug 2025 15:46:39 +0800 Subject: [PATCH] support sandbox for cua --- veadk/tools/sandbox/computer_sandbox.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/veadk/tools/sandbox/computer_sandbox.py b/veadk/tools/sandbox/computer_sandbox.py index 99d93e76..120bd606 100644 --- a/veadk/tools/sandbox/computer_sandbox.py +++ b/veadk/tools/sandbox/computer_sandbox.py @@ -12,16 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -computer_sandbox = ... +from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset +from veadk.config import getenv +from veadk.utils.mcp_utils import get_mcp_params -def computer_use(prompt: str) -> str: - """Using the remote computer sandbox to according to the prompt. +url = getenv("TOOL_COMPUTER_SANDBOX_URL") - Args: - prompt (str): The prompt to be used. - Returns: - str: The response from the sandbox. - """ - ... +computer_sandbox = MCPToolset(connection_params=get_mcp_params(url=url)) + +# def computer_use(prompt: str) -> str: +# """Using the remote computer sandbox to according to the prompt. + +# Args: +# prompt (str): The prompt to be used. + +# Returns: +# str: The response from the sandbox. +# """ +# ...