To configure an on premise agent for VS Team Services, follow the steps specified below.
Go to the on premise machine and navigate to VS Team services Control Panel Agent pools tab. Click on Download agent.
Provide a name for agent, VS Team Services url, agent pool and a local working directory.
azureps above is demand for azure powershell. Agent version should be greater than 1.87. You can setup Azure PowerShell in your agent and then add the capability to agent. This then can be used as a demand in build or release definition.