여러 버전의 에이전트 흐름, 플레이북, 도구를 만들어 별도의 제공 환경에 배포할 수 있습니다.
흐름, 플레이북 또는 도구를 수정할 때는 초안을 수정합니다.
언제든지 초안을 버전으로 저장할 수 있습니다.
버전은 흐름, 플레이북 또는 도구 데이터와 관련 에이전트 데이터의 변경할 수 없는 스냅샷입니다. 흐름의 경우 여기에는 인텐트, 항목, 웹훅, 페이지, 경로 그룹이 포함됩니다. 플레이북의 경우 여기에 예시만 포함됩니다.
초안을 저장하면 기본 환경에 배포됩니다.
특정 버전을 만들어 커스텀 환경에 배포할 수 있습니다.
다음과 같은 다양한 커스텀 환경을 만들 수 있습니다.
테스트
개발
프로덕션
또한 개발 및 테스트 환경에서 프로덕션 환경을 격리할 수 있도록 환경 특정 웹훅을 만들 수 있습니다.
프로덕션 트래픽 권장사항
프로덕션 트래픽에 항상 버전 사용
초안은 팀의 개발자가 변경할 때마다 업데이트됩니다.
특히 여러 사람에게 에이전트에 대한 쓰기 액세스 권한이 있는 경우 초안이 의도치 않게 중단되기 쉽습니다.
또한 학습이 지연되거나 수동 실행이 필요할 수 있으므로 최근에 수정한 초안이 학습된 모델과 일치하지 않을 수 있습니다.
항상 프로덕션 트래픽에 버전을 사용해야 합니다.
초안을 프로덕션 버전으로 승격하기 전에 테스트해야 합니다. 그러면 문제가 발견될 경우 이전 버전으로 롤백할 수 있습니다.
항상 환경 특정 웹훅 사용
에이전트를 업데이트할 때는 업데이트가 웹훅 코드에 대해 상호 의존적인 경우가 많습니다.
이러한 변경사항을 개발 및 테스트하는 동안 다음이 필요합니다.
세션이 활성 상태인 동안 프로덕션 환경에서 버전을 변경할 경우 일부 활성 세션에 에이전트 오류가 발생할 수 있습니다.
이러한 오류는 이전 및 신규 버전이 서로 일치하지 않아 세션 상태가 중단될 경우에 발생할 수 있습니다.
이로 인해 다운타임 또는 사용량이 많지 않은 시간 중에 버전을 변경하도록 계획해야 합니다.
초안에 버전 로드
언제든지 초안에 버전을 로드하여 기본 환경에서 수정하고 사용할 수 있습니다.
흐름 버전을 초안으로 로드하면 인텐트 및 항목과 같은 에이전트 레벨 리소스를 포함하여 여러 리소스를 에이전트에서 업데이트할 수 있습니다.
콘솔 또는 API를 사용하여 버전을 초안으로 로드할 때 에이전트 레벨 리소스를 덮어쓸지 여부를 선택할 수 있습니다.
마찬가지로 플레이북 버전을 초안으로 복원하면 초안의 기존 플레이북과 예시가 덮어써집니다. 도구를 복원하면 초안에서 기존 도구가 덮어쓰기됩니다.
[[["이해하기 쉬움","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\u003eDrafts of agent flows, playbooks, or tools can be saved as immutable versions, which are snapshots of the data and associated agent information at a specific time.\u003c/p\u003e\n"],["\u003cp\u003eWhile drafts are deployed to the default environment, versions can be deployed to custom environments like testing, development, or production, allowing for different stages of development.\u003c/p\u003e\n"],["\u003cp\u003eIt is recommended to use versions for production traffic rather than drafts, as drafts are subject to frequent updates and potential inconsistencies, especially with multiple developers.\u003c/p\u003e\n"],["\u003cp\u003eEnvironment-specific webhooks should be utilized to isolate production environments from development and testing environments, especially when making interdependent updates to agent and webhook code.\u003c/p\u003e\n"],["\u003cp\u003eYou can load any version back to draft, allowing it to be edited, and, if you are using flow versions, you can compare different versions side-by-side to highlight the differences.\u003c/p\u003e\n"]]],[],null,["# Versions and environments\n\nYou can create multiple versions of your agent flows, [playbooks](/dialogflow/cx/docs/concept/playbook)\nand tools and deploy them to separate serving environments.\n\nWhen you edit a flow, playbook or tool,\nyou are editing the *draft* .\nAt any point, you can save the draft as a *version*.\nA version is an immutable snapshot of your flow, playbook or tool data\nand associated agent data. For flows, this includes\nintents, entities, webhooks, pages, route groups. For playbooks, this includes\nonly examples.\n\nWhen you save a draft,\nit is deployed to the *default environment* .\nWhen you create specific versions,\nyou can deploy them to *custom environments*.\nYou can create a variety of custom environments such as:\n\n- testing\n- development\n- production\n\nIn addition,\nyou can create\n[environment-specific webhooks](/dialogflow/cx/docs/concept/webhook#environment-specific),\nso that you can isolate your production environment\nfrom development and testing environments.\n\nProduction traffic best practices\n---------------------------------\n\n### Always use versions for production traffic\n\nA draft is updated every time a developer on your team makes a change.\nIt is possible to break a draft unintentionally,\nespecially if multiple people have write access to the agent.\nIn addition, a recently edited draft\nmay be inconsistent with the trained model,\nbecause training may have a delay or require manual execution.\n\nYou should always use versions for your production traffic.\nDraft resources should be tested before promoting them to production versions,\nand you can rollback to a previous version if any problems are discovered.\n\n### Always use environment-specific webhooks\n\nWhen making updates to your agent,\nyou often have interdependent updates to your webhook code.\nDuring development and testing of these changes, you want the following:\n\n- To test the agent updates against the webhook code updates.\n- To avoid deploying your webhook code to production until you have completed testing.\n\nUsing\n[environment-specific webhooks](/dialogflow/cx/docs/concept/webhook#environment-specific)\nachieves both of these goals.\n\n### Consider possible agent errors while changing versions\n\nIf you change a 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\nLoad a version to draft\n-----------------------\n\nAt any time,\nyou can load a version to draft,\nso it is editable and used by the default environment.\n\nLoading a flow version to draft\ncan update multiple resources in an agent,\nincluding agent-level resources like intents and entities.\nWhen loading a version to draft with either the console or API,\nyou can choose whether agent-level resources will be overwritten.\n\nSimilarly, restoring a playbook version to draft will overwrite the existing\nplaybook in draft and its examples. And restoring a tool will overwrite the\nexisting tool in draft.\n\nManage versions\n---------------\n\nTo manage your versions: \n\n### Console\n\nTo list the current versions for a flow:\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Click the **Shared Resources** tab.\n5. Click **Versions**.\n6. The agent flows are listed. Select one.\n7. The versions are listed for the selected flow.\n\nTo list the current versions for a playbook:\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the playbook\n5. Click **Version History**.\n6. Click **View version history**.\n7. The versions are listed for the selected playbook.\n\nTo list the current versions for a tool:\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Select the tool\n5. Click **Version History**.\n6. Click **View version history**.\n7. The versions are listed for the selected tool.\n\nThe following information is displayed for each resource:\n\n- **Display name**: The version display name.\n- **Version ID**: The ID for the version.\n- **NLU Type** : The [NLU type](/dialogflow/cx/docs/concept/agent-settings#settings-ml) for the flow version.\n- **Creation timestamp**: The date and time that the version was created.\n- **Status** : The training status. A flow version is not ready to use until the status is marked as **Ready**.\n\nTo create a new version, click the **Create** button and provide the\n**Display name** and **Description** for the version.\n\nTo load a specific flow version as the draft flow:\n\n1. Hold the pointer over a version row.\n2. Click the option *more_vert* button.\n3. Click the **Load to draft** option.\n4. An option is provided to overwrite agent-level data when loading.\n\nTo delete a specific flow version:\n\n1. Hold the pointer over a version row.\n2. Click the option *more_vert* button.\n3. Click the **Delete version** option.\n\n### API\n\nSee the methods for the `Version` type.\n\n\nGo to the Version API reference \n**Select a protocol and version for the Version reference:**\n\nClose\n\n\u003cbr /\u003e\n\n| **Note:** The `load` method has a `allowOverrideAgentResources` field, which can be used to control whether agent level resources are overwritten when restoring a flow as the draft flow.\n| **Note:** When calling the `delete` method to delete a version, you must first remove all references to the version in environments data.\n\nCompare flow versions\n---------------------\n\n| **Note:** **Compare versions** is limited by 2MB response size. Use [REST API method](/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.flows.versions/compareVersions) to overcome this limitation.\n\nOnce you have created flow versions,\nyou can use the **compare versions** tool\nto see a side-by-side comparison between flow versions or the draft version. This features is not available for playbooks.\nTo compare versions: \n\n### Console\n\n1. Hold the pointer over a version row.\n2. Click the option *more_vert* button.\n3. Click the **Compare versions** option.\n4. Select another flow version or draft flow for comparison.\n5. A side-by-side comparison is shown.\n\n### API\n\nSee the `compareVersions` method for the `Version` type.\n\n\nGo to the Version API reference \n**Select a protocol and version for the Version reference:**\n\nClose\n\n\u003cbr /\u003e\n\nManage environments\n-------------------\n\nTo manage your agent environments: \n\n### Console\n\nTo list the current environments for an agent:\n\n1. Open the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx/projects).\n2. Choose your Google Cloud project.\n3. Select your agent.\n4. Click the **Shared Resources** tab.\n5. Click **Environments**.\n6. The agent environments are listed.\n\nTo create a new environment, click the **Create** button and provide\ninformation.\n\nTo select flow, playbook and tool versions and configure an environment,\nclick an environment and provide information.\n\nTo view editing history of an environment,\nclick the history\n*history*\nbutton near the right side of an environment in the list.\n\nTo copy an environment resource name that includes the environment ID,\nclick the copy\n*content_copy*\nbutton near the right side of an environment in the list.\n\nTo delete an environment,\nclick the delete\n*delete*\nbutton near the right side of an environment in the list.\n\n### API\n\nSee the methods for the `Environment` type.\n\n\nGo to the Environment API reference \n**Select a protocol and version for the Environment reference:**\n\nClose\n\n\u003cbr /\u003e\n\n| **Note:** To reference a draft flow, use `0` as the flow version ID.\n\nSpecify environment for session calls\n-------------------------------------\n\nUsing either the\n[console simulator](/dialogflow/cx/docs/concept/console#simulator)\nor the API,\nyou can specify an environment when making runtime session calls.\nIf an environment is not specified,\nthe default environment is used. \n\n### Console\n\nWhen using the console simulator,\nselect the **Test agent in environment** option,\nthen select an environment.\n\n### API\n\nTo specify an environment for `detectIntent`, `streamingDetectIntent`,\n`matchIntent`, and session entity REST calls;\nalter the URL by inserting `environments/environment-id`\nbetween the `agent` and `sessions` path parameters.\n\nFor example, the following URL uses the `6db409d7-57ac-41d7-83bd-89b8768e2745`\nenvironment ID: \n\n https://dialogflow.googleapis.com/v3/projects/my-project-id/locations/us/agents/my-agent-id/environments/6db409d7-57ac-41d7-83bd-89b8768e2745/sessions/my-session-id:detectIntent\n\nSpecify flow versions for session calls\n---------------------------------------\n\nUsing either the\n[console simulator](/dialogflow/cx/docs/concept/console#simulator)\nor the API,\nyou can specify a set of flow versions when making runtime session calls.\nThe selected flow versions don't necessarily need to be\nreferenced in any environment. \n\n### Console\n\nWhen using the console simulator,\nselect the **Test agent with specific flow versions** option,\nthen select flow versions.\n\n### API\n\nTo specify flow versions for `detectIntent`, `streamingDetectIntent`,\n`matchIntent`, and session entity REST calls;\nprovide the chosen flow versions in the `query_parameters.flow_versions`\nfield of the request."]]