# Connections

Before an AI agent can be used, a connection to an AI provider must be configured.\
Connections are managed centrally and can be reused by multiple agents.

<figure><img src="https://870194474-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_kE41Rl4pOtwKfvvQq%2Fuploads%2FPFWjeRinjqOc7DDGZK5d%2Fimage.png?alt=media&#x26;token=09a83f65-399a-4ec6-9990-d4f1b15b212f" alt=""><figcaption></figcaption></figure>

#### Steps

* Navigate to **Data Studio → Connections**
* Click **Add Connection**
* Configure the connection as follows:

#### General settings

| Field     | Description                                                                                                                      |
| --------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **Name**  | A descriptive name for the connection (e.g. `openai-api-key`).                                                                   |
| **Level** | Determines the scope of the connection. Use **Collection** to make the connection available to all agents within the collection. |
| **Type**  | Select **API headers**.                                                                                                          |

#### Setting secret values

After creating the connection, the actual secret values (such as API keys) must be set separately.

This separation ensures that sensitive information is stored securely and is not visible in the connection definitions.

**Steps**

1. Navigate to **Data Studio → Connections**
2. Locate the created connection
3. Click the **three-dot menu** next to the connection
4. Select **Set values**

A dialog will open showing the configured headers, where the secret values can be entered.
