Agents are the machines that execute your pipeline jobs. Azure DevOps offers two types: Microsoft-hosted and Self-hosted agents. Microsoft-hosted Agents These are disposable VMs managed by Microsoft that provide a clean environment for every run. They support Linux, Windows, and macOS and come pre-installed with common tools. They are the easiest option to start with — no setup required. Self-hosted Agents Self-hosted agents run on your own machine, VM, or on-premises server. They are useful when your build depends on custom software, private network access, specific hardware, or internal deployment targets that hosted agents cannot reach. Step-by-Step Setup (Windows) Step 1 — Create a Personal Access Token (PAT): Go to your Azure DevOps profile → Personal access tokens → New Token. Set…
Key Takeaways
Microsoft-hosted agents are managed by Azure — clean, disposable, zero setup.
Self-hosted agents run on your own machine — needed for custom tools or private network access.
Setup requires a PAT, agent pool, downloaded agent package, and config.cmd (Windows) or config.sh (Linux).
Self-hosted agents give more control but require maintenance, patching, and security management.