# Global Variables

<figure><img src="https://2739525811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGUcjvdv7MzVy7GYqImRT%2Fuploads%2FeuFpKpJbaNB3sI1H17PA%2FScreenshot%202025-04-26%20at%2020.10.22.png?alt=media&#x26;token=8e83bb36-3ec1-48b4-a74a-4b84050fb9bc" alt=""><figcaption></figcaption></figure>

The **Global Variables** feature in BroxiAI enables users to manage reusable values across different fields, such as API keys, authentication tokens, or configuration parameters. This helps centralize management, enhances security, and simplifies project configuration.

**Overview**

* **Global Variables** are stored securely.
* Variables can be designated as **Private** (hidden value) or **Public** (visible value).
* Private variables are encrypted and displayed as "Protected" in the interface.

**How to Create a Global Variable**

<figure><img src="https://2739525811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGUcjvdv7MzVy7GYqImRT%2Fuploads%2FTAv1yK43jcH8mg9M1jCC%2FScreenshot%202025-04-26%20at%2020.11.10.png?alt=media&#x26;token=19a2a58a-18a2-447b-bf8d-7fbab2cfb849" alt=""><figcaption></figcaption></figure>

1. **Click "Add New"**: This opens the **Create Variable** form.
2. **Set Variable Type**:
   * **Private**: The variable’s value will be hidden and encrypted.
   * **Public**: The value will be visible to all users with access.
3. **Enter Variable Name**:
   * Choose a clear and descriptive name (e.g., `Stripe_API_Key`, `Database_URL`).
   * Variable names should be unique.
4. **Enter Variable Value**:
   * Input the sensitive data you want to store (e.g., your API key, access token).
   * For Private types, the value field will be masked automatically.
5. **Assign to Fields**:
   * Select the specific fields where this variable should be accessible.
   * This step ensures proper application of the variable within workflows or templates.
6. **Save**:
   * After filling in the details, click **Save** to add the variable.
   * The new variable will appear in the list, showing as “Protected” if private.

**Managing Existing Variables**

* **View**: You can see all created variables with their type and assigned fields.
* **Edit**: Variables can be edited by selecting them from the list.
* **Delete**: Use the trash icon to remove a variable if it is no longer needed.
* **Restore**: If accidental deletion happens, you can use the restore button if available.

**Best Practices**

* Always mark sensitive information as **Private**.
* Use meaningful names to easily identify the purpose of each variable.
* Regularly review and update variables to maintain security and consistency.

### Default environment variables

BroxiAI automatically detects and converts some environment variables into global variables of the type **Private**, which are applied to the specific fields in components that require them. Currently, the following variables are supported:

* `ANTHROPIC_API_KEY`
* `ASTRA_DB_API_ENDPOINT`
* `ASTRA_DB_APPLICATION_TOKEN`
* `AWS_ACCESS_KEY_ID`
* `AWS_SECRET_ACCESS_KEY`
* `AZURE_OPENAI_API_DEPLOYMENT_NAME`
* `AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME`
* `AZURE_OPENAI_API_INSTANCE_NAME`
* `AZURE_OPENAI_API_KEY`
* `AZURE_OPENAI_API_VERSION`
* `COHERE_API_KEY`
* `COMPOSIO_API_KEY`
* `GOOGLE_API_KEY`
* `GROQ_API_KEY`
* `HUGGINGFACEHUB_API_TOKEN`
* `NOVITA_API_KEY`
* `OPENAI_API_KEY`
* `PINECONE_API_KEY`
* `SAMBANOVA_API_KEY`
* `SEARCHAPI_API_KEY`
* `SERPAPI_API_KEY`
* `TAVILY_API_KEY`
* `UPSTASH_VECTOR_REST_TOKEN`
* `UPSTASH_VECTOR_REST_URL`
* `VECTARA_API_KEY`
* `VECTARA_CORPUS_ID`
* `VECTARA_CUSTOMER_ID`
