Agentic Data Plane

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. A field the manifest omits is not compared: the live sandbox keeps what it has, though a create from the manifest would leave it empty.

Manifests round-trip with get -o yaml for this resource, which is how to start from a complete one. Pass -f - to read stdin.

This does not delete sandboxes absent from the manifests (no prune); see diff --help.

A manifest names the sandbox by its full resource name, sandboxes/<id>, as get -o yaml prints it. display_name, description, template and tags are the fields apply writes, and a sandbox keeps all of them for its life: apply creates a missing sandbox, leaves a matching one alone, and refuses one whose fields differ, since changing them means deleting the sandbox and creating a new one. A sandbox’s files are lost with it.

A manifest may pin template_revision (sandboxTemplates/<t>/revisions/<n>) for a sandbox it creates. Without it, a new sandbox takes the template’s serving revision. An existing sandbox’s revision is never compared.

Needs SandboxTemplate.use on the template and Sandbox.create to create.

Usage

rpk ai sandbox apply -f <file|dir|-> [flags]

Examples

This section provides examples of how to use rpk ai sandbox apply.

dev.yaml

name: sandboxes/dev
template: sandboxTemplates/default
tags:
  team: data
rpk ai sandbox diff -f dev.yaml
rpk ai sandbox apply -f dev.yaml

Flags

Value Type Description

-f, --filename

strings

manifest file, directory, or - for stdin (repeatable).

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.