{"id":5153,"library":"clearml-agent","title":"ClearML Agent","description":"ClearML Agent is a Python library that provides auto-magical DevOps capabilities for Deep Learning. It serves as a worker to execute machine learning tasks remotely, integrating with the ClearML Python package and ClearML Server. The library maintains an active release cadence with frequent updates.","status":"active","version":"2.0.7","language":"python","source_language":"en","source_url":"https://github.com/clearml/clearml-agent","tags":["MLOps","agent","orchestration","deep learning","machine learning","DevOps","CI/CD","automation"],"install":[{"cmd":"pip install clearml-agent","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core dependency for interacting with the ClearML server and defining tasks.","package":"clearml","optional":false},{"reason":"Used for system resource monitoring, updated in v2.0.4.","package":"psutil","optional":false},{"reason":"Added for Windows platforms (v1.9.3) for `win32file` functionality.","package":"pywin32","optional":true}],"imports":[],"quickstart":{"code":"# 1. Install ClearML Agent\npip install clearml-agent\n\n# 2. Initialize the agent (interactive setup for server connection and git credentials)\n# You'll be prompted to paste ClearML credentials and optionally configure Git.\n# Ensure CLEARML_API_ACCESS_KEY and CLEARML_API_SECRET_KEY are set as environment variables\n# or paste them when prompted.\n# os.environ['CLEARML_API_ACCESS_KEY'] = os.environ.get('CLEARML_API_ACCESS_KEY', 'YOUR_ACCESS_KEY')\n# os.environ['CLEARML_API_SECRET_KEY'] = os.environ.get('CLEARML_API_SECRET_KEY', 'YOUR_SECRET_KEY')\nclearml-agent init\n\n# 3. Start the ClearML Agent daemon (listening for tasks)\n# For simple virtual environment mode (default):\n# clearml-agent daemon\n\n# For Docker mode (recommended for complex environments):\nclearml-agent daemon --docker","lang":"bash","description":"The ClearML Agent is primarily a CLI tool. This quickstart guides through installation, interactive initialization to connect to a ClearML server and configure Git, and finally starting the agent daemon to listen for and execute tasks. For a full non-interactive setup, consider setting environment variables for credentials and pre-configuring `clearml.conf`."},"warnings":[{"fix":"Upgrade Python environment to 3.6 or later.","message":"Python 3.5 support was removed in `clearml-agent` v1.9.3. Ensure you are using Python 3.6 or newer.","severity":"breaking","affected_versions":">=1.9.3"},{"fix":"Run `clearml-agent init` to configure server credentials or set `CLEARML_NO_DEFAULT_SERVER=0` environment variable for backward compatibility with older demo server behavior, or define `api_server`, `web_server`, `files_server` in `clearml.conf`.","message":"As of `clearml-agent` v1.1.0, the agent no longer tries to use the demo server by default. Attempting to run without explicit server configuration will fail.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Set environment variables `CLEARML_AGENT_SKIP_PIP_VENV_INSTALL=1` or `CLEARML_AGENT_SKIP_PYTHON_ENV_INSTALL=1` for the agent's environment, or clear the 'Python Packages' section of the task in the ClearML UI before enqueuing.","message":"When running tasks in Docker mode, the agent by default installs all required Python packages. To use a pre-built Docker image without additional installations, you must explicitly disable this behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Configure Git credentials during `clearml-agent init`, or use `agent.git.extra_credentials`, `agent.git_host_match_prefix`, `agent.git_use_azure_pat`, `agent.git_use_ms_entra_token` in `clearml.conf`. Environment variables like `CLEARML_AGENT_GIT_USER` and `CLEARML_AGENT_GIT_PASS` can also be used.","message":"Git credentials for cloning repositories can be complex, involving different configuration options and environment variables for various Git providers (GitHub, GitLab, Bitbucket, Azure DevOps).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Run `clearml-agent daemon` from the system Python environment, not within an activated virtual environment. The agent will then create and manage virtual environments for each task it executes.","message":"If running the agent in virtual environment mode (pip, conda, poetry), the agent itself cannot be launched from an *already activated* virtual environment. It needs to create its own isolated environments.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'activ':43 'agent':2,4,50 'auto':12 'auto-mag':11 'autom':58 'cadenc':45 'capabl':15 'ci/cd':57 'clearml':1,3,33,37 'deep':17,52 'devop':14,56 'execut':25 'frequent':47 'integr':30 'learn':18,27,53,55 'librari':8,40 'machin':26,54 'magic':13 'maintain':41 'mlop':49 'orchestr':51 'packag':35 'provid':10 'python':7,34 'releas':44 'remot':29 'serv':20 'server':38 'task':28 'updat':48 'worker':23","created_at":"2026-04-14T01:21:29.260425+00:00","updated_at":"2026-04-16T02:20:56.654382+00:00","problems":[{"fix":"Ensure the `clearml` package is installed in the appropriate environment (e.g., the virtual environment or Docker image used by the agent) using `pip install clearml`.","cause":"The `clearml` Python package is not installed in the environment where the task is being executed, or there is an issue with the Python environment used by `clearml-agent`.","error":"ModuleNotFoundError: No module named 'clearml'"},{"fix":"Uninstall the separately installed `typing` package using `pip uninstall typing`, as Python 3.5+ includes `typing` in its standard library.","cause":"This error typically arises from compatibility issues or an outdated `typing` package, especially in Conda environments, where `typing` is part of the standard library but might be installed as a separate, conflicting package.","error":"AttributeError: type object 'Callable' has no attribute '_abc_registry'"},{"fix":"Verify the `api_server` URL, `access_key`, and `secret_key` in your `~/clearml.conf` file (or corresponding environment variables like `CLEARML_API_SERVER`, `CLEARML_API_ACCESS_KEY`, `CLEARML_API_SECRET_KEY`) and ensure the ClearML server is accessible from the agent's machine.","cause":"The `clearml-agent` cannot establish a connection to the ClearML server, often due to an incorrect `api_server` URL, invalid API credentials, or network connectivity issues configured in `clearml.conf` or via environment variables.","error":"clearml_agent: ERROR: Connection Error: it seems *api_server* is misconfigured. Is this the ClearML API server http://HOST_IP:8082 ?"},{"fix":"Review the `~/clearml.conf` file for any YAML syntax errors, paying close attention to indentation, ensure strings are properly quoted, and validate the structure against a correct ClearML configuration example.","cause":"This indicates a syntax error within the `clearml.conf` configuration file, commonly caused by incorrect YAML formatting such as improper indentation, unquoted strings, or malformed data structures.","error":"clearml_agent: ERROR: expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"clearml-agent","cli_version":"CLEARML-AGENT version 3.0.1","type":"library","homepage":"https://clear.ml","github":"https://github.com/clearml/clearml-agent","docs":null,"changelog":null,"pypi":"https://pypi.org/project/clearml-agent/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","ai-ml","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-04-13","next_check":"2026-07-12","install_tag":null}}