Repository navigation
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
BinSquare
force-pushed
the
binsquare/smol-code-executor
branch
from
October 10, 2026 22:01
da241f7 to
66acc8a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Issue or Description of Change
Problem: ADK agents need an isolated way to run model-generated Python on a developer's own machine or on hosted capacity without giving that code the agent host's credentials or network access.
Solution: Add an opt-in
SmolCodeExecutorandgoogle-adk[smol]extra. Each code block runs in a fresh Smol Machines microVM (local by default, or Smol Cloud withtarget="cloud"), receives validated input files, and has a bounded timeout. Guest networking is off by default. The executor deletes the VM after each run; Cloud VMs also have an expiry if the client exits unexpectedly. Document setup, usage, and stateless behavior in the code executor guide.Testing Plan
Unit Tests:
PYTHONPATH=src .venv/bin/pytest -q tests/unittests/code_executors/test_smol_code_executor.py: 16 passed.uv build --wheelpassed; verified the built wheel contains the executor and both optional-extra dependency declarations.Manual End-to-End (E2E) Tests:
smolmachinesinstalled, runSmolCodeExecutor(target="local")andSmolCodeExecutor(target="cloud")withCodeExecutionInput(code="print('ready')"); both returned exit code 0 andreadyin live VMs.OPENAI_API_KEYset: guest code saw no key, and an attempted outbound TCP connection failed with the default guest networking setting.Checklist
Additional context
This executor is stateless by design: it starts with a clean filesystem for every code block. Local runs require KVM or macOS Hypervisor.framework; the SDK's published wheels support Linux and macOS. Cloud runs require a Smol Cloud token or an existing Smol CLI login.