Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config.yaml.full
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ tool:
dataset_id: #dataset name
mcp_router:
url: #mcp sse/streamable-http url
code_sandbox:
url: #mcp sse/streamable-http url
api_key: #mcp api key
browser_sandbox:
url: #mcp sse/streamable-http url
api_key: #mcp api key
computer_sandbox:
url: #mcp sse/streamable-http url
api_key: #mcp api key


observability:
Expand Down
28 changes: 19 additions & 9 deletions veadk/tools/sandbox/browser_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.

browser_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 browser_use(prompt: str) -> str:
"""Using the remote browser sandbox to according to the prompt.
url = getenv("TOOL_BROWSER_SANDBOX_URL")

Args:
prompt (str): The prompt to be used.

Returns:
str: The response from the sandbox.
"""
...
browser_sandbox = MCPToolset(connection_params=get_mcp_params(url=url))

# browser_sandbox = ...


# def browser_use(prompt: str) -> str:
# """Using the remote browser sandbox to according to the prompt.

# Args:
# prompt (str): The prompt to be used.

# Returns:
# str: The response from the sandbox.
# """
# ...
32 changes: 21 additions & 11 deletions veadk/tools/sandbox/code_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,29 @@
# See the License for the specific language governing permissions and
# limitations under the License.

code_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 code_execution(code: str, language: str) -> str:
"""Execute code in sandbox.
url = getenv("TOOL_CODE_SANDBOX_URL")

Args:
code (str): The code to be executed.
language (str): The language of the code.

Returns:
str: The response from the sandbox.
"""
code_sandbox = MCPToolset(connection_params=get_mcp_params(url=url))

res = code_sandbox(code, language)
return res
# code_sandbox = ...


# def code_execution(code: str, language: str) -> str:
# """Execute code in sandbox.

# Args:
# code (str): The code to be executed.
# language (str): The language of the code.

# Returns:
# str: The response from the sandbox.
# """

# res = code_sandbox(code, language)
# return res
25 changes: 16 additions & 9 deletions veadk/tools/sandbox/computer_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset

computer_sandbox = ...
from veadk.config import getenv
from veadk.utils.mcp_utils import get_mcp_params

url = getenv("TOOL_COMPUTER_SANDBOX_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.
computer_sandbox = MCPToolset(connection_params=get_mcp_params(url=url))

Returns:
str: The response from the sandbox.
"""
...

# 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.
# """
# ...