Skip to content
Latchkey

What Runners and Agents Are

A runner (or agent) is the machine that actually executes the steps your pipeline defines.

A pipeline definition is just instructions; something has to carry them out. That something is a runner or agent: a computer, often a fresh virtual machine or container, that checks out your code and runs your build, test, and deploy steps. This lesson defines runners, explains the hosted versus self-hosted trade-off, and clarifies the terminology different tools use.

Runner, agent, executor: same idea

Different platforms use different words for the same role. GitHub Actions calls them runners, Jenkins and Azure Pipelines call them agents, and GitLab calls them runners with executors. In all cases it is the worker that receives a job, sets up an environment, runs the steps, and reports results back to the CI server.

How a runner handles a job

  • It picks up a queued job assigned to it by the CI control plane.
  • It prepares an environment: a clean VM, container, or working directory.
  • It checks out the repository and runs each step in sequence.
  • It streams logs and reports success or failure, then is often torn down.

Hosted vs self-hosted

Hosted runners are provided and maintained by your CI vendor; you pay per minute and never manage a machine. Self-hosted runners run on infrastructure you own, giving you control over hardware, caching, and network access but adding operational burden. Managed runner platforms sit in between, offering vendor-operated machines that you do not maintain yourself, often at lower cost than first-party hosted runners.

Ephemeral vs persistent

Most modern pipelines favor ephemeral runners: a fresh, isolated machine per job that is destroyed afterward. This guarantees a clean state and avoids one job leaking data or state into the next. Persistent runners stay alive across jobs, which can be faster but risks state bleed and security issues if not carefully reset.

Key takeaways

  • A runner or agent is the machine that executes your pipeline steps.
  • Runner, agent, and executor are different names for the same role.
  • The main choices are hosted vs self-hosted and ephemeral vs persistent.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →