feat: add Vercel Sandbox backend#17127
Closed
scotttrinh wants to merge 1 commit into
Closed
Conversation
Add Vercel Sandbox as a supported terminal backend. The backend uses Hermes' shared environment contract, syncs Hermes-managed files, supports snapshot-backed filesystem persistence, and keeps background commands on the same generic non-local flow used by the other sandbox providers.
kshitijk4poor
pushed a commit
that referenced
this pull request
Apr 29, 2026
Adds Vercel Sandbox as a supported Hermes terminal backend alongside existing providers (Local, Docker, Modal, SSH, Daytona, Singularity). Uses the Vercel Python SDK to create/manage cloud microVMs, supports snapshot-based filesystem persistence keyed by task_id, and integrates with the existing BaseEnvironment shell contract and FileSyncManager for credential/skill syncing. Based on #17127 by @scotttrinh, cherry-picked onto current main.
Collaborator
|
Merged via PR #17445. Your commit was cherry-picked onto current main with your authorship preserved in git log. The salvage discarded stale-branch regressions in gateway/run.py (115 commits behind) and added a follow-up commit addressing self-review findings (hardline blocklist test coverage, runtime constant deduplication, security docs, env var docs). Thanks for the excellent contribution, @scotttrinh! |
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
Adds Vercel Sandbox as a supported Hermes terminal backend alongside existing providers (Local, Docker, Modal, SSH, Daytona, Singularity). Uses the Vercel Python SDK to create/manage cloud microVMs, supports snapshot-based filesystem persistence keyed by task_id, and integrates with the existing BaseEnvironment shell contract and FileSyncManager for credential/skill syncing. Based on NousResearch#17127 by @scotttrinh, cherry-picked onto current main.
jsboige
pushed a commit
to jsboige/hermes-agent
that referenced
this pull request
May 14, 2026
Adds Vercel Sandbox as a supported Hermes terminal backend alongside existing providers (Local, Docker, Modal, SSH, Daytona, Singularity). Uses the Vercel Python SDK to create/manage cloud microVMs, supports snapshot-based filesystem persistence keyed by task_id, and integrates with the existing BaseEnvironment shell contract and FileSyncManager for credential/skill syncing. Based on NousResearch#17127 by @scotttrinh, cherry-picked onto current main.
dannyJ848
pushed a commit
to dannyJ848/hermes-agent
that referenced
this pull request
May 17, 2026
Adds Vercel Sandbox as a supported Hermes terminal backend alongside existing providers (Local, Docker, Modal, SSH, Daytona, Singularity). Uses the Vercel Python SDK to create/manage cloud microVMs, supports snapshot-based filesystem persistence keyed by task_id, and integrates with the existing BaseEnvironment shell contract and FileSyncManager for credential/skill syncing. Based on NousResearch#17127 by @scotttrinh, cherry-picked onto current main.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
Adds Vercel Sandbox as a supported Hermes terminal backend alongside existing providers (Local, Docker, Modal, SSH, Daytona, Singularity). Uses the Vercel Python SDK to create/manage cloud microVMs, supports snapshot-based filesystem persistence keyed by task_id, and integrates with the existing BaseEnvironment shell contract and FileSyncManager for credential/skill syncing. Based on NousResearch#17127 by @scotttrinh, cherry-picked onto current main.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
Adds Vercel Sandbox as a supported Hermes terminal backend alongside existing providers (Local, Docker, Modal, SSH, Daytona, Singularity). Uses the Vercel Python SDK to create/manage cloud microVMs, supports snapshot-based filesystem persistence keyed by task_id, and integrates with the existing BaseEnvironment shell contract and FileSyncManager for credential/skill syncing. Based on NousResearch#17127 by @scotttrinh, cherry-picked onto current main.
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.
What does this PR do?
Adds Vercel Sandbox as a supported Hermes terminal backend, alongside existing sandbox providers such as Modal and Daytona.
The backend uses Hermes' shared
BaseEnvironmentcontract, syncs Hermes-managed files throughFileSyncManager, supports Vercel snapshot-backed filesystem persistence forcontainer_persistent=true, and exposes Vercel through the existing terminal/file/execute_coderuntime-selection path rather than as a new model-facing tool family.Vercel Sandbox exposes higher-level APIs for interacting with background processes, and we considered a broader integration that would take advantage of those native capabilities. For this first introduction, this PR keeps the implementation narrow and consistent with the other Hermes sandbox providers: background commands use Hermes' existing generic non-local background-process flow. Snapshot persistence means filesystem state can be restored for the same task; it does not mean the same sandbox VM, PID namespace, shell state, or running background jobs survive.
Related Issue
Fixes #
Type of Change
Changes Made
tools/environments/vercel_sandbox.py, a lazy-imported Vercel Sandbox backend that creates/restores sandboxes, runs commands through Hermes' shell contract, uploads Hermes-managed files, retries transient create/write failures, and syncs remote.hermes/changes back during cleanup.vercel_sandboxinto terminal and code execution flows intools/terminal_tool.py,tools/code_execution_tool.py,tools/file_tools.py,tools/approval.py, andtools/skills_tool.py.HERMES_HOME, keyed bytask_id, with stale snapshot fallback to fresh sandbox creation.hermes_cli/config.py,hermes_cli/setup.py,hermes_cli/status.py,hermes_cli/doctor.py,hermes_cli/web_server.py,gateway/run.py, andcli.py. Setup now prompts for long-lived access-token auth (VERCEL_TOKEN,VERCEL_PROJECT_ID,VERCEL_TEAM_ID) and can prefill project/team IDs from the nearest.vercel/project.json.terminal.vercel_runtime/TERMINAL_VERCEL_RUNTIMEsupport with supported runtimesnode24,node22, andpython3.13.hermes-agent[vercel].VERCEL_OIDC_TOKEN,VERCEL_TOKEN,VERCEL_PROJECT_ID, andVERCEL_TEAM_ID.website/docs/user-guide/configuration.mdandwebsite/docs/user-guide/features/tools.md.How to Test
Automated regression tests
Run the focused regression set:
Live Vercel Sandbox smoke test
Create or sign in to a Vercel account.
Go to https://vercel.com/signup if you do not already have an account.
Create or select the Vercel team you want Hermes to use for sandbox execution.
Install the Vercel CLI:
If you do not use pnpm, install with your usual global Node package manager, for example
npm i -g vercel.Confirm the CLI is available:
Log in:
Follow the browser/email flow until the CLI reports that you are authenticated.
Create or select a Vercel project.
In the Vercel dashboard, select the correct team, then create a project from the dashboard.
Alternatively, from the CLI, create or inspect projects with:
Create a Vercel access token and collect project/team IDs.
projectIdasVERCEL_PROJECT_IDand the owning team'sorgIdasVERCEL_TEAM_ID..vercel/project.json.Install the Hermes Vercel optional dependency, select the backend, and configure access-token auth:
When prompted by
hermes setup terminal, choose Vercel Sandbox and enter:VERCEL_TOKENVERCEL_PROJECT_IDVERCEL_TEAM_IDRun Hermes:
In the chat session, ask Hermes to run a simple terminal command such as:
Expected result: the command runs in Vercel Sandbox, with the default workspace rooted around
/vercel/sandbox.For one-off local development only, runtime still accepts a short-lived OIDC token instead of saved access-token auth:
OIDC tokens are short-lived and are not the recommended path for Render/Railway/Docker deployments or other long-running Hermes processes.
Optional persistence check:
terminal.container_persistentenabled, ask Hermes to create a small file in the sandbox.Optional background check:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Running Hermes Agent Chat
hermes statushermes doctor