Nx Cloud adopts a task-based CI model that overcomes the slowness and unreliability of traditional VM-based CI. Instead of statically assigning work to machines, Nx Cloud dynamically distributes individual tasks across available agents — optimizing for speed and resource utilization. Teams using Nx Cloud report:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nrwl/nx/llms.txt
Use this file to discover all available pages before exploring further.
- 30–70% faster CI pipelines
- 40–75% reduction in CI compute costs
- Improved reliability through automatic flaky task detection and retries
Connect to Nx Cloud
Nx Agents: distributed task execution
Nx Agents distribute your tasks across multiple CI machines automatically. You declare how many agents you want; Nx Cloud handles scheduling, dependency ordering, and artifact transfer.Enable Nx Agents in your CI pipeline
Add thestart-ci-run command to your CI configuration:
--distribute-on="3 linux-medium-js" argument tells Nx Cloud to spin up 3 agents using the linux-medium-js launch template. All nx commands issued in the pipeline are collected and distributed across those agents automatically.
Generate a pre-configured CI workflow for your provider with:
How Nx Agents work
Declarative configuration
You specify the number and type of agents. Nx Cloud distributes tasks automatically — no manual assignment required as your codebase grows.
Task-centric scheduling
Tasks are dispatched based on historical run times and dependency ordering from the Nx project graph. If an agent fails to start, other agents pick up its work.
Remote cache as transport
Nx Replay (remote caching) is used to transfer build artifacts between agents, ensuring each task runs only once and its outputs are available wherever needed.
Dynamic agent allocation
Allocate more or fewer agents depending on PR size. Only large PRs that need the compute pay for it.
Affected detection in CI
Combinenx affected with Nx Agents so that only changed projects run tasks, and those tasks are distributed across machines:
start-ci-run command, affected detection and distributed execution work simultaneously — Nx determines the minimal set of tasks, then distributes them across agents.
Automatic E2E test splitting
Large e2e test suites can be split into per-file tasks and distributed across agents using the Nx Atomizer. Enable it by adding the appropriate plugin:-ci variant of your e2e target in CI:
Remote caching in CI
Nx Replay (remote caching) is enabled automatically when you connect to Nx Cloud. In CI:- Tasks completed in a previous run are replayed from cache — no re-execution
- Cache is shared between agents in the same run
- Developers can pull cache results from CI to their local machines
