에이전트를 수정할 때는 초안 에이전트를 수정합니다.
언제든지 초안 에이전트를 특정 에이전트 버전으로 저장할 수 있으며, 이는 에이전트의 변경할 수 없는 스냅샷이 됩니다.
초안 에이전트를 저장하면 이 에이전트가 기본 환경에 게시됩니다.
에이전트 버전을 만들 때는 커스텀 환경에 게시할 수 있습니다.
다음 용도로 다양한 커스텀 환경을 만들 수 있습니다.
테스트
개발
프로덕션
기타
프로덕션 트래픽
프로덕션 트래픽에 항상 에이전트 버전 사용
팀의 개발자가 변경할 때마다 초안 에이전트가 업데이트됩니다.
특히 여러 사람에게 에이전트에 대한 쓰기 액세스 권한이 있는 경우 초안 에이전트가 의도치 않게 중단되기 쉽습니다.
또한 학습이 지연되거나 수동 실행이 필요할 수 있으므로 최근에 수정한 초안 에이전트가 학습된 모델과 일치하지 않을 수 있습니다.
항상 프로덕션 트래픽에 에이전트 버전을 사용해야 합니다.
초안 에이전트를 프로덕션 버전으로 승격하기 전에 테스트해야 합니다. 그러면 문제가 발견될 경우 이전 버전으로 롤백할 수 있습니다.
버전 변경 중에 발생할 수 있는 에이전트 오류 고려
세션이 활성 상태인 동안 프로덕션 환경에서 에이전트 버전을 변경할 경우 일부 활성 세션에 에이전트 오류가 발생할 수 있습니다.
이러한 오류는 이전 및 신규 버전이 서로 일치하지 않아 세션 상태가 중단될 경우에 발생할 수 있습니다.
이로 인해 다운타임 또는 사용량이 많지 않은 시간 중에 버전을 변경하도록 계획해야 합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eAgent versions are immutable snapshots of your agent, while the draft agent is the editable, live version that changes with each update.\u003c/p\u003e\n"],["\u003cp\u003eProduction traffic should always use agent versions to ensure stability, and draft agents should undergo testing before being promoted to production.\u003c/p\u003e\n"],["\u003cp\u003eCustom environments can be created for testing, development, or production and allow you to publish different agent versions to each one.\u003c/p\u003e\n"],["\u003cp\u003eChanging an agent version in a production environment during active sessions may cause errors due to potential inconsistencies between versions, so schedule version changes during down-time or off-peak hours.\u003c/p\u003e\n"],["\u003cp\u003eYou can revert an environment to a previous agent version or load a prior version to draft, but loading a previous version to draft overwrites all recent changes to draft and is irreversible.\u003c/p\u003e\n"]]],[],null,["# Versions and environments\n\nYou can create multiple versions of your agent\nand publish them to separate environments.\n\nWhen you edit an agent,\nyou are editing the *draft agent* .\nAt any point, you can save the draft agent as an *agent version*,\nwhich is an immutable snapshot of your agent.\n\nWhen you save the draft agent,\nit is published to the *default environment* .\nWhen you create agent versions,\nyou can publish them to *custom environments*.\nYou can create a variety of custom environments for:\n\n- testing\n- development\n- production\n- etc.\n\nProduction traffic\n------------------\n\n### Always use agent versions for production traffic\n\nA draft agent is updated every time a developer on your team makes a change.\nIt is easy to break a draft agent unintentionally,\nespecially if multiple people have write access to the agent.\nIn addition, a recently edited draft agent\nmay be inconsistent with the trained model,\nbecause training may have a delay or require manual execution.\n\nYou should always use agent versions for your production traffic.\nDraft agents should be tested before promoting them to production versions,\nand you can rollback to a previous version if any problems are discovered.\n\n### Consider possible agent errors while changing versions\n\nIf you change an agent version in your production environment\nwhile sessions are active,\nit may cause agent errors for some active sessions.\nThese errors may happen if the previous and new versions\nare inconsistent with each other\nin a way that disrupts session state.\nDue to this,\nyou should plan to change versions during\ndown-time or off-peak hours.\n\nPublish a version in a new environment\n--------------------------------------\n\nTo publish an agent draft to a version\nand create a custom environment: \n\n### Console\n\n1. Go to the [Dialogflow ES console](https://dialogflow.cloud.google.com).\n2. Select your agent near the top of the left sidebar menu.\n3. Click the settings *settings* button next to the agent name.\n4. Click the **Environments** tab.\n5. Click **Publish a version**.\n6. Add an optional description and click **Next**.\n7. Select **+New Environment**.\n\n | **Note:** You can create an agent version without publishing it by selecting **Create version without publishing** from the environment menu.\n8. Enter an environment name.\n\n9. Choose the fulfillment method for the environment.\n\n10. Select Text-to-speech settings for the environment.\n\n11. Click **Publish**.\n\n12. The environment information is now listed\n in the **Custom environments** section.\n\n### API\n\n1. Call the `create` method for the [Version type](/dialogflow/es/docs/reference/common-types#versions) to create a new agent version.\n2. Call the `create` method for the [Environment type](/dialogflow/es/docs/reference/common-types#environments) to create a new environment. Provide the agent version you just created to the `agentVersion` field.\n\nRevert an environment to a previous version\n-------------------------------------------\n\nYou can revert an environment to a previous agent version: \n\n### Console\n\n1. Click an environment in the **Custom environments** section.\n2. The environment settings dialog opens.\n3. Click the option *more_vert* button for a previously published version in the **Publishing History** section.\n4. Click **Revert to this version**.\n5. The publishing history will be updated.\n\n### API\n\nCall the `patch`/`update` method for the\n[Environment type](/dialogflow/es/docs/reference/common-types#environments)\nto update an environment.\nProvide the agent version you previously created to the `agentVersion` field.\n\nLoad a previous version to draft\n--------------------------------\n\nLoading a previous version to draft\noverwrites the draft agent in the default environment\nwith a selected agent version.\n| **Caution:** Loading a previous version to draft will negate all recent changes to draft and can't be undone. You may want to save the draft to a version before taking these steps.\n\nTo load a previous version to draft: \n\n### Console\n\n1. Go to the [Dialogflow ES console](https://dialogflow.cloud.google.com).\n2. Select your agent near the top of the left sidebar menu.\n3. Click the settings *settings* button next to the agent name.\n4. Click the **Environments** tab.\n5. Click **View all versions** in the **Draft** section.\n6. Click the option *more_vert* button for a version that you want to load to draft.\n7. Click **Load to Draft**.\n8. Click **Yes, I'm sure**.\n9. Reload any open console browser tabs, so they are refreshed with the latest agent data.\n\n### API\n\nCall the `patch`/`update` method for the\n[Environment type](/dialogflow/es/docs/reference/common-types#environments)\nwith the following inputs:\n\n- Use `-` as the environment ID to specify the default environment.\n- Set `allowLoadToDraftAndDiscardChanges` to true.\n- For the `agentVersion` field, supply the agent version that will overwrite the draft agent.\n\nExport a version\n----------------\n\nTo export a version, you need to [load it to draft](#load-to-draft) first, then\n[export the agent](/dialogflow/es/docs/agents-settings#export).\n\nTest your agent in an environment\n---------------------------------\n\nYou can use the API to test your agent in any of your custom environments.\nCall the\n[detect intent](/dialogflow/docs/quick/api)\nmethod, but alter the endpoint URL by inserting\n`environments/environment-name/users/-/` between `agent` and `sessions`.\n\nFor example, the following endpoint uses the \"development\" environment with an unspecified user: \n\n \"https://dialogflow.googleapis.com/v2/projects/my-project-id/agent/environments/development/users/-/sessions/123456789:detectIntent\"\n\nEnvironment-specific settings\n-----------------------------\n\nFulfillment and text-to-speech are configured by the environment,\nso the agent will use the environment's settings for these features.\n\nFor more information about how data is applied at various levels, see\n[agent application levels](/dialogflow/es/docs/data-level).\n\nGoogle Assistant\n----------------\n\nIf you are using\n[Actions on Google release environments](https://developers.google.com/assistant/console/releases),\nsee the versioning limitations for the\n[Dialogflow fulfillment library](/dialogflow/docs/fulfillment-inline-editor#library).\n\nMega agent\n----------\n\nSee [how versions and environments work in mega agents](/dialogflow/es/docs/agents-mega#versions).\n\nLimitations\n-----------\n\nThe following limitations apply:\n\n- Maximum number of environments per agent: 10\n- Maximum number of versions per agent: 1000"]]