Course contentsShow
← Software Engineering
Lesson 640 of 1,93320. Continuous IntegrationFree lesson

Build Agents and Executors

Learn how CI servers distribute work to build agents, managing parallel execution and resource allocation.

Build Agents and Executors

You'll learn how CI servers distribute work across build agents to run jobs in parallel and manage computing resources efficiently.

The Restaurant Kitchen Analogy

Think of a CI server as a restaurant manager receiving orders (build jobs), and build agents as individual kitchen stations. When an order comes in, the manager assigns it to an available station. Multiple stations can cook different orders simultaneously, speeding up service. Each station has its own equipment (CPU, memory, disk), and the manager ensures no station gets overloaded.

How It Works

A CI server is the central coordinator that receives build requests when webhooks trigger. But the server itself doesn't run your builds—that's the job of build agents (also called executors, runners, or workers).

Build agents are separate machines or containers that:

  • Register with the CI server saying "I'm available"
  • Pull build jobs from a queue when ready
  • Execute the actual build steps (checkout, test, compile)
  • Report results back to the server
  • Clean up and mark themselves available again

The CI server acts as a scheduler, matching incoming jobs with available agents based on:

  • Agent availability (is it busy?)
  • Resource requirements (does this job need 8GB RAM?)
  • Labels/tags (does it need Linux vs Windows?)
  • Priority levels (hotfix builds first)

Why This Matters

This architecture enables parallel execution—running multiple builds simultaneously instead of queuing them sequentially. A single server might orchestrate dozens of agents, dramatically reducing feedback time. It also provides resource isolation: one broken build can't crash others, and each job gets clean environments.

Key Takeaway: Build agents are the workers that execute your CI jobs, while the CI server acts as a coordinator, distributing work across available agents to maximize parallelism and resource utilization.