Azure pipeline yaml file: /azure-pipelines.yml (Line: 125, Col: 6): Unexpected value ‘Agent’

Hi I’m new to Azure DevOps and struggling with my azure.yml file. When I try to run my pipeline I’m getting the below error
/azure-pipelines.yml (Line: 125, Col: 6): Unexpected value ‘Agent’. I tried looking up online for similar issues but with no success, I managed to fix other issues that I was having but this one beats me.

Here is my yaml file.

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

parameters:
- name: env
  displayName: Environment
  default: DEV
  values:
  - DEV
  - ZA_SIT
  - AF_SIT
  - MAH_PROD
  - SA_PROD
- name: ser
  displayName: Server
  default: ESB
  values:
  - ESB
- name: branch
  displayName: Checkout Branch
  default: Dev
  values:
  - Dev
  - sit_mah
  - sit_sa
  - prod_mah
  - prod_sa
- name: packages
  displayName: Packages to Deploy:- 
      Specify "none" to deploy all packages,
      To deploy multiple packages specify them "," seperated
  default: none
- name: connectors
  displayName: Connectors to Deploy:-
    To deploy multiple connectors specify them "," seperated
  default: none
  
- name: connvs
  displayName: Connectors Variable Substitution
  type: boolean
  default: false

- name: checkDep
  displayName: Check serviceDependencies:- 
    Specify "full" if "Packages to Deploy" is "none"
  default: ignore
  values:
  - full
  - partial
  - ignore

trigger: none
jobs:


- job: Checkout
  variables:
   ${{ if eq(parameters.env, 'DEV') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'ZA_SIT') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'AF_SIT') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'SA_PROD') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'MAH_PROD') }}:
     Agent: onprem_webMethods
  pool:
    name: 'ESB_webMethods'
    demands: Agent.Name -equals ${{ variables.Agent }}
  steps:
  - checkout: git://EBS/OnPrem_webMethods@${{ parameters.branch }}
    submodules: 'recursive'
    clean: true
    path: workspace
    persistCredentials: true
  - bash: |
      BuildPath="$(Agent.BuildDirectory)"
      echo "This is build location $BuildPath"
      echo "##vso[task.setvariable variable=buildPath;isOutput=true;]$BuildPath"
    name: setVariable

            


- job: Build

  dependsOn: Checkout
  condition: succeeded('Checkout')
  
  variables:
   buildPath: $[ dependencies.Checkout.outputs['setVariable.buildPath'] ]
   ${{ if eq(parameters.env, 'DEV') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'ZA_SIT') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'AF_SIT') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'SA_PROD') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'MAH_PROD') }}:
     Agent: onprem_webMethods

  pool: 
   name: 'ESB_webMethods' 
   demands: Agent.Name -equals ${{ variables.Agent }}

  steps:
  - checkout: none
  - script: "/softwareag/wm107/common/AssetBuildEnvironment/bin/build.sh -Denable.build.IS=true -Dis.acdl.config.dir=$(buildPath)/workspace/OnPrem_webMethods/IS/packages/acdl/config${{ parameters.ser }}/${{ parameters.env }}/ -Dbuild.source.dir=$(buildPath)/workspace/OnPrem_webMethods/IS/packages/IS -Dbuild.output.dir=$(OutDir)"
    name: BuildScript


- job: CreateProject

  dependsOn: 
  - Checkout
  - Build
  condition: succeeded('Build')
  variables:
   buildPath: $[ dependencies.Checkout.outputs['setVariable.buildPath'] ]
  ${{ if eq(parameters.env, 'DEV') }}:
     Agent: onprem_webMethods
  ${{ if eq(parameters.env, 'ZA_SIT') }}:
     Agent: onprem_webMethods
  ${{ if eq(parameters.env, 'AF_SIT') }}:
     Agent: onprem_webMethods
  ${{ if eq(parameters.env, 'SA_PROD') }}:
     Agent: onprem_webMethods
  ${{ if eq(parameters.env, 'MAH_PROD') }}:
     Agent: onprem_webMethods
  pool: 
   name: 'ESB_webMethods'
   demands: Agent.Name -equals ${{ variables.Agent }}
  steps:
  - checkout: none

  - bash: |
     chmod 764 $(buildPath)/workspace/OnPrem_webMethods/IS/scripts/${{ parameters.ser }}/${{ parameters.env }}/buildAutomater.sh
     $(buildPath)/workspace/OnPrem_webMethods/IS/scripts/${{ parameters.ser }}/${{ parameters.env }}/buildAutomater.sh -p=${{ parameters.packages }} -c=${{ parameters.connectors }} -f=$(buildPath)/workspace/OnPrem_webMethods/IS/scripts/${{ parameters.ser }}/${{ parameters.env }}/IS_ProjectAutomator.xml -d=${{ parameters.checkDep }}
    name: BuildProjectAutomater
  - script: "/softwareag/wm107/IntegrationServer/instances/default/packages/WmDeployer/bin/projectautomatorUnix.sh $(buildPath)/workspace/OnPrem_webMethods/IS/scripts/${{ parameters.ser }}/${{ parameters.env }}/IS_ProjectAutomator.xml"
    name: CreateDeployerProject
  
  - bash: |
      if [ ${{ parameters.connvs }} == False ]
        then 
        echo "No Variable Substution"
        else
         cp $(buildPath)/workspace/OnPrem_webMethods/IS/scripts/${{ parameters.ser }}/${{ parameters.env }}/_WMRepo_DepMap.vs /softwareag/wm107/IntegrationServer/instances/default/packages/WmDeployer/replicate/inbound/WMRepo_WMRepo_DepMap.vs
         /softwareag/wm107/IntegrationServer/instances/default/packages/WmDeployer/bin/Deployer.sh --import -varsub --vsFile WMRepo_WMRepo_DepMap.vs -map WMRepo_DepMap -project WMRepo -host $(${{ parameters.env }}_deployerServer) -port $(${{ parameters.env }}_deployerPort) -user $(${{ parameters.env }}_username) -pwd $(${{ parameters.env }}_pwd)
      fi
    name: ImportConnectorsVS


- job: Deploy

  dependsOn: CreateProject
  condition: succeeded('CreateProject')
  variables:
   ${{ if eq(parameters.env, 'DEV') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'ZA_SIT') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'AF_SIT') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'SA_PROD') }}:
     Agent: onprem_webMethods
   ${{ if eq(parameters.env, 'MAH_PROD') }}:
     Agent: onprem_webMethods
  pool:
    name: 'ESB_webMethods'
    demands: Agent.Name -equals ${{ variables.Agent }}
  steps:
  - checkout: none
  - script: "/softwareag/wm107/IntegrationServer/instances/default/packages/WmDeployer/bin/Deployer.sh --deploy -dc WMTokenEngine_DepCand -project WMTokenEngine -host $(${{ parameters.env }}_deployerServer) -port $(${{ parameters.env }}_deployerPort) -user $(${{ parameters.env }}_username) -pwd $(${{ parameters.env }}_pwd)"
    name: DeployComposits

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật