The "real" agent code is auto-upgraded off the server version - what you think of the agent (and packaged as such) is really just a "bootstrapper" that knows how to talk to the server sufficiently to download the latest agent code. As a general rule the bootstrapper will be compatible with server releases within the same 12 month period, but it's a good practice to use later agent versions due to security patching of the underlying libraries in the bootstrapper, support for later Java versions etc.
One caveat is that there was a major change made to agent-server communication in 21.1.0 which might (I can't recall exactly) cause the "old" agent bootstrappers to not be able to talk to the newer server version. You could do a test of this though, if you can't afford any agent downtime and want to plan a more conservative path.
-Chad