Agent pool
What it is
An agent pool is a named collection of agents that execute jobs. In Azure Pipelines you assign a job to a pool with pool:; the job then runs on any available agent in that pool.
Why it exists
Pipelines need compute to execute steps. Instead of pinning each job to one machine, a pool gives elasticity: many agents, parallelism, and choice between Microsoft-managed and your own hardware.
Key ideas
- Microsoft-hosted pools — pre-provisioned, managed VMs; named by OS (
ubuntu-latest,windows-latest,macos-latest). Zero setup; billing by hosted minutes. - Self-hosted pools — you register your own agents into a pool (org/project level). More control, no per-minute cost, but you maintain them.
- Organization vs project pools — org-level pools are shared; project pools are scoped to one project.
- Parallelism — more agents in a pool ⇒ more concurrent jobs.
- GitHub Actions equivalent: runners (GitHub-hosted or self-hosted) chosen via
runs-on:.
Exam notes
- Syntax:
pool: vmImage: 'ubuntu-latest'(Microsoft-hosted) vspool: mySelfHostedPool(self-hosted). - Demand/
demands:— self-hosted agents can declare capabilities (e.g.dotnet), letting jobs pick capable agents. - Hosted pool names/
vmImagevalues are common exam items.
Related
self-hosted-agent · azure-pipelines · jobs-steps
📘 Source: Microsoft Learn — Agent Pool