# Management agent
URL: https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/mlops-agent/mgmt-agent/index.html

> Automate model deployment to any type of infrastructure and monitor deployment events.

# Management agent

The MLOps management agent provides a standard mechanism to automate model deployment to any type of infrastructure. It pairs automated deployment with automated monitoring to ease the burden on remote models in production, especially with critical MLOps features such as challenger models and retraining. The agent, accessed from the DataRobot application, ships with an assortment of plugins that support custom configuration.

## Management agent setup

To configure the management agent, you must prepare its various components, detailed below:

- Register a prediction environment.
- Download the agent tarball.
- Configure an environment plugin.
- Configure the management agent.
- Create a deployment.

### Register a prediction environment

You can use the management agent to automate the deployment, replacement, and monitoring of models in an external prediction environment. Management agent setup begins with configuring a prediction environment to use with deployments. Before proceeding, register the [prediction environment](https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/ext-model-prep/ext-pred-env.html) with DataRobot.

Once registered, navigate to Deployments > Prediction Environments. Select the prediction environment to use from the list and toggle on Use Management Agent.

Once enabled, you must indicate the email address of the management agent service account holder. DataRobot recommends using an administrative service account as the account holder (an account that has access to each deployment that uses the configured prediction environment).

### Download the agent

Access the management agent by downloading the MLOps agent tarball and installing it on the remote environment from which you are hosting models to make predictions. You can download it directly from the DataRobot application by clicking on your user icon and navigating to API keys and tools. Under the External Monitoring Agent header, click the download icon. The tarball appears in your browser's downloads bar when complete.

### Configure an environment plugin

The management agent translates deployment events (model replacement, deployment launch, etc.) into processes for an environment plugin to run in response to that event. The tarball includes configurable, example environment plugins. These plugins can support various types of infrastructure used by remote models as is; however, you may need to modify these plugins to fully support your particular environment. Initially, you can choose, configure, and potentially modify the plugin that best supports your infrastructure. Advanced users can create new plugins, either completely customized or by using the provided plugins as a starting point.

> [!NOTE] Note
> The provided management agent plugins are examples. They are not intended to work for all use-cases; however, you can modify them to suit your needs.

The MLOps management agent contains the following example plugins:

- Docker plugin.
- Filesystem plugin.
- Kubernetes plugin.
- Test plugin.

> [!TIP] Tip
> The tarball includes README files to help with the installation and configuration of the plugins.

For more information, see [Configure management agent environment plugins](https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/mlops-agent/mgmt-agent/mgmt-agent-plugins.html).

### Configure the agent

After downloading the tarball and configuring an agent plugin, edit the agent's config file:

- Provide your DataRobot service URL and API key so the management agent can authenticate to DataRobot.
- Provide the prediction environment id so the management agent can access it and any associated deployments.
- Indicate which management agent plugin to use.

For more information, see [Management agent installation and configuration](https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/mlops-agent/mgmt-agent/mgmt-agent-install.html).

### Create a deployment

After configuring the prediction environment and the management agent for use, you can create an external deployment with events monitored by the agent. The deployment must use the prediction environment configured in the steps above in order to support the agent's monitoring functionality. To do so, DataRobot recommends [registering an external model package](https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/registry/reg-create.html#register-external-model-packages) and [deploying it](https://docs.datarobot.com/en/docs/classic-ui/mlops/deployment/deploy-methods/deploy-external-model.html#deploy-an-external-model-package) from the Model Registry.

Once deployed, you have a deployment fully configured with the management agent, capable of monitoring deployment events and automating actions in response to those events.

---
