Versions and environments

You can create multiple versions of your agent flows and deploy them to separate serving environments.

When you edit a flow, you are editing a draft flow. At any point, you can save a draft flow as a flow version. A flow version is an immutable snapshot of your flow data and associated agent data like intents, entities, webhooks, pages, route groups, etc.

When you save a draft flow, it is deployed to the default environment. When you create specific flow versions, you can deploy them to custom environments. You can create a variety of custom environments for:

  • testing
  • development
  • production
  • etc.

Load a flow version to draft

At any time, you can load a flow version to draft, so it is editable and used by the default environment.

Loading a flow version to draft can update multiple resources in an agent, including agent-level resources like intents and entities. When loading a version to draft with either the console or API, you can choose whether agent-level resources will be overwritten.

Manage flow versions

To manage your flow versions:

Console

To list the current versions for a flow:

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Click Agent Settings.
  5. Click the Version tab.
  6. The agent flows are listed. Select one.
  7. The versions are listed for the selected flow.

The following information is displayed for each flow:

  • Version: The version name.
  • NLU Type: The NLU type for the flow version.
  • Version Created: The date and time that the version was created.
  • Status: The training status. A flow version is not ready to use until the status is marked as Ready.

To create a new flow version, click the Add Version button and provide information.

To load a specific flow version as the draft flow, click the load button near the right side of a version in the list. An option is provided to overwrite agent-level data when loading.

To delete a specific flow version, click the delete button near the right side of a version in the list.

API

See the methods for the

Select a protocol and version for the Version reference:

Protocol V3beta1
REST Version resource
RPC Version interface

Manage environments

To manage your agent environments:

Console

To list the current environments for an agent:

  1. Open the Dialogflow CX Console.
  2. Choose your GCP project.
  3. Select your agent.
  4. Click Agent Settings.
  5. Click the Environment tab.
  6. The agent environments are listed.

To create a new environment, click the Add Environment button and provide information.

To select flow versions and configure an environment, click an environment and provide information.

To view editing history of an environment, click the history button near the right side of an environment in the list.

To copy an environment resource name that includes the environment ID, click the copy button near the right side of an environment in the list.

To delete an environment, click the delete button near the right side of an environment in the list.

API

See the methods for the

Select a protocol and version for the Environment reference:

Protocol V3beta1
REST Environment resource
RPC Environment interface

Specify environment for runtime session calls

You can specify an environment for runtime session calls, like detectIntent, streamingDetectIntent, matchIntent, and session entity calls. To specify an environment, alter the endpoint URL by inserting environments/environment-id between the agent and sessions path parameters.

For example, the following endpoint uses the 6db409d7-57ac-41d7-83bd-89b8768e2745 environment ID:

https://dialogflow.googleapis.com/v3beta1/projects/my-project-id/locations/us/agents/my-agent-id/environments/6db409d7-57ac-41d7-83bd-89b8768e2745/sessions/my-session-id:detectIntent

If an environment is not specified, the default environment is used.