import { Guides } from '@/components/Guides'
import { UseCases } from '@/components/UseCases'
import { HeroPattern } from '@/components/HeroPattern'
import { Button } from '@/components/Button'
import { ButtonLoginToken } from '@/components/ButtonLoginToken'
import { useSignIn } from '@/utils/useSignIn'


<HeroPattern />

# Sandbox Runtime for Large Language Models

Sandboxes allow AI apps to have long running cloud environments where large language models can use the same tools as humans do. {{ className: 'lead' }}

## Use cases
Our Sandboxes are general purpose machines powered by Ubuntu. Most of the things your AI app or agent can do locally can also be done in our sandboxes.
Here are a few use cases:

- **AI data analysis**
- **Code interpreter**
- **Run LLM-generated code**
- **Coding copilots and agents**
- **AI powered browsers in the cloud**

## Quick start

### 1. Create an account
<Button variant="textLink">Sign in</Button> with your GitHub acccount.

### 2. Get your API key
After sign in, get [your API key](/getting-started/api-key) and set it in the `E2B_API_KEY` environment variable.

### 3. Install the E2B SDK
We offer both JS and Python SDK.

<CodeGroup isRunnable={false}>
```bash {{ language: 'js' }}
npm install @e2b/sdk
```

```bash {{ language: 'python' }}
pip install e2b
```
</CodeGroup>

### 4. Start up the sandbox
Sandbox is an isolated cloud environment for your AI app, agent, assistant, etc.

<CodeGroup isRunnable={false}>
```js {{ language: 'js' }}
// 1. Import E2B
import { Sandbox } from '@e2b/sdk'

// 2. Get your Sandbox session
const sandbox = await Sandbox.create()

// 3. Close the sandbox once done
await sandbox.close()
```

```python {{ language: 'python' }}
# 1. Import E2B
from e2b import Sandbox

# 2. Get your Sandbox session
sandbox = Sandbox()

# 3. Close the sandbox once done
sandbox.close()
```
</CodeGroup>

{/* <Note>
By default the `base` sandbox supports NodeJS 20 and Python 3.10. If you want customize your sandbox (copy files, install dependencies, etc), check out [Sandbox Templates](/sandbox/templates/custom).
</Note> */}

### Custom sandboxes
You can create a custom sandbox with preinstalled libraries and prepared files by creating your own [Sandbox Template](/sandbox/templates/overview).

{/* We offer a few [premade sandbox templates](/sandbox/template/prebuilt) for common use cases such as building code interpreters or AI browser assistans. */}

### 🎉 Build your AI app

Now you can let your AI app control the sandbox by using [Sandbox API](/sandbox/api/envs).

{/* - [Run any code](/agents/exec) and terminal command in a sandboxed environment
- [Start any process](/playgrounds/process) (even long-running such as a database)
- [Run any shell command](/agents/shell-commands)
- [Upload and download files](/playgrounds/filesystem#write-bytes)
- Install dependencies and programs
- [Use filesystem](/playgrounds/filesystem)
- Access the internet
- Start a web server that's accessible from the internet
- [Clone git repositories](/agents/clone-repo)

<div className="not-prose mb-16 mt-6 flex items-center gap-3">
  <Button
    href="/getting-started/installation"
    arrow="right"
    children="Getting Started"
  />
  <ButtonLoginToken />
</div>


## Start cloud playground


<CodeGroupAutoload
  path="quickstart"
  isRunnable={false}
/> */}
