Best way to update agent.jar

I used to have Jenkins launch its agents from the controller using SSH. With that setup, when I upgraded Jenkins on the controller it automatically updated the remoting jars on the agents as well.

But now I have switched to Launch Agent by Connecting it to the Controller. With this configuration, when I upgrade Jenkins on the controller, the agent.jar files on the Agents are not kept up to date, obviously. Is there a way within the Jenkins app to conveniently download the latest agent.jar, just like I was able to when I first switched my nodes to Launch Agent by Connecting it to the Controller?

I guess the best way is to merely download it from your own Jenkins server with ${JENKINS_URL}/jnlpJars/agent.jar.

If you’re starting the agent process with a batch file, it might be worth inserting the download step (using wget or curl) before the call to agent.jar.