-
Notifications
You must be signed in to change notification settings - Fork 63
Agent Sandbox with ADK agent #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Agent Sandbox with ADK agent #195
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ArthurKamalov 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 |
|
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 Once the patch is verified, the new status will be reflected by the 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. |
✅ Deploy Preview for agent-sandbox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/ok-to-test |
|
@ArthurKamalov: The following test failed, say
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install using git
| 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. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # 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. | |||
There was a problem hiding this comment.
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"
| 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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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" |
There was a problem hiding this comment.
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 @@ | |||
| --- | |||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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:
- Use the pip install ... command (with the git URL) to install dependencies.
- Run
adk create coding_agentto scaffold the folder. - Ask the user to copy-paste the code into
agent.py. adk web coding_agent
This allows users to try the example quickly without downloading the full agent-sandbox repo.
This PR introduces the guide on how to create an ADK agent to use the sandbox agent as a tool.