Agentic Data Plane

rpk ai sandbox

Create, inspect and delete sandboxes, and run commands and move files in them.

The create, get, list and delete commands manage the sandbox itself. Use the other commands to run commands, work with files, check usage or wake an idle sandbox. Each command’s help lists the permissions it needs.

A sandbox is created from a template (sandbox-template) and never changes afterwards, so there is no update. It rests on its own when idle, and any command or file call, or wake, brings it back.

sbx is short for sandbox: rpk ai sbx ls dev /workspace.

Usage

rpk ai sandbox [flags]

Subcommands

Command Description

rpk ai sandbox apply

Create sandboxes from one or more YAML manifests. For each manifest: create the sandbox if absent, leave a matching one alone, and fail if a field the manifest sets differs from the live sandbox.

rpk ai sandbox attach

Attach to a process that is running in a sandbox, usually one that rpk ai sandbox shell left running after Ctrl+] then d, or one that a lost connection left behind. A process on a terminal needs a terminal here too, and is redrawn at your terminal’s size.

rpk ai sandbox cp

Copy a file or directory between the local machine and a sandbox, the way docker cp does. One of SRC and DST is SANDBOX:PATH, where SANDBOX is a sandbox id or sandboxes/{id}; the other is a local path.

rpk ai sandbox create

Create a Sandbox.

rpk ai sandbox delete

Delete a Sandbox.

rpk ai sandbox diff

Dry-run of apply for sandboxes. Prints, per manifest, whether apply would create, update (and which fields), or leave the resource unchanged.

rpk ai sandbox exec

Run a command in a sandbox and print what it wrote after it exits. A single COMMAND argument is a shell script, run with bash (sh in an image without bash).

rpk ai sandbox get

Get a Sandbox.

rpk ai sandbox list

List Sandboxes.

rpk ai sandbox ls

List the entries of a directory at an absolute sandbox path. Requires Sandbox.list_directory on the sandbox.

rpk ai sandbox ps

List the processes the sandbox runtime tracks: those started by shell, exec and the agent’s sandbox tools, not every OS process. For OS processes, run rpk ai sandbox exec SANDBOX — ps aux.

rpk ai sandbox read-file

Read a file at an absolute sandbox path and write its raw bytes to stdout or a local file. Pass --output - for stdout.

rpk ai sandbox shell

Open an interactive shell in a sandbox, or run a command in it. Without a command, the shell is bash, or sh in an image without bash.

rpk ai sandbox top

Show what a running sandbox uses: memory, CPU seconds, processes and the /workspace volume. Reading usage neither wakes the sandbox nor counts as activity, so a sandbox at rest fails with FAILED_PRECONDITION: wake it first.

rpk ai sandbox wake

Wake a sandbox that is at rest, and return after it runs again. Its /workspace and /tmp are as they were.

rpk ai sandbox write-file

Write a file at an absolute sandbox path from a local file or stdin. The file is replaced as a whole, and missing parent directories are created.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.