improvements to latent agent