Buildkite Agent prioritization

This page references the out-of-date Buildkite Agent v2.

For docs referencing the Buildkite Agent v3, see the latest version of this document.

By setting an agent's priority value you are able to designate which priority it gets for being assigned build jobs to run. Higher priority agents are assigned work first, with the last priority being given to agents with the default value of null.

To set an agent's priority you can set it in the configuration file:

priority=9

or with the --priority command line flag:

buildkite-agent start --priority 9

or with the BUILDKITE_PRIORITY an environment variable:

env BUILDKITE_PRIORITY=9 buildkite-agent start