Skip to content

Update GkeCodeExecutor with option to use Agent Sandbox #3263

@brandonroyal

Description

@brandonroyal

For users deploying ADK on Kubernetes and using GKE for Code Execution (https://google.github.io/adk-docs/tools/built-in-tools/#gke-code-executor), it would be great to leverage the faster startup latency and more granular control in Agent Sandbox (https://github.com/kubernetes-sigs/agent-sandbox)

I would like to see an additional type option in the GkeCodeExecutor which expands for the Sandbox type (https://github.com/kubernetes-sigs/agent-sandbox/blob/main/k8s/crds/agents.x-k8s.io_sandboxes.yaml). This would augment the current type: job which exists today. For backwards compatibility and stability, I'd expect the type = 'job' to be the default - at least until the Sandbox API graduates and stabilizes.

gke_executor = GkeCodeExecutor(
    ...
    type="sandbox"
    ...
)

When ADK instantiates a code execution request via the GkeCodeExecutor of type sandbox, ADK will create a SandboxClaim object. Once fulfilled with a Sandbox, ADK will execute the code and return the result. K8s administrators will have the option to configure things like WarmPools for low-latency execution and SandboxTemplates for ease of use. I will expect these administrator configuration will work as expected when SandboxClaims are instantiated via GkeCodeExecutor.

Metadata

Metadata

Assignees

Labels

help wanted[Community] Extra attention is neededneeds-review[Status] The PR is awaiting review from the maintainertools[Component] This issue is related to tools

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions