Azure DevOps Agent Latest Version
The best way to handle this at the moment is to get the latest release from the GitHub API and then use the version tag from that to create the download URL for the specific platform you want.
The release object has an assets.json file associated with it with the download links for each package if you want to avoid hard-coding the URL scheme.
Here is a PowerShell example that could be easily adapted to any language:
1$assets = Invoke-RestMethod $release.assets[0].browser_download_url
2$assets | Where-Object { $_.name -match "vsts-agent-win-x64*" } | Select-Object -ExpandProperty downloadUrl
comments powered by DisqusThanks to Mark Roghelia.