title: Jenkins pipeline: agent vs node?
body: <p>What is the difference between an <strong>agent</strong> and a <strong>node</strong> in a jenkins pipeline?</p>
  <p>I've found those definitions:</p>
  <ul>
  <li><a href="https://jenkins.io/doc/book/pipeline/" rel="noreferrer">Node</a>: A Pipeline performs most of the work in the context of one or more declared node steps.</li>
  <li><a href="https://jenkins.io/doc/book/pipeline/syntax/#agent" rel="noreferrer">Agent</a>: The agent directive specifies where the entire Pipeline, or a specific stage, will execute in the Jenkins environment depending on where the agent directive is placed.</li>
  </ul>
  <p>So both are used for executing pipeline steps. But when to use which one?</p>