# Hybrid Deployment Agents

Hybrid Deployment Agent is an integral part of our [Hybrid Deployment model](/docs/core-concepts/deployment-models/hybrid-deployment.md). It is installed in your local environment and manages the data pipeline processing in your network. It also communicates outbound with Fivetran to send your pipeline's metadata and logs, which we use to understand how the pipeline is running and display the details on the dashboard.

In the **Hybrid Deployment Agents** tab of the Fivetran dashboard, you can create new agents and view or manage all existing Hybrid Deployment Agents associated with your account.

![Hybrid Deployment Agents tab](_assets/hybrid-deployment.webp)

In this tab, you can do the following:

- [Create new Hybrid Deployment Agents](#createnewagent)
- View all the agents associated with your Fivetran account
- View the current status and other details of the agents
- [Regenerate the token for your agents](#regenerateagenttoken)
- [Change the deployment type for your agents](#changedeploymenttype)
- [Delete the agents that are not associated with any connection](#deleteagent)

---

## Create new agent

1. In the **Hybrid Deployment Agents** tab, click **+ Add Hybrid Deployment Agent**.
2. Read the **Fivetran On-Prem Software License Addendum**, and select the **I have read and agree to the terms of the License Addendum and the Software Specific Requirements** checkbox.
3. Click **Next**.
4. Select your preferred deployment environment for the agent:

   - **Docker**
   - **Podman**
   - **Kubernetes**
5. Click **Next**.
6. Enter an **Agent name** and click **Generate agent token**.
7. Make a note of the agent token and installation command. You will need them to install and start the agent.
8. Click **Save**.
9. (Kubernetes only) Make the following modifications to the installation command you copied from the Fivetran dashboard:

   - (Optional) Replace the default deployment name (`hd-agent`) with a name of your choice.
   - (Optional) Replace the default deployment namespace (`default`) with the namespace you want to use for your agent.
   - Set the `data_volume_pvc` parameter to your Persistent Volume Claim name. By default, this parameter contains a placeholder value (`VOL_CLAIM_HERE`).
   - Update the Helm chart `version` by replacing the default value with the version that meets your requirements. For the latest available versions, see our [GitHub repository](https://github.com/fivetran/hybrid_deployment).

> **Important:** To use the new agent for a destination, you must install and start the agent before completing the destination setup. For more information about installing and starting the agent, see our [Hybrid Deployment setup guides](/docs/core-concepts/deployment-models/hybrid-deployment.md#setupguide).

## Regenerate agent token

1. Stop the agent for which you want to regenerate the token.
2. In the **Hybrid Deployment Agents** tab, select the agent for which you want to regenerate the token.

   > **Note:** For more information on how to stop the agent, see our [Hybrid Deployment setup guides](/docs/core-concepts/deployment-models/hybrid-deployment.md#setupguide).
3. In the top right corner, click **Actions** and select **Regenerate token**.
4. Click **Regenerate**.
5. Make a note of the new token.
6. Update the agent token based on your deployment type:

   **For Docker and Podman:**

   i. Log in to your local machine using the Fivetran user.

   ii. Go to `$HOME/fivetran/conf` and open the `config.json` file.

   iii. In the `config.json` file, replace the existing value of `token` with the new agent token you generated.

   iv. Restart the agent.

   > **Note:** For more information on how to restart the agent, see our Hybrid Deployment setup guides for [Docker](/docs/core-concepts/deployment-models/hybrid-deployment/setup-guide-docker.md) and [Podman](/docs/core-concepts/deployment-models/hybrid-deployment/setup-guide-podman.md).

   **For Kubernetes:**

   i. Log in to the environment where kubectl and Helm is configured to connect to your Kubernetes cluster.

   ii. [Reinstall and restart the agent](/docs/core-concepts/deployment-models/hybrid-deployment/setup-guide-kubernetes.md#installandstartagent).
7. Go to the Fivetran dashboard and click **Save**.

---

## Change deployment type

1. Stop the agent for which you want to change the deployment type.
2. In the **Hybrid Deployment Agents** tab, select the agent for which you want to change the deployment type.

   > **Note:** For more information on how to stop the agent, see our [Hybrid Deployment setup guides](/docs/core-concepts/deployment-models/hybrid-deployment.md#setupguide).
3. In the top right corner, click **Actions** and select **Change deployment type**.
4. Select your preferred deployment environment for the agent:

   - **Docker**
   - **Podman**
   - **Kubernetes**
5. Click **Save**.
6. Restart the agent.

   > **Note:** For more information on how to restart the agent, see our [Hybrid Deployment setup guides](/docs/core-concepts/deployment-models/hybrid-deployment.md#setupguide).

---

## Delete agent

1. Stop the agent for which you want to change the deployment type.
2. Ensure that no active connections are using the agent.
3. In the **Hybrid Deployment Agents** tab, select the agent you want to delete.
4. In the top right corner, click **Actions** and select **Delete agent**.
5. In the pop-up window, click **Delete agent**.
