Skip to content

Add Cloud Agent development environment - #1890

Draft
rguliyev wants to merge 1 commit into
mainfrom
cursor/add-cloud-agent-environment-d117
Draft

rguliyev wants to merge 1 commit into
mainfrom
cursor/add-cloud-agent-environment-d117

Conversation

@rguliyev

Copy link
Copy Markdown

What

Adds a Cursor Cloud Agent development environment for this monorepo so agents can install, build, run, and test the E2B SDKs end to end.

  • .cursor/environment.json — repository-managed environment config (default base image + install script).
  • .cursor/install.sh — idempotent bootstrap script.

How it works

The install script installs mise and uses it to provision the exact toolchain already pinned in the repo's top-level .tool-versions (single source of truth), then sets up the workspace:

  • Toolchain: node 22.18.0, pnpm 10.34.5, python 3.10, uv 0.10.0, bun 1.3.14, deno 2.8.1.
  • pnpm install --frozen-lockfile for the JS/TS workspace.
  • Builds the JS SDK (packages/js-sdk), which the CLI, code-interpreter, desktop packages and the typecheck/test scripts depend on.
  • uv sync for each Python package (python-sdk, code-interpreter-python, desktop-python).
  • Persists mise activation to ~/.bashrc so the toolchain is on PATH in the agent's shells.

The script is safe to re-run: mise install is a no-op when tools are present, and a duplicate .bashrc activation is guarded.

Validation

All checks were run on this environment and again on a fresh Cloud Agent booted from the resulting build:

  • pnpm run lint, pnpm run typecheck, pnpm run format — pass.
  • JS SDK pure-unit tests and live-sandbox tests — pass.
  • Python SDK pure-unit tests and live-sandbox tests — pass.
  • Install script runs cleanly and is idempotent (verified by running twice).
  • End-to-end: created real E2B cloud sandboxes with both the JS and Python SDKs and ran commands inside them.

Usage examples

After the environment is set up, an agent can run real sandboxes end to end.

JavaScript / TypeScript (built SDK):

import Sandbox from '/workspace/packages/js-sdk/dist/index.mjs'

const sbx = await Sandbox.create()
const res = await sbx.commands.run('echo "Hello from E2B JS SDK!"')
console.log(res.stdout) // Hello from E2B JS SDK!
await sbx.kill()

Python:

from e2b import Sandbox

with Sandbox.create() as sbx:
    res = sbx.commands.run('echo "Hello from E2B Python SDK!"')
    print(res.stdout)  # Hello from E2B Python SDK!

Requires E2B_API_KEY to be available in the environment (already injected as a secret for the Cloud Agent).

Notes

  • No changeset: this only adds Cloud Agent config and does not change the public surface of packages/cli, packages/js-sdk, or packages/python-sdk.
Open in Web Open in Cursor 

Configure a Cursor Cloud Agent environment for the E2B SDK monorepo. An
idempotent install script installs mise and the toolchain pinned in
.tool-versions (node, pnpm, python, uv, bun, deno), installs the pnpm
workspace, builds the JS SDK, and syncs the Python packages.

Co-authored-by: rauf.guliyev <rauf.guliyev@e2b.dev>
@cla-bot cla-bot Bot added the cla-signed label Sep 19, 2026
@changeset-bot

changeset-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cb0063

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 75737a6. Download artifacts from this workflow run.

JS SDK (e2b@2.51.1-cursor-add-cloud-agent-environment-d117.0):

npm install ./e2b-2.51.1-cursor-add-cloud-agent-environment-d117.0.tgz

CLI (@e2b/cli@2.20.1-cursor-add-cloud-agent-environment-d117.0):

npm install ./e2b-cli-2.20.1-cursor-add-cloud-agent-environment-d117.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.1-cursor-add-cloud-agent-environment-d117.0):

npm install ./e2b-code-interpreter-2.8.1-cursor-add-cloud-agent-environment-d117.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-cursor-add-cloud-agent-environment-d117.0):

npm install ./e2b-desktop-2.4.1-cursor-add-cloud-agent-environment-d117.0.tgz

Python SDK (e2b==2.51.0+cursor.add.cloud.agent.environment.d117):

pip install ./e2b-2.51.0+cursor.add.cloud.agent.environment.d117-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.0+cursor.add.cloud.agent.environment.d117):

pip install ./e2b_code_interpreter-2.10.0+cursor.add.cloud.agent.environment.d117-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.6.0+cursor.add.cloud.agent.environment.d117):

pip install ./e2b_desktop-2.6.0+cursor.add.cloud.agent.environment.d117-py3-none-any.whl

@mishushakov

Copy link
Copy Markdown
Member

is there some way to have a setup that works across Cursor, Devin, etc. ?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants