You can create multiple versions of your agent and publish them to separate environments.
When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent.
When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for:
Output only. The unique identifier of this agent environment. Supported formats: - projects/<Project ID>/agent/environments/<Environment ID> - projects/<Project ID>/locations/<Location
ID>/agent/environments/<Environment ID>
description
string
Optional. The developer-provided description for this environment. The maximum length is 500 characters. If exceeded, the request is rejected.
agentVersion
string
Optional. The agent version loaded into this environment. Supported formats: - projects/<Project ID>/agent/versions/<Version ID> - projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
ID>
Output only. The last update time of this environment. This field is read-only, i.e., it cannot be set by create and update methods.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-21 UTC."],[[["\u003cp\u003eAgent environments allow you to manage multiple versions of your agent, which can be published to distinct environments such as testing, development, or production.\u003c/p\u003e\n"],["\u003cp\u003eEditing an agent modifies the draft agent, and saving the draft creates an immutable agent version that can be published to the default or custom environments.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON representation of an agent environment includes fields like \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003edescription\u003c/code\u003e, \u003ccode\u003eagentVersion\u003c/code\u003e, \u003ccode\u003estate\u003c/code\u003e, \u003ccode\u003eupdateTime\u003c/code\u003e, \u003ccode\u003etextToSpeechSettings\u003c/code\u003e, and \u003ccode\u003efulfillment\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAgent environment fields such as \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003estate\u003c/code\u003e and \u003ccode\u003eupdateTime\u003c/code\u003e are output only, meaning they can not be set when creating and updating.\u003c/p\u003e\n"],["\u003cp\u003eSeveral methods are available for managing agent environments, including creating, deleting, getting, listing, and updating environments.\u003c/p\u003e\n"]]],[],null,["# REST Resource: projects.locations.agent.environments\n\n- [Resource: Environment](#Environment)\n - [JSON representation](#Environment.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Environment\n---------------------\n\nYou can create multiple versions of your agent and publish them to separate environments.\n\nWhen you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent.\n\nWhen you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for:\n\n- testing\n- development\n- production\n- etc.\n\nFor more information, see the [versions and environments guide](https://cloud.google.com/dialogflow/docs/agents-versions)."]]