Change to new agents tag format
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index f63a596..926a8f4 100644
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -842,7 +842,8 @@
   - label: \"{0}\"
     command: \"{1}\\n{2}\"
     agents:
-      - \"os={3}\"""".format(label, fetch_bazelcipy_command(), command, platform)
+      kind: worker
+      os: {3}""".format(label, fetch_bazelcipy_command(), command, platform)
 
 
 def print_pipeline(steps):
@@ -878,7 +879,7 @@
   - label: \"Setup {0}\"
     command: \"{1}\\n{2}\"
     agents:
-      - \"pipeline=true\"""".format(project_name, fetch_bazelcipy_command(),
+      kind: pipeline""".format(project_name, fetch_bazelcipy_command(),
                                     pipeline_command)
 
 
@@ -918,7 +919,8 @@
   - label: \"{0}\"
     command: \"{1}\\n{2}\"
     agents:
-      - \"os={3}\"""".format(label, fetch_bazelcipy_command(),
+      kind: worker
+      os: {3}""".format(label, fetch_bazelcipy_command(),
                              pipeline_command, platform)
 
 
@@ -928,7 +930,7 @@
   - label: \"Publish Bazel Binaries\"
     command: \"{0}\\n{1}\"
     agents:
-      - \"pipeline=true\"""".format(fetch_bazelcipy_command(), command)
+      kind: pipeline""".format(fetch_bazelcipy_command(), command)
 
 
 def print_bazel_publish_binaries_pipeline(configs, http_config):
diff --git a/buildkite/install-buildkite-agent.sh b/buildkite/install-buildkite-agent.sh
index b979418..4811fd0 100755
--- a/buildkite/install-buildkite-agent.sh
+++ b/buildkite/install-buildkite-agent.sh
@@ -38,23 +38,29 @@
 # Deduce the operating system from the hostname and put it into the metadata.
 case $(hostname) in
   *pipeline*)
-    AGENT_TAGS="kind=pipeline,os=pipeline,pipeline=true"
+    kind="pipeline"
     ;;
   *trusted*)
-    AGENT_TAGS="kind=trusted,os=trusted"
+    kind="trusted"
     ;;
+  *)
+    kind="worker"
+    ;;
+esac
+
+case $(hostname) in
   *ubuntu1404*)
-    AGENT_TAGS="kind=worker,os=ubuntu1404"
+    os="ubuntu1404"
     ;;
   *ubuntu1604*)
-    AGENT_TAGS="kind=worker,os=ubuntu1604"
+    os="ubuntu1604"
     ;;
   *)
     echo "Could not deduce operating system from hostname: $(hostname)!"
     exit 1
 esac
 
-AGENT_TAGS="${AGENT_TAGS},image-version=${IMAGE_VERSION}"
+AGENT_TAGS="kind=${kind},os=${os},image-version=${IMAGE_VERSION}"
 
 # Write the Buildkite agent configuration.
 cat > /etc/buildkite-agent/buildkite-agent.cfg <<EOF
@@ -68,7 +74,7 @@
 EOF
 
 # Stop the agent after each job on stateless worker machines.
-if [[ $(hostname) != *pipeline* ]]; then
+if [[ $kind == worker ]]; then
   cat >> /etc/buildkite-agent/buildkite-agent.cfg <<EOF
 disconnect-after-job=true
 disconnect-after-job-timeout=86400
@@ -152,7 +158,7 @@
 #
 # - We set the service to not launch automatically, as the startup script will start it once it is
 #   done with setting up the local SSD and writing the agent configuration.
-if [[ $(hostname) == *pipeline* ]]; then
+if [[ $kind == pipeline ]]; then
   # This is a pipeline worker machine.
   systemctl disable buildkite-agent
 elif [[ $(systemctl --version 2>/dev/null) ]]; then
diff --git a/buildkite/install-python36.sh b/buildkite/install-python36.sh
index a11c1b6..9e7708f 100755
--- a/buildkite/install-python36.sh
+++ b/buildkite/install-python36.sh
@@ -14,15 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# add-apt-repository -y "ppa:deadsnakes/ppa"
-# apt-get -qqy update > /dev/null
-# apt-get -qqy install python3.6 python3.6-dev python3.6-venv > /dev/null
-# python3.6 -m ensurepip
-# rm -f /usr/local/bin/pip3
-# apt-get -qqy install python3-pip
-# pip3.6 install requests pyyaml
-# pip3.6 install --pre github3.py
-
 apt-get -qqy install zlib1g-dev libssl-dev
 
 PYTHON_VERSION="3.6.4"
@@ -48,8 +39,7 @@
 echo "Installing Python ${PYTHON_VERSION} ..."
 make -s altinstall > /dev/null
 
-pip3.6 install requests uritemplate pyyaml
-pip3.6 install --pre github3.py
+pip3.6 install requests uritemplate pyyaml github3.py
 
 popd
 rm -rf "/usr/local/src/Python-${PYTHON_VERSION}"