From 62ffacfeab64f33f30a7243b1c8f18ef33c9b016 Mon Sep 17 00:00:00 2001 From: Elisabeth Rulke Date: Fri, 10 Jul 2026 17:13:37 -0400 Subject: [PATCH] fix(vercel): use python3.13 runtime in Vercel Sandbox Python examples The Vercel Sandbox Python examples call Sandbox.create() with no runtime, which defaults to node24 (Vercel's JavaScript runtime), then run Python. Following them as written fails: python/pip/uv are only present on the python3.13 runtime. Reproduced live (langchain-vercel-sandbox 0.0.1 + vercel 0.5.9): Sandbox.create() -> node24 backend.execute("python --version") => "bash: python: command not found", exit 127 Sandbox.create(runtime="python3.13") backend.execute("python --version") => "Python 3.13.1", exit 0 Adds runtime="python3.13" to the 7 Vercel Python snippets. The JS example already sets runtime: "node24" and runs TypeScript, so it is unaffected. --- src/oss/deepagents/sandboxes.mdx | 6 +++--- src/oss/python/integrations/sandboxes/vercel.mdx | 4 ++-- src/snippets/deepagents-sandbox-basic-py.mdx | 2 +- src/snippets/sandboxes-basic-tabs-py.mdx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/oss/deepagents/sandboxes.mdx b/src/oss/deepagents/sandboxes.mdx index 1ff8d10684..bd9d731877 100644 --- a/src/oss/deepagents/sandboxes.mdx +++ b/src/oss/deepagents/sandboxes.mdx @@ -452,7 +452,7 @@ You can also call the backend `execute()` method directly in your application co from langchain_vercel_sandbox import VercelSandbox - sandbox = Sandbox.create() + sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) try: @@ -705,7 +705,7 @@ Use `upload_files()` to populate the sandbox before the agent runs. Paths must b from langchain_vercel_sandbox import VercelSandbox - sandbox = Sandbox.create() + sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) backend.upload_files( @@ -877,7 +877,7 @@ Use `download_files()` to retrieve files from the sandbox after the agent finish from langchain_vercel_sandbox import VercelSandbox - sandbox = Sandbox.create() + sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) results = backend.download_files(["/src/index.py", "/output.txt"]) diff --git a/src/oss/python/integrations/sandboxes/vercel.mdx b/src/oss/python/integrations/sandboxes/vercel.mdx index c7161b4302..1503a56d89 100644 --- a/src/oss/python/integrations/sandboxes/vercel.mdx +++ b/src/oss/python/integrations/sandboxes/vercel.mdx @@ -36,7 +36,7 @@ from vercel.sandbox import Sandbox from langchain_vercel_sandbox import VercelSandbox -sandbox = Sandbox.create() +sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) try: @@ -55,7 +55,7 @@ from langchain_anthropic import ChatAnthropic from deepagents import create_deep_agent from langchain_vercel_sandbox import VercelSandbox -sandbox = Sandbox.create() +sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) agent = create_deep_agent( diff --git a/src/snippets/deepagents-sandbox-basic-py.mdx b/src/snippets/deepagents-sandbox-basic-py.mdx index b9d83d7728..f280678701 100644 --- a/src/snippets/deepagents-sandbox-basic-py.mdx +++ b/src/snippets/deepagents-sandbox-basic-py.mdx @@ -237,7 +237,7 @@ from langchain_vercel_sandbox import VercelSandbox from vercel.sandbox import Sandbox - sandbox = Sandbox.create() + sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) agent = create_deep_agent( diff --git a/src/snippets/sandboxes-basic-tabs-py.mdx b/src/snippets/sandboxes-basic-tabs-py.mdx index 449810d94c..ecd6eeac27 100644 --- a/src/snippets/sandboxes-basic-tabs-py.mdx +++ b/src/snippets/sandboxes-basic-tabs-py.mdx @@ -183,7 +183,7 @@ import DeepagentsSandboxBasicDaytonaPy from '/snippets/code-samples/deepagents-s from langchain_vercel_sandbox import VercelSandbox from vercel.sandbox import Sandbox - sandbox = Sandbox.create() + sandbox = Sandbox.create(runtime="python3.13") backend = VercelSandbox(sandbox=sandbox) agent = create_deep_agent(