Jenkins agents can be categorized into Permanent (static) agents, Cloud-based agents, Docker agents, and Remote (SSH/JNLP) agents, each serving different use cases and deployment scenarios
Jenkins agents are worker nodes responsible for executing build and test tasks delegated by the Jenkins controller. Based on how they are provisioned and managed, agents can be classified into several types. The main categories include permanent agents that remain always online, cloud-based agents that scale dynamically, containerized Docker agents for isolated environments, and remote agents connected via network protocols .
Permanent Agents: Also called static agents, these are dedicated machines (physical or virtual) that are manually configured and remain permanently connected to the Jenkins controller. They maintain a steadfast connection and are ideal for projects with steady workloads, consistent infrastructure requirements, and need for specific hardware or software environments . Once created, they run continuously and keep occupying cluster resources even when idle .
Cloud-Based Agents: These are ephemeral agents created on-demand using cloud providers like AWS EC2, Azure, Google Cloud, or Kubernetes. They are dynamically provisioned when jobs are triggered, execute the build, and are terminated afterward. This auto-scaling capability optimizes resource utilization and reduces costs by using agents only when needed . Jenkins plugins such as EC2 plugin, Kubernetes plugin, and Azure VM agents manage these agents .
Docker Agents: Jenkins can spin up agents inside Docker containers, with each job running in its own isolated environment. This ensures reproducibility, eliminates dependency conflicts, and provides clean build environments. Containerized agents are destroyed after each build and are ideal for projects with varying dependencies or microservices architectures . They can be managed through the Docker Pipeline plugin and use container images with all required tools pre-installed .
Remote Agents (SSH/JNLP): These agents connect to the controller over a network using SSH or JNLP (Java Web Start) protocols. SSH-based agents are the more secure and modern approach . They allow Jenkins to utilize machines across different data centers, private clouds, or on-premise environments . JNLP agents initiate outbound connections to the controller, which is useful when agents are behind firewalls .
Agents can also be categorized based on their lifecycle: Static agents (permanent) remain online continuously, while Dynamic agents (cloud and Docker) are ephemeral, created on-demand and destroyed after job completion . The Kubernetes plugin enables dynamic provisioning of agent pods in Kubernetes clusters, where a new pod is created for each build and terminated afterward . Some platforms also provide pre-configured pod templates with specific toolchains like base, nodejs, maven, and go agents for specialized build environments .
The choice of agent type depends on project requirements: Permanent agents suit stable, resource-intensive workloads with consistent needs. Cloud/Docker agents excel in dynamic environments requiring scalability and isolation . Modern best practices favor dynamic agents using Docker or Kubernetes for their elasticity, resource efficiency, and environment consistency .