There are two flavors of Build agents with TFS ever since 2015.
"Team Build"/"XAML Build"
This is the Controller+Agent based infrastructure that has been around since 2010 and which has been deprecated with TFS 2017. The agents that are supported are the 2010 (on XP and framework 4) and 2015 agents. There is an unsupported 2017 version of the XAML agent which is purely meant for single machine installations where the TFS application Tier and the Build agent are running on the same server.
2015 is the preferred version to be on for as long as you still need these. You should be planning to remove your dependency on these agents as soon as possible.
*2018u2** reintroduce the XAML agent, purely for clients who're too heavily invested in the XAML infrastructure to upgrade directly to the new build system. If you're one of these I sincerely hope you have a plan in place to break this dependency. This reintroduced agent comes pre-deprecated and will be removed again in a future version.
VSO/VSTS/vNext/2015 agents
These have had many names, but are essentially the new agents that shipped first with 2015. There are two versions of these 1.x and 2.x. While the new agents auto-upgrade, they only auto-upgrade to highest available build of their major version. To upgrade from 1.x to 2.x you will need to uninstall the old agent and install the new one.
As with the XAML builds, the 1.x agent is now considered deprecated and if you're still relying on these you should plan to upgrade to 2.x as soon as possible.
Concluding
If you're still using XAML builds, you should be using the Team Foundation Server 2015 Build Agent+Controller. And plan to move away from these. This will require re-authoring the build process to the new build+release infrastructure
If you're still using the 1.x VSTS build agents, you should be upgraded to the highest version of those. And plan to move away from these by uninstalling the 1.x agent and installing the 2.x agent that matches your TFS version.
If you're using the 2.x VSTS build agents, you can upgrade them from the TFS web based admin console. These are the preferred agents for both Build and Release.