> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Manage workspace values and credential references, understand production fallback, and verify environment-specific configuration.

Workspace environment variables hold a value or resource reference for each named environment. Use them to keep integration configuration together. They do not create infrastructure or replace workspace permissions.

<Frame caption="Recording pending: Configure environment values. Follow the written guide below.">
  <img src="https://mintcdn.com/threetonelabs-c2efc9c8/RV32i5440UZIaFHA/images/tutorials/recording-pending.webp?fit=max&auto=format&n=RV32i5440UZIaFHA&q=85&s=55f66d2eef49d8c92c9ac46f84bace35" alt="Recording pending for Configure environment values. No playable video is available yet." width="1600" height="900" className="w-full h-auto aspect-video" loading="lazy" noZoom data-path="images/tutorials/recording-pending.webp" />
</Frame>

## Value types

| Type | Stored value | Use it for |
| - | - | - |
| String | A nonempty string. | Configuration such as a service URL. |
| Secret | A `{secret_id}` reference. | A secret stored through the supported workspace credential workflow. |
| Auth Connection | An `{auth_connection_id}` reference. | A workspace authentication connection. |

Secret and connection references must belong to the same workspace. Do not put a raw credential into a String value, a prompt, or a recorded example.

## Create a variable

You need permission to manage environment variables in the active workspace.

<Steps>
  <Step title="Open environment variables">Go to [Developers > Environment variables](https://threetone.in/app/developers/environment-variables), then select **Add variable**.</Step>
  <Step title="Name and type the variable">In **New variable**, set **Name** and **Type**. Names use 1 to 64 letters, numbers, or underscores. Choose the value type before creating the variable.</Step>
  <Step title="Set the production value">Enter the required **production** value or select the corresponding workspace reference. The variable must have a production value even when you also use another environment.</Step>
  <Step title="Save and inspect">Select **Save**, then reopen the variable and confirm its type, label, and production value or reference.</Step>
</Steps>

<Frame caption="Screenshot pending: A saved String variable with production and staging values. Use a harmless service URL in the capture.">
  <img src="https://mintcdn.com/threetonelabs-c2efc9c8/-FnvNeuT_PFanG1t/images/placeholders/screenshot-pending.svg?fit=max&auto=format&n=-FnvNeuT_PFanG1t&q=85&s=b29809bcbd6979cc43ace35853669b46" alt="Screenshot pending for workspace environment variable values. This illustration shows no actual secret or connection details." width="1600" height="1000" className="w-full h-auto" loading="lazy" noZoom data-path="images/placeholders/screenshot-pending.svg" />
</Frame>

## Add an environment value

Use **Create environment** and **New environment** to add values to existing variables. An environment name starts with a lowercase letter and contains lowercase letters, digits, underscores, or hyphens, up to 64 characters.

An environment is a set of value keys. It does not provision a deployment, database, server, or separate workspace. When a variable lacks a value for the requested environment, the resolver falls back to its production value. Confirm that this fallback is appropriate before testing an integration.

Creating an environment updates variables separately. If part of the operation fails, refresh the page and inspect which values were saved before retrying.

## Update or remove an override

Open the variable or environment detail and use **Edit value** to update it. Use **Remove value** to remove a nonproduction override. Production cannot be removed. Removing an override restores production fallback for that variable and environment.

The current public contract provides create, list, get, and update operations. It does not provide a variable deletion, rename, or type-change endpoint.

## API operations

| Task | Reference |
| - | - |
| Create a variable | [Create environment variable](/api-reference/agents-platform/create-environment-variable) |
| List values | [List environment variables](/api-reference/agents-platform/list-environment-variables) |
| Inspect one variable | [Get environment variable](/api-reference/agents-platform/get-environment-variable) |
| Change supplied environment keys | [Update environment variable](/api-reference/agents-platform/update-environment-variable) |

An update merges the supplied environment keys. A `null` value removes a nonproduction key. The list endpoint supports cursor pagination and filters; an environment filter returns explicitly stored matches, not the resolved production fallbacks.

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Why is production required for a staging-only test?" id="faq-production-value">Every variable must have a production entry because it is the fallback. Use safe test values and review what the integration will actually resolve before making a request.</Accordion>
  <Accordion title="Does an environment create a separate deployment?" id="faq-environment-deployment">No. It only adds configuration values. Create and secure infrastructure separately when your application requires it.</Accordion>
  <Accordion title="Can I paste an API key into a String variable?" id="faq-string-secret">Use the Secret reference type and supported credential storage for secrets. Do not store raw credentials as ordinary text.</Accordion>
  <Accordion title="What should I do after a partial save?" id="faq-partial-environment-save">Refresh and inspect each variable. Retry only the missing or incorrect values so you do not assume every update succeeded.</Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.