Sandfort

v0.1.0
io.github.malinele/sandfort Checked 1 hour ago Published 8 days ago

Self-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.

ParameterTypeDescription
name
snapshot

run_code

Run a code snippet in a sandbox. Returns JSON with exit_code, stdout and stderr.

ParameterTypeDescription
code *string
language *string
sandbox_id *string
timeout_secondsinteger

run_command

Run a shell command in a sandbox. Returns JSON with exit_code, stdout and stderr.

ParameterTypeDescription
command *string
sandbox_id *string
cwd
timeout_secondsinteger

upload_text_file

Write text content (UTF-8) to a file path inside a sandbox, replacing any existing file.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
sandbox_id *string
pathstring

stat_path

Describe one file, directory or symlink in a sandbox. Returns a JSON entry.

ParameterTypeDescription
path *string
sandbox_id *string

make_directory

Create a directory in a sandbox, with missing parents by default. Returns JSON with path and created.

ParameterTypeDescription
path *string
sandbox_id *string
parentsboolean

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.

ParameterTypeDescription
path *string
sandbox_id *string
recursiveboolean

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.

ParameterTypeDescription
content_base64 *string
path *string
sandbox_id *string
overwriteboolean

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.

ParameterTypeDescription
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.

ParameterTypeDescription
sandbox_id *string

create_snapshot

Create a named snapshot from a sandbox. Returns JSON with the snapshot id and state.

ParameterTypeDescription
name *string
sandbox_id *string