# Create an environment configuration

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/air/llms.txt).

An environment configuration defines the image, resources, variables, secrets, network access, and startup commands that a task runs with. Create one per repository, or one per way of working with a repository, and reuse it for every task.

You can let an agent build the configuration by inspecting the repository, or fill it in yourself.

By default, an agent does the work for you: it analyzes the repository, asks you for the variables and secrets it needs, adds a [startup script](startup-commands.html#cloud_startup_script), and checks that the setup works. You can also fill in a configuration yourself.

Procedure: Create a configuration with an agent

1. Open Air Teams at [https://air.jetbrains.cloud](https://air.jetbrains.cloud) and go to `Settings | Environments`.

2. Click New Environment.

3. Select the Project that owns the configuration, or No project to keep it [personal](configure-environments.html#cloud_personal_and_project_environments), then select the Repository.

4. Select the Agent that runs the setup. You can use any agent and model available to you. [Learn about agents and models](select-agents-and-models.html).

5. Click Start Agent.

Air Teams adds the configuration to the list in the Configuring state and starts a task that fills it in.

6. Answer the agent's questions. The agent can read your code, but it can't invent the values behind it, so it asks you for the environment variables and secrets it can't discover on its own. To open the task from the configuration page, click Open Task.

7. When the agent finishes, review the parameters it set.

The agent also commits the startup script to a separate branch in your repository, not to your default branch. Air Teams runs the script from the branch a task checks out, so review that branch and merge it to use the script in later tasks.

Procedure: Create a configuration manually

1. Open Air Teams at [https://air.jetbrains.cloud](https://air.jetbrains.cloud) and go to `Settings | Environments`.

2. Open the list next to New Environment and select Configure Manually….

3. Select the repository.

4. Configure the environment:

* Name – a unique configuration name.

* Repository – the repository this configuration applies to.

* VM Size – the amount of CPU, RAM, and disk space available for the task. [Learn about VM sizes](vm-resources.html#cloud_vm_resources)

* Internet access – whether the agent can access the internet, and if so, which domains it can reach. [Learn how to configure internet access](environment-network-access.html#cloud_limit_internet_access)

* Additional domains – extra domains that are allowed when internet access is limited.

* Exposed ports – the ports the environment publishes, so that a server the agent starts is reachable from outside the environment. [Learn how to expose ports](exposed-ports.html#cloud_exposed_ports)

* Environment Variables – variables and secrets available to the agent in the cloud environment. Add plain-text variables, personal or shared secrets, or secrets read from a [connected secrets provider](environment-variables-and-secrets.html#cloud_external_secrets) such as HashiCorp Vault. [Learn how to add variables and secrets](environment-variables-and-secrets.html#cloud_variables_and_secrets)

5. Click Save.

Now you can select this configuration when you run a cloud task for this repository.

