open-swe/agent/utils
Ramon Nogueira 5925a90a95
feat: migrate LangSmith sandbox creation to snapshot API (#1201)
* feat: migrate LangSmith sandbox creation to snapshot API

Replaces the template-based sandbox flow (DEFAULT_SANDBOX_TEMPLATE_NAME /
DEFAULT_SANDBOX_TEMPLATE_IMAGE) with the new snapshot-based flow.

- New required env var DEFAULT_SANDBOX_SNAPSHOT_ID (UUID of a pre-built
  LangSmith snapshot; build out-of-band via UI or SandboxClient.create_snapshot)
- Optional DEFAULT_SANDBOX_SNAPSHOT_FS_CAPACITY_BYTES overrides the root FS
  size at boot (default 32 GiB)
- Startup-time validation via a FastAPI lifespan hook: the server refuses
  to boot with a clear ValueError if SANDBOX_TYPE=langsmith and
  DEFAULT_SANDBOX_SNAPSHOT_ID is unset, so failures surface in boot logs
  rather than on the first thread
- Reconnect-to-existing-sandbox path unchanged
- Docs (INSTALLATION.md, CUSTOMIZATION.md) updated to describe the new
  snapshot workflow

* fix: format create_sandbox_snapshot.py to pass ruff

---------

Co-authored-by: aran-yogesh <yogesh.mahendran@langchain.dev>
2026-04-21 12:17:19 -07:00
..
auth.py fix: log all exceptions (#1089) 2026-03-19 10:26:26 -07:00
authorship.py fix: Add scripts for getting usage, fix dual committing (#1131) 2026-03-25 13:39:33 -07:00
comments.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
github.py feat: stop auto-cloning and let agent manage repo setup [closes OPE-21] (#1159) 2026-04-10 17:04:55 -07:00
github_app.py feat: add GitHub PR comment trigger and reply support [closes OPE-1] (#1014) 2026-03-09 17:14:13 -07:00
github_comments.py feat: stop auto-cloning and let agent manage repo setup [closes OPE-21] (#1159) 2026-04-10 17:04:55 -07:00
github_token.py feat: add GitHub PR comment trigger and reply support [closes OPE-1] (#1014) 2026-03-09 17:14:13 -07:00
github_user_email_map.py adding myself as user (#1162) 2026-04-03 15:52:04 -07:00
langsmith.py feat: send LangSmith trace URL on run trigger from Slack and Linear (#1057) 2026-03-18 12:17:45 -07:00
linear.py feat: add linear tools for listing teams, get/create/update/delete issues, and get issue comments (#1105) 2026-03-23 14:32:44 -07:00
linear_team_repo_map.py chore: Add langsmith deployments data plane linear project (#1044) 2026-03-09 18:36:00 -07:00
messages.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
model.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
multimodal.py feat: add Slack image support with url_private auth and content-type validation [closes: OPE-23] (#1073) 2026-03-20 14:34:14 -07:00
repo.py feat: extract repo parsing into shared util, add linear comment repo override (#1103) 2026-03-20 13:34:00 -07:00
sandbox.py feat: migrate LangSmith sandbox creation to snapshot API (#1201) 2026-04-21 12:17:19 -07:00
sandbox_paths.py fix: better custom backend support (#1071) 2026-03-17 11:55:36 -07:00
sandbox_state.py fix: better custom backend support (#1071) 2026-03-17 11:55:36 -07:00
slack.py fix: convert @Name(USER_ID) mentions to Slack's <@USER_ID> format in thread replies (#1126) 2026-03-25 11:51:11 -07:00