> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# deepagents sandboxes

Requires Python 3.11+ and the `contree-sdk[langchain]` extra. See
[LangChain DeepAgents](https://docs.tokenfactory.nebius.com/sandboxes/sdk/integrations/langchain.md) for executable scenarios. Adapters accept the
public executor contracts; they do not require concrete session implementations.
Other inherited `BaseSandbox` tools belong to deepagents.

## `class ContreeAsyncSandbox`

```python theme={null}
class contree_sdk.langchain.ContreeAsyncSandbox(session)
```

A deepagents sandbox with native asynchronous session operations.

### Attributes

**id** `str`

### Methods

#### `adownload_files()`

```python theme={null}
async def adownload_files(paths) -> list[FileDownloadResponse]
```

**paths** *required*

**returns** `list[FileDownloadResponse]`

#### `aexecute()`

```python theme={null}
async def aexecute(command, *, timeout) -> ExecuteResponse
```

**command** *required*

**timeout** (default: None)

**returns** `ExecuteResponse`

#### `aupload_files()`

```python theme={null}
async def aupload_files(files) -> list[FileUploadResponse]
```

**files** *required*

**returns** `list[FileUploadResponse]`

#### `download_files()`

```python theme={null}
def download_files(paths) -> list[FileDownloadResponse]
```

**paths** *required*

**returns** `list[FileDownloadResponse]`

#### `download_one_file()`

```python theme={null}
async def download_one_file(path) -> FileDownloadResponse
```

**path** *required*

**returns** `FileDownloadResponse`

#### `execute()`

```python theme={null}
def execute(command, *, timeout) -> ExecuteResponse
```

**command** *required*

**timeout** (default: None)

**returns** `ExecuteResponse`

#### `upload_files()`

```python theme={null}
def upload_files(files) -> list[FileUploadResponse]
```

**files** *required*

**returns** `list[FileUploadResponse]`

## `class ContreeSandbox`

```python theme={null}
class contree_sdk.langchain.ContreeSandbox(session)
```

A deepagents adapter for any SyncExecutor implementation.

Mutating calls on this adapter are serialized. The executor remains
caller-owned. deepagents may dispatch async calls through a thread pool;
use ContreeAsyncSandbox for a native async executor.

### Attributes

**id** `str`

### Methods

#### `download_files()`

```python theme={null}
def download_files(paths) -> list[FileDownloadResponse]
```

**paths** *required*

**returns** `list[FileDownloadResponse]`

#### `download_one_file()`

```python theme={null}
def download_one_file(path) -> FileDownloadResponse
```

**path** *required*

**returns** `FileDownloadResponse`

#### `execute()`

```python theme={null}
def execute(command, *, timeout) -> ExecuteResponse
```

**command** *required*

**timeout** (default: None)

**returns** `ExecuteResponse`

#### `upload_files()`

```python theme={null}
def upload_files(files) -> list[FileUploadResponse]
```

**files** *required*

**returns** `list[FileUploadResponse]`
