Skip to content

Conversation

@ArthurKamalov
Copy link

This PR introduces the guide on how to create an ADK agent to use the sandbox agent as a tool.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ArthurKamalov
Once this PR has been reviewed and has the lgtm label, please assign soltysh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 1, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @ArthurKamalov. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 1, 2025
@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for agent-sandbox ready!

Name Link
🔨 Latest commit 5b47bb9
🔍 Latest deploy log https://app.netlify.com/projects/agent-sandbox/deploys/692df767f102ad00081afb6b
😎 Deploy Preview https://deploy-preview-195--agent-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@janetkuo
Copy link
Member

janetkuo commented Dec 1, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 1, 2025
@k8s-ci-robot
Copy link
Contributor

@ArthurKamalov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
presubmit-test-autogen-up-to-date 5b47bb9 link true /test presubmit-test-autogen-up-to-date

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.


5. Install the dependencies:
```sh
pip install -r requirements.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install using git

Suggested change
pip install -r requirements.txt
export VERSION="main"
pip install google-adk==1.19.0 "git+https://github.com/kubernetes-sigs/agent-sandbox.git@${VERSION}#subdirectory=clients/python/agentic-sandbox-client"

@@ -0,0 +1,50 @@
# Use Agent Sanbox code interpreter an Agent Tool.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Use Agent Sanbox code interpreter an Agent Tool.
# Using Agent Sandbox as a Tool in Agent Development Kit (ADK)

@@ -0,0 +1,50 @@
# Use Agent Sanbox code interpreter an Agent Tool.

The guide will guide you through the process of creating a simple [ADK](https://google.github.io/adk-docs/) agent that is able to use agent sandbox as a tool.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid repetitive "guide will guide"

Suggested change
The guide will guide you through the process of creating a simple [ADK](https://google.github.io/adk-docs/) agent that is able to use agent sandbox as a tool.
The guide walks you through the process of creating a simple [ADK](https://google.github.io/adk-docs/) agent that is able to use agent sandbox as a tool.

pip install -r requirements.txt
```

6. Set you API key to get access the Gemini model that is used in this example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. Set you API key to get access the Gemini model that is used in this example:
6. Set your API key to access the Gemini model that is used in this example:


## Testing

1. Open agent's page: http://127.0.0.1:8000.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Open agent's page: http://127.0.0.1:8000.
1. Open the agent's page: http://127.0.0.1:8000.

def execute_python(code: str):
with SandboxClient(
template_name="python-sandbox-template",
namespace="default"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes this exact template already exists in the cluster, but the example didn't mention that

@@ -0,0 +1,8 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we avoid adding more docs in the site, given that the links and graphs don't render well in the site yet (they work better in md). We should add those after the issues are fixed, for better UX.


3. Move into this example's folder:
```sh
cd examples/code-interpreter-agent-on-adk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since agent.py is only ~20 lines long, maybe we can simplify this guide by removing the 'clone repository' requirement?

We could structure it as a 'build from scratch' tutorial:

  1. Use the pip install ... command (with the git URL) to install dependencies.
  2. Run adk create coding_agent to scaffold the folder.
  3. Ask the user to copy-paste the code into agent.py.
  4. adk web coding_agent

This allows users to try the example quickly without downloading the full agent-sandbox repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants