Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Agent · Jenkins

Direct answer

A Jenkins agent is a machine or container that runs build steps assigned by the controller, connected over SSH or inbound JNLP, selected by labels in the pipeline.

When to use this

Use this when Jenkins agents run builds.

First 30 seconds

1. Agents execute builds.

2. Ephemeral agents (Kubernetes plugin) preferred.

3. Labels for capabilities.

4. Secure agent-controller channel.

5. Clean workspaces.

Operational verification

controller → agent (label) → build

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Jenkins controller/agent and Pipeline automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformJenkins controller/agent and Pipeline automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when Jenkins agents run builds.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Static agents with leftover workspace state.
  • Agents with more credentials than needed.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Agents run build steps assigned by the controller.
  • Labels in the pipeline choose the agent.
  • Agents need consistent tools and versions.
Key checks
  • Agent status in /computer — online
  • Inbound (JNLP/WebSocket) vs SSH agents — connectivity
  • Ephemeral agents (Kubernetes/cloud) — isolation
ReferenceWhy it matters1 section · depth on demand

What it is

Jenkins agents execute builds on separate machines or containers, connected via SSH or inbound JNLP/WebSocket.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

A Jenkins agent is a machine or container that runs build work on behalf of the controller. Agents let builds run in the right environment (Linux, Windows, specific tools), scale out capacity, and keep untrusted build code off the controller.

ConnectionHow
SSH agentController connects to the agent over SSH
Inbound (JNLP/WebSocket)Agent connects to the controller
Cloud agentsKubernetes, Docker, EC2 plugins create agents per build

Labels match jobs to agents: agent { label 'linux && ansible' }. Ephemeral agents (a fresh pod per build) avoid leftovers from previous builds and are the safest default. When builds hang in the queue with "waiting for next available executor", no online agent has the requested label or free executors.

pipeline {
  agent { kubernetes { yamlFile 'ci/pod.yaml' } }
  stages { stage('Lint') { steps { sh 'ansible-lint' } } }
}
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docJenkins controller/agent and Pipeline automation current

Authoritative/upstream documentation reviewed for bounded claims in Jenkins > Agent. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.jenkins.io/doc/ · confidence 94%
Confirmation

Confirm action

Continue?