Boot agents up to 10x faster with rock-solid stability — git, git-lfs, agent, ssh and UV come precompiled for x86/arm in a single self-contained bootstrap, so there's nothing to install at runtime.
ClearML-Agent
Run jobs (experiments) on any local or cloud based resource
Implement optimized resource utilization policies
Deploy execution environments with either virtualenv or fully docker containerized with zero effort
The ClearML Agent was built to address the DL/ML R&D DevOps needs:
Easily add & remove machines from the cluster
Reuse machines without the need for any dedicated containers or images
Combine GPU resources across any cloud and on-prem
No need for yaml / json / template configuration of any kind
User friendly UI
Manageable resource allocation that can be used by researchers and engineers
Flexible and controllable scheduler with priority support
Automatic instance spinning in the cloud
Using the ClearML Agent, you can now set up a dynamic cluster with *epsilon DevOps
*epsilon - Because we are :triangular_ruler: and nothing is really zero work
Kubernetes Integration (Optional)
We think Kubernetes is awesome, but it is not a must to get started with remote execution agents and cluster management.
We designed clearml-agent so you can run both bare-metal and on top of Kubernetes, in any combination that fits your environment.
The clearml-k8s glue pulls jobs from the ClearML job execution queue and prepares a Kubernetes job (based on provided
yaml template)
Inside each pod the clearml-agent will install the job (experiment) environment and spin and monitor the
experiment's process, fully visible in the clearml UI
Benefits: Kubernetes full view of all running jobs in the system
Enterprise Features
Full scheduler features added on Top of Kubernetes, with quota/over-quota management, priorities and order.
Fractional GPU support, allowing multiple isolated containers sharing the same GPU with memory/compute limit per container
SLURM (Optional)
Yes! Slurm integration is available, check the documentation for further details
Using the ClearML Agent
Full scale HPC with a click of a button
The ClearML Agent is a job scheduler that listens on job queue(s), pulls jobs, sets the job environments, executes the
job and monitors its progress.
Any 'Draft' experiment can be scheduled for execution by a ClearML agent.
A previously run experiment can be put into 'Draft' state by either of two methods:
Using the 'Reset' action from the experiment right-click context menu in the ClearML UI - This will clear any
results and artifacts the previous run had created.
Using the 'Clone' action from the experiment right-click context menu in the ClearML UI - This will create a new
'Draft' experiment with the same configuration as the original experiment.
An experiment is scheduled for execution using the 'Enqueue' action from the experiment right-click context menu in
the ClearML UI and selecting the execution queue.
Monitor machines statistics (CPU / GPU / Disk / Network)
Queues Tab:
Control the scheduling order of jobs
Cancel or abort job execution
Move jobs between execution queues
What The ClearML Agent Actually Does
The ClearML Agent executes experiments using the following process:
Create a new virtual environment (or launch the selected docker image)
Clone the code into the virtual-environment (or inside the docker)
Install python packages based on the package requirements listed for the experiment
Special note for PyTorch: The ClearML Agent will automatically select the torch packages based on the CUDA_VERSION
environment variable of the machine
Execute the code, while monitoring the process
Log all stdout/stderr in the ClearML UI, including the cloning and installation process, for easy debugging
Monitor the execution and allow you to manually abort the job using the ClearML UI (or, in the unfortunate case of a
code crash, catch the error and signal the experiment has failed)
System Design & Flow
Installing the ClearML Agent
pip install clearml-agent
ClearML Agent Usage Examples
Full Interface and capabilities are available with
clearml-agent --help
clearml-agent daemon --help
Configuring the ClearML Agent
clearml-agent init
Note: The ClearML Agent uses a cache folder to cache pip packages, apt packages and cloned repositories. The default
ClearML Agent cache folder is ~/.clearml.
See full details in your configuration file at ~/clearml.conf.
Note: The ClearML Agent extends the ClearML configuration file ~/clearml.conf.
They are designed to share the same configuration file, see example here
Running the ClearML Agent
For debug and experimentation, start the ClearML agent in foreground mode, where all the output is printed to screen:
clearml-agent daemon --queue default --foreground
For actual service mode, all the stdout will be stored automatically into a temporary file (no need to pipe).
Notice: with --detached flag, the clearml-agent will be running in the background
clearml-agent daemon --detached --queue default
GPU allocation is controlled via the standard OS environment NVIDIA_VISIBLE_DEVICES or --gpus flag (or disabled
with --cpu-only).
If no flag is set, and NVIDIA_VISIBLE_DEVICES variable doesn't exist, all GPUs will be allocated for
the clearml-agent.
If --cpu-only flag is set, or NVIDIA_VISIBLE_DEVICES="none", no gpu will be allocated for
the clearml-agent.
Example: spin two agents, one per GPU on the same machine:
Notice: with --detached flag, the clearml-agent will run in the background
For actual service mode, all the stdout will be stored automatically into a file (no need to pipe).
Notice: with --detached flag, the clearml-agent will run in the background
Example: spin two agents, pulling from dedicated dual_gpu queue, two GPUs per agent, with default
nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu20.04 docker:
The ClearML Agent will first try to pull jobs from the important_jobs queue, and only if it is empty, the agent
will try to pull from the default queue.
Adding queues, managing job order within a queue, and moving jobs between queues, is available using the Web UI, see
example on our free server
Stopping the ClearML Agent
To stop a ClearML Agent running in the background, run the same command line used to start the agent with --stop
appended. For example, to stop the first of the above shown same machine, single gpu agents:
Bootstrap is supported when using ClearML Agent version 3.0.0 and up.
The clearml-agent-bootstrap package is a self-contained
initialization system that runs inside any container launched by the ClearML Agent. It ships precompiled binaries for
Python, Git, ClearML Agent, and essential utilities, so task containers do not need these tools
pre-installed.
When the agent launches a containerized task, the bootstrap script runs first: it detects the container's architecture
and distribution, sets up a working Python environment, ensures Git is available, and then hands off to the ClearML
Agent to execute the task.
Broader container compatibility — tasks can run in minimal images (Alpine, slim, distroless-adjacent) that lack Python or Git.
Consistent environments — every task gets the same known-good toolchain regardless of the base image.
Offline support — all critical binaries are bundled, no internet access is required for the initial setup.
Supports x86_64 and aarch64 architectures on any Linux distribution that provides apt-get, dnf, yum, or apk
(Ubuntu, Debian, CentOS, RHEL, Fedora, Rocky Linux, Alpine, ...).
Bare-metal / VM usage
Install the agent (version 3.0.0 and up) and then install the bootstrap support:
This downloads the latest clearml-agent-bootstrap distribution and installs it locally. From this point on, when the
agent runs in docker mode, it will automatically unpack the bootstrap binaries, mount them into task containers, and
make sure the bootstrap script runs on container startup. The install-bootstrap command does not require a ClearML
server connection and can be run before clearml-agent init.
Common flags:
--check — preview a dry-run of the command without making changes.
--force — force reinstall even if the same version is already installed.
--version TAG — install a specific release version (e.g., v1.0.0).
--from-file PATH — install from a local .whl file instead of downloading from the official GitHub Releases.
Bootstrap and the uv package manager
The bootstrap ships a precompiled uv binary, and the bootstrap script exports its full path inside the task container
as CLEARML_BOOTSTRAP_UV_EXEC (usually /tmp/.bootstrap.uv/uv). When this variable is set, the agent runs every uv
command with that binary instead of looking for uv inside the task's virtual environment. Set CLEARML_BOOTSTRAP_UV_EXEC yourself only if you want to point the agent at a uv binary of your own.
The settings that control uv are independent of the bootstrap:
Setting
Environment variable
Meaning
agent.package_manager.type: uv
CLEARML_AGENT_FORCE_UV=1
Use uv as the package manager.
agent.package_manager.uv_replace_pip
—
Use uv as a pip drop-in replacement, i.e. install the task's "installed packages" with uv instead of pip. The bootstrap turns this on implicitly, since a bootstrapped container may have no pip at all.
—
CLEARML_BOOTSTRAP_UV_EXEC
Full path of the uv binary to use. Exported by the bootstrap script.
See agent.bootstrap in docs/clearml.conf for the remaining bootstrap options.
Kubernetes (Enterprise Helm chart)
Bootstrap support for Kubernetes is available only in the ClearML Enterprise Agent Helm chart.
Enable bootstrap in your clearml-agent-values.override.yaml:
Execute the code on your machine (Manually / PyCharm / Jupyter Notebook)
As your code is running, ClearML creates an experiment logging all the necessary execution information:
Git repository link and commit ID (or an entire jupyter notebook)
Git diff (we’re not saying you never commit and push, but still...)
Python packages used by your code (including specific versions used)
Hyperparameters
Input artifacts
You now have a 'template' of your experiment with everything required for automated execution
In the ClearML UI, right-click on the experiment and select 'clone'. A copy of your experiment will be created.
You now have a new draft experiment cloned from your original experiment, feel free to edit it
Change the hyperparameters
Switch to the latest code base of the repository
Update package versions
Select a specific docker image to run in (see docker execution mode section)
Or simply change nothing to run the same experiment again...
Schedule the newly created experiment for execution: right-click the experiment and select 'enqueue'
ClearML-Agent Services Mode
ClearML-Agent Services is a special mode of ClearML-Agent that provides the ability to launch long-lasting jobs that
previously had to be executed on local / dedicated machines. It allows a single agent to launch multiple dockers (Tasks)
for different use cases:
Auto-scaler service (spinning instances when the need arises and the budget allows)
Controllers (Implementing pipelines and more sophisticated DevOps logic)
Optimizer (such as Hyperparameter Optimization or sweeping)
Application (such as interactive Bokeh apps for increased data transparency)
ClearML-Agent Services mode will spin any task enqueued into the specified queue. Every task launched by
ClearML-Agent Services will be registered as a new node in the system, providing tracking and transparency capabilities.
Currently, clearml-agent in services-mode supports CPU only configuration. ClearML-Agent services mode can be launched
alongside GPU agents.