Sandfort
v0.1.0Self-hosted sandboxes for AI-generated code: run commands, files, snapshots.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_sandbox
Create a sandbox and wait until it is started. Returns JSON with its id and state.
| Parameter | Type | Description |
|---|---|---|
name | ||
snapshot |
run_code
Run a code snippet in a sandbox. Returns JSON with exit_code, stdout and stderr.
| Parameter | Type | Description |
|---|---|---|
code * | string | |
language * | string | |
sandbox_id * | string | |
timeout_seconds | integer |
run_command
Run a shell command in a sandbox. Returns JSON with exit_code, stdout and stderr.
| Parameter | Type | Description |
|---|---|---|
command * | string | |
sandbox_id * | string | |
cwd | ||
timeout_seconds | integer |
upload_text_file
Write text content (UTF-8) to a file path inside a sandbox, replacing any existing file.
| Parameter | Type | Description |
|---|---|---|
content * | string | |
path * | string | |
sandbox_id * | string |
download_text_file
Read a UTF-8 text file from a sandbox. Files over 1 MiB are refused.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
sandbox_id * | string |
list_directory
List a directory in a sandbox. Returns JSON with path, entries and truncated. Each entry has name, path, kind, size_bytes, mode and modified_at. At most 1000 entries are returned; when truncated is true the rest is left out.
| Parameter | Type | Description |
|---|---|---|
sandbox_id * | string | |
path | string |
stat_path
Describe one file, directory or symlink in a sandbox. Returns a JSON entry.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
sandbox_id * | string |
make_directory
Create a directory in a sandbox, with missing parents by default. Returns JSON with path and created.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
sandbox_id * | string | |
parents | boolean |
delete_path
Delete a file or directory in a sandbox. Returns JSON with path and deleted. recursive=True removes a whole directory tree; use it with care.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
sandbox_id * | string | |
recursive | boolean |
upload_binary_file
Write base64-encoded bytes to a file path inside a sandbox. Content over 1 MiB (decoded) is refused. An existing file is replaced unless overwrite is false.
| Parameter | Type | Description |
|---|---|---|
content_base64 * | string | |
path * | string | |
sandbox_id * | string | |
overwrite | boolean |
download_binary_file
Read a file from a sandbox as base64. Files over 1 MiB are refused. Returns JSON with path, size_bytes and content_base64; base64 inflates the output by about a third.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
sandbox_id * | string |
list_sandboxes
List sandboxes. Returns a JSON array of rows with id, name and state. Returns live sandboxes only: destroyed and deleting sandboxes are left out.
delete_sandbox
Delete a sandbox by id.
| Parameter | Type | Description |
|---|---|---|
sandbox_id * | string |
create_snapshot
Create a named snapshot from a sandbox. Returns JSON with the snapshot id and state.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
sandbox_id * | string |