I had somebody else asking recently about implementing `Cloud`. It is not trivial. Would be nice to start with a known-good implementation (say, that in `kubernetes`) and create a plugin which lets you as the admin define CLI commands to provision or destroy agent infrastructure, with some environment variables being used to define the agent name etc. (There is
https://plugins.jenkins.io/scripted-cloud-plugin/ but it is way out of date.) As an alternative to running processes on the controller account, it could support launching Docker or Kubernetes containers.