Using custom made Rancher Agent

I’ve made a custom Rancher Agent image which I try to use, but as soon as it has been started it is replaced by the standard rancher/agent. How can I tell Rancher which Agent image it should use?

/v2-beta/settings/agent.image