> ## Documentation Index
> Fetch the complete documentation index at: https://controlplanecorporation-jakob-ess-2-0-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Agent

> Define an agent and generate a bootstrap config file for installing the agent in your internal environment or at one of the cloud providers.

## Overview

Follow these steps to define an [agent](/reference/agent) and generate a bootstrap config file that will be used when installing
the agent within your internal environment or at one of the cloud providers.

## Prerequisites

* Review the [agent](/reference/agent) reference page.
* Have [permissions](/reference/policy#permissions) to create an [agent](/reference/agent).
* Optional: Install the [CLI](/cli-reference/installation).

## Create using the UI Console

1. Create a new agent using one of the following methods:

   * Click `Agents` in the left menu, then click `New`, or
   * Click the `Create` dropdown in the upper right corner and select `Agent`.

2. Enter a unique name and optional description.

3. Optional: Click `Tags` and enter any [tags](/core/misc#tags).

4. Click `Create`. The console will display the bootstrap config JSON. Save the JSON manually or click `Download Config File`.

5. Click `Next`. The scripts displayed are generated using the bootstrap config. Copy or download the appropriate script: `User Data script` for AWS and Azure and the `Startup script` for GCP, as it will be used during the installation of the agent.

6. Click `Done`.

<Warning>
  Properly save the bootstrap config JSON text. It will not be accessible after closing the modal. If you lose the text, you will need to delete and recreate the agent.
</Warning>

## Create using the CLI

1. At a command prompt, execute the following to create an agent:

```bash theme={null}
cpln agent create --name NEW_AGENT_NAME --org ORG_NAME > bootstrap-config.json
```

2. The output of the command will be the bootstrap config JSON text. Executing the command above will save the text in a file called `bootstrap-config.json`.

<Info>
  The `User Data script` for AWS and Azure and the `Startup script` for GCP must be obtained in the UI. These steps are covered in [Configure an Agent](/guides/setup-agent).
</Info>

<Tip>
  Detailed CLI documentation is available in the [agent CLI reference](/cli-reference/commands/agent).
</Tip>

## Next Steps

Once the bootstrap config file or provisioning scripts have been generated and saved, follow the [Configure an Agent](/guides/setup-agent) guide to install and configure an agent:

* [Amazon Web Services (AWS)](/guides/setup-agent#aws)
* [Microsoft Azure](/guides/setup-agent#azure)
* [Google Cloud Platform (GCP)](/guides/setup-agent#gcp)
* [Running locally in Docker](/guides/setup-agent#running-locally-in-docker)
* [Kubernetes (k8s) Cluster](/guides/setup-agent#kubernetes-k8s-cluster)
