If you are using a recent version of TFS - 2017 or later - or using VSTS (which is now called something else I can never remember) this is relatively easy to set up.
The old style of agents using a controller has indeed been deprecated, and only really works for the Visual Studio load tests (requiring a controller using either 2015 or 2013, and the most recent 2013 version of 2013) if you have a modern TFS.
The way to do this with a modern version of TFS is a bit complicated, but it works.
You will need a machine that can act as the build server. This machine must have Visual Studio installed and licensed at the highest level of code you’re planning to build. If you’re intending to use features that require the full enterprise license, that’s the level of license your build machine install of Visual Studio needs. (The errors you get when VS lacks the correct license are not particularly helpful)
You will also need to be sure that the build server allows a TFS service local administrator access. Where I work, we’ve got a TFS service account that’s a domain level account and is part of the local admin account on our build server.
Every machine that is to run tests must be on the same subdomain as the build server, and must allow the TFS service account local administrator access. These machines need extra configuration to minimize problems: they need to be configured to never go to screensaver, and to automatically log on as the TFS service user when they restart.
Once you’ve got that set up, you need to go to the Settings icon in your TFS site, and set up your build agent. You’ll need to make sure the TFS service account has security for the build agent. You also need to download the agent to the build machine and install it the first time around.
The next big piece is to create yourself an access token that the builds can use for security. Make sure you save the token once you create it.
Once you’ve got all of this in place, you can go to the Build & Release tab and start creating your build/release pipeline.
It’s not all that difficult to do, but I strongly suggest you keep everything in debug mode until you get things running. I’ve found that the pipeline works really well, but it can be horribly frustrating setting things up at first. You can find a decent starting guide at Microsoft’s documentation repository - I’ve set up pipelines based solely on this information.