Agent Environments
Manage draft and live environments for your ChatDrift agent to iterate safely without affecting production users.
Agent Environments
Every ChatDrift agent has at least one environment: the Main environment, which is the live version your users interact with. You can create additional draft environments to test model changes, updated instructions, or new tools before promoting them to production.
The environment model
| Concept | Description |
|---|---|
| Main | The single live environment. Always shown with a Live badge. This is what widget users see. |
| Draft | Any other environment you create. Not visible to users until published. |
Publishing a draft environment replaces Main and makes the draft live. The previous Main is archived.
Switching environments
Open any agent page in the dashboard. The agent sidebar contains an environment switcher (Switch environment) near the agent name. Hover the Agents icon in the left rail to preview the sidebar, or pin it open. Click it to open a searchable list of Main and your draft environments.
- The live environment is marked with a Live badge.
- Draft environments show their name and alias.
- Select any environment to switch to it. Every agent tab then shows that environment's settings.
- Choose New environment at the bottom of the list to create a draft.
Publishing and sharing a draft
While a draft environment is selected, a bar appears at the top of every agent tab with three actions. It is hidden while Main is selected.
| Control | Description |
|---|---|
| Copy preview link | Copy a shareable widget preview URL for the draft. Use this to let teammates or stakeholders try the draft without publishing it. Requires the draft to have an alias. |
| Discard | Archive the draft so it can no longer be edited. Not available on Main. |
| Publish | Make the draft the live Main environment. |
Note
While a draft is selected, edits to Settings and Customize apply to the draft. Instructions, Skills, Guardrails, Data Sources, and connected content still edit the live agent directly. The bar shows a reminder of this.
Creating a new environment
- 1
Open the New environment dialog
Choose New environment in the environment switcher, or click New environment on the Environments tab of the agent.
- 2
Fill in the dialog
Field Description Name A human-readable label shown in the switcher and the Environments tab. Alias A short, unique-per-agent identifier made of lowercase letters, numbers, and single dashes (for example staging-v2).mainis reserved. Used when targeting a specific environment from the widget SDK.Clone from The existing environment to copy configuration from. Defaults to Main. - 3
Create
Create the environment. All changes you make are isolated to this draft until you publish.
The Environments tab
Open the Environments tab on an agent page to see every environment for the agent.
| Column | Description |
|---|---|
| Name | The display name you gave the environment. |
| Alias | The short identifier for the environment. |
| Status | Live (the current Main) or Draft. |
| Last updated | Time of the most recent change. |
| Actions | Select (switch to), Clone, Copy preview link, and, for drafts, Publish and Discard. |
Publishing a draft
When a draft environment is ready to go live:
- Select the draft in the environment switcher.
- Click Publish and confirm.
- The draft becomes the new Main (Live) environment. The previous Main is archived.
Warning
Publishing cannot be undone from the dashboard. The previous live environment is archived and can no longer be edited. If you may need to go back, clone Main into a new environment before publishing a draft.
Environment aliases
Each environment has an alias — a short identifier scoped to its agent. Aliases are used by the widget SDK to pin a chat session to a specific environment.
See Targeting Environments from the Widget for how to pass a versionAlias when embedding the widget.