CLI commands¶
Install the Python CLI package first, then authenticate with Authentication. For BYOC cluster flags, see BYOC CLI.
Authentication¶
Command |
Shown on |
|---|---|
|
Profile (alternative to a PAT) |
arena login
Run once per machine (or again after session expiry). The arena agent generate snippet assumes you are already authenticated.
Set ARENA_API_KEY instead when you cannot open a browser. Profile does not print a separate arena subcommand for keys; create the PAT in the UI and export the variable.
Inference¶
The Arena CLI tab appears under Deployment code only for LLM deployments, after status is Deployed. It shows a single arena agent generate command:
arena agent generate YOUR_DEPLOYMENT_NAME --prompt "Your prompt here"
YOUR_DEPLOYMENT_NAME: deployment name from the Agents list (same string as in the Arena client tab).--prompt: the text you send. The command streams the completion to your terminal.
Authenticate first with arena login or ARENA_API_KEY (see Authentication).
Classic RL and supervised deployments¶
Gym, PettingZoo, recurrent PPO, and supervised (predict) deployments do not show an Arena CLI tab. Use the Arena client tab (ArenaClient + open_inference_agent) for a rollout loop, or wire Manual HTTP yourself.
Bring your own compute¶
Bring your own compute prints an arena cluster register … --install --no-write command when you open Install on a cluster row:
arena cluster register --name 'corp-k8s' --install --no-write
arena cluster also covers token rotation, unregistering, and cloud provisioning. Flags and the rest of the subcommands: BYOC CLI.
Projects, datasets, environments, and experiments¶
Action |
Command |
|---|---|
Create Advanced Training project |
|
Create Classic RL project |
|
Create SFT dataset |
|
Create preference dataset |
|
Create reasoning dataset |
|
Upload and validate a classic gym |
|
Upload and validate a language gym |
|
List gym entrypoints |
|
List compute |
|
Submit a job |
|
Submit a reasoning job |
same, plus |
List experiments |
|
List checkpoints |
|
--llm-based is Advanced Training. Classic RL is the default. --category is sft, preference, or reasoning. Mapping keys are Arena names; values are column names in your file. --file is a local CSV or Parquet file, or a Hugging Face parquet folder.
Save a default spec from Python as run-spec.json. Copy a resource id from arena resources list, then submit:
import json
from pathlib import Path
from agilerl.arena import ArenaClient
with ArenaClient() as client:
spec = client.get_default_run_spec(algorithm="PPO", gym_env="CartPole")
Path("run-spec.json").write_text(json.dumps(spec, indent=2))
arena projects create classic-demo --description "Classic RL"
arena resources list
arena experiments submit ./run-spec.json --project classic-demo --experiment-name ppo-cartpole --resource-id a2-highgpu-1g --num-nodes 2
arena datasets create support-tickets-sft --category sft --column-mapping '{"prompt":"instruction","target":"response"}' --file ./sft.csv
arena env validate my-env --version v1 --source ./my_env.tar.gz
arena experiments list --project llm-work
arena experiments checkpoints sft-run
Non-tabular files still use the web UI.