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 discarded.
Switching environments
Open any agent page in the dashboard. The left sidebar contains an environment switcher near the agent name. Click it to open a searchable list of all environments.
- The live environment is marked with a Live badge.
- Select any environment to switch to it. The page reloads showing that environment's settings and configuration.
The agent header
Every agent page has a fixed top header with three controls:
| Control | Description |
|---|---|
| Model selector | Choose or change the AI model for the current environment. |
| Run | Opens the Playground so you can test the current environment's behavior interactively. |
| Publish | A green button with a dropdown containing environment actions (see below). |
Publish dropdown actions
Click the arrow on the Publish button to open the full action menu.
Copy prototype link
Generate a shareable preview URL for the current environment. Use this to let teammates or stakeholders try the draft without publishing it.
Clone to new environment
Create a new draft environment pre-filled with the current environment's configuration. Opens the Create environment modal.
View all environments
Navigate to the Environments page, which lists every environment with its status, alias, and actions.
Discard changes
Permanently delete a draft environment and all unsaved changes. Not available on the Main (live) environment.
Note
Edit traffic split appears in the dropdown but is not yet available. Traffic splitting between environments is coming soon.
Creating a new environment
- 1
Open the Publish dropdown
Click the arrow on the green Publish button and select Clone to new environment.
- 2
Fill in the Create environment modal
Field Description Name A human-readable label shown in the switcher and the Environments page. Alias A short, unique-per-agent identifier. Used when targeting a specific environment from the widget SDK. Clone from The existing environment to copy configuration from. Defaults to the current environment. - 3
Create
Click Create. The new draft environment opens immediately. All changes you make are isolated to this environment until you publish.
The Environments page
Open the Environments page via Publish → View all environments. It lists every environment for the current 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 | Timestamp of the most recent change. |
| Actions | Select (switch to), Clone, or Discard the environment. |
Publishing a draft
When a draft environment is ready to go live:
- Switch to the draft environment using the sidebar switcher.
- Click the green Publish button.
- The draft becomes the new Main (Live) environment. The previous Main is replaced.
Warning
Publishing is irreversible. The previous live environment is not automatically preserved. If you need to roll back, clone the current Main 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.