ESX Agent Manager (EAM) is a long-lived service on vCenter that acts as an intermediary for provisioning agent virtual machines and VIB modules on behalf of the user.
Please refer to simulator/simulator_test.go
for an example on how to use this package.
The simulator
package provides an EAM simulator that can even simulate the lifecycle of agent VMs using containers.