대화형 에이전트 (Dialogflow CX)는 여러 Git 제공업체(GitHub, GitLab, Bitbucket 등)와 통합됩니다.
이 통합을 통해 에이전트를 JSON으로 내보내 Git 제공업체에 푸시(push)하고 에이전트 복원을 위해 Git 제공업체에서 풀(pull)할 수 있습니다.
Git 제공업체에 푸시된 JSON 내보내기 형식은 내보낸 에이전트의 확장된 zip 파일 콘텐츠입니다.
이 기능을 사용하면 다음과 같은 Git 제공업체 소스 제어 기능을 활용할 수 있습니다.
코드 검토 도구를 사용하여 에이전트 변경사항 검토
비교 도구를 사용하여 에이전트 차이점 검사
병합
제한사항
다음과 같은 제한사항이 적용됩니다.
[이전 통합 버전만 해당]
GitHub API는 단일 커밋에서 업데이트할 수 있는 파일 수를 제한합니다.
파일 수가 500개를 초과하면 대화형 에이전트 (Dialogflow CX)에서 GitHub로 내보낼 수 없습니다.
이 경우 에이전트를 zip으로 내보내고 머신에서 Git CLI를 사용하여 에이전트 파일을 GitHub로 내보내면 됩니다.
이 제한은 이후 대화형 에이전트(Dialogflow CX) 출시 버전에서 해결될 예정입니다.
대화형 에이전트 (Dialogflow CX)에서 이러한 저장소에 액세스할 수 없으므로 GitHub 비공개 액세스 자체 호스팅 저장소는 지원되지 않습니다.
Git 저장소에는 에이전트 내보내기에서 내보낸 에이전트 파일 이외의 파일은 포함될 수 없습니다. 저장소의 다른 모든 파일은 내보낼 때마다 삭제됩니다.
구성
이 기능을 구성하려면 Git 제공업체에서 액세스 토큰을 획득하고, Secret Manager에 저장하고, 대화형 에이전트 (Dialogflow CX)에 보안 비밀 리소스를 제공해야 합니다.
대화형 에이전트 (Dialogflow CX)에 대해 이 통합을 구성하려면 다음 단계를 따르세요.
Dialogflow 서비스 에이전트가 Secret Manager의 액세스 토큰 보안 비밀에 액세스할 수 있는 권한을 제공합니다.
에이전트 프로젝트의 gcp-sa-dialogflow.iam.gserviceaccount.com 서비스 계정에 Secret Manager Secret Accessor 역할을 제공합니다.
Secret Manager 보안 비밀에 대한 액세스 권한 부여를 참고하세요.
[[["이해하기 쉬움","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\u003eConversational Agents (Dialogflow CX) integrates with Git providers like GitHub, GitLab, and Bitbucket, allowing users to export agents to JSON and pull from a Git provider for agent restoration.\u003c/p\u003e\n"],["\u003cp\u003eThis integration allows leveraging Git source control features, such as agent change reviews, diff comparisons, and merges, within the context of Dialogflow CX agents.\u003c/p\u003e\n"],["\u003cp\u003eTo configure the integration, users must obtain an access token from their Git provider, store it in Secret Manager, and provide the secret resource to Conversational Agents (Dialogflow CX).\u003c/p\u003e\n"],["\u003cp\u003eThe Push feature exports the entire agent to the selected Git branch, overwriting existing files in the repository, while the Restore feature pulls data from the selected branch to overwrite the Conversational Agents (Dialogflow CX) agent.\u003c/p\u003e\n"],["\u003cp\u003eMultiple users can use this feature by working on different branches, pushing their changes, creating merge requests, and having another user review and restore the approved changes to the production agent branch.\u003c/p\u003e\n"]]],[],null,["# Git export/restore\n\n| **Note:** In February 2025, a new version of this integration was released. Users of the old version can provide tokens without using secrets. The documentation below applies primarily to the new version.\n\nConversational Agents (Dialogflow CX) integrates with multiple Git providers\n(GitHub, Gitlab, Bitbucket, and others).\nThis integration makes it easy to\n[export your agent to JSON](/dialogflow/cx/docs/reference/json-export)\nfor a push to a Git provider,\nand to pull from a Git provider for an\n[agent restore](/dialogflow/cx/docs/concept/agent#export).\nThe JSON exported format pushed to a Git provider\nis the expanded zip file contents of the exported agent.\n\nUsing this feature allows you to take advantage of\na Git provider source control features like:\n\n- Agent change reviews using code review tools\n- Examine agent diffs using diff tools\n- Merges\n\nLimitations\n-----------\n\nThe following limitations apply:\n\n- \\[Old integration version only\\] GitHub APIs have a limitation on the number of files that can be updated in a single commit. If the number of files exceeds 500, you may not be able to push to GitHub from Conversational Agents (Dialogflow CX). In such cases, you can export the agent as a zip and use the Git CLI on your machine to push the agent files to GitHub. This limitation will be addressed in a later Conversational Agents (Dialogflow CX) release.\n- GitHub private access [self-hosted](https://docs.github.com/en/enterprise-server/admin/overview/about-github-enterprise-server) repos are not supported, because Conversational Agents (Dialogflow CX) cannot access these repos.\n- The Git repository cannot contain any files other than the agent files exported by agent export. Any other files in the repository will be removed on every push.\n\nConfiguration\n-------------\n\nTo configure this feature,\nyou need to acquire an access token from your Git provider,\nstore it in Secret Manager,\nand provide the secret resource to Conversational Agents (Dialogflow CX):\n\n### Access token\n\nTo acquire an access token from your Git provider: \n\n### GitHub\n\nYou need to acquire a\n[GitHub personal token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\nIf you use a fine-grained personal access token,\nyou need the following\n[permissions](https://docs.github.com/en/rest/overview/permissions-required-for-fine-grained-personal-access-tokens)\naccess:\n\n- **Repository Permissions \\\u003e Contents**: Read and write\n- **Repository Permissions \\\u003e Metadata**: Read-only (should be auto-selected after selecting Contents permission)\n\n### Gitlab\n\nYou need to acquire a\n[Gitlab personal access token](https://docs.gitlab.com/user/profile/personal_access_tokens/).\n\n### Bitbucket\n\nYou need to acquire a\n[Bitbucket access token](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/).\n\n### Secret Manager\n\nNow that you have an access token,\nyou need to create a secret for your token:\n\n1. [Enable the Secret Manager API](/secret-manager/docs/configuring-secret-manager).\n2. [Create a secret](/secret-manager/docs/create-secret-quickstart).\n\n### Conversational Agents (Dialogflow CX) configuration\n\nTo configure this integration for Conversational Agents (Dialogflow CX):\n\n1. Provide the Dialogflow service agent permission to access the access token secret in Secret Manager. Provide the `Secret Manager Secret Accessor` role to the `gcp-sa-dialogflow.iam.gserviceaccount.com` service account in your agent project. See [Grant access to Secret Manager secret](/secret-manager/docs/manage-access-to-secrets#grant-access).\n2. Open the Git integration configuration:\n - Conversational Agents console\n 1. Open the settings display by clicking the settings icon near the top right corner.\n 2. Scroll down and click **Add Git integration**.\n - Dialogflow CX console\n 1. Click the **Manage** tab.\n 2. Click **Git** in the **Testing \\& Deployment** section.\n 3. Click **Create new**.\n3. Provide configuration details:\n 1. Enter the following:\n - Display name for the GitHub connection.\n - Git repository URL (for example: `https://github.com/\u003cpath-to-repo\u003e.git`).\n - Add Git branches your agent will be interacting with. You can designate a branch as the default branch by clicking the star icon next to it.\n - Access token secret, which is the secret version you created in the form `projects/*/secrets/*/versions/*` for a specific version or `projects/*/secrets/*/versions/latest` for the latest version.\n 2. Click **Connect**.\n 3. It can take a minute for the Git service to be ready. The console will display notifications.\n\nPush and restore\n----------------\n\nOnce configured, you can push/pull your agent to/from Git.\n\nThe **Push** button is used to export your agent\nand make a commit to the Git branch selected in the Git branch dropdown.\nThis commit will consist of the entire agent and not specific changes,\nand will delete any existing files in the repository.\n\nUsers with **Dialogflow Reader** roles have the ability to push to Git\nrepositories. To prevent unwanted pushes, configure these agents with read-only\npersonal access tokens.\n\nThe **Restore** button is used to pull your agent data from the Git branch\nselected in the Git branch drop-down and restore your Conversational Agents (Dialogflow CX) agent from this\ndata. This will overwrite your agent in the same way that any agent restore\nbehaves.\n\nExample use case\n----------------\n\nThe following example illustrates how this feature can be used\nby multiple people to propose different agent changes to a production agent.\n\nConsider that your agent uses the following Git branches:\n\n- **Prod**: branch for your production agent\n- **Dev1**: branch for agent development\n- **Dev2**: another branch for agent development\n\nUser 1 wants to propose agent changes and takes the following steps:\n\n1. Export the production agent to a new agent.\n2. Make the desired changes to this agent copy.\n3. Test the changes.\n4. Push the altered agent to the **Dev1** branch.\n5. Create a merge request to the **Prod** branch.\n\nUser 2 wants to propose agent changes and takes the following steps:\n\n1. Export the production agent to a new agent.\n2. Make the desired changes to this agent copy.\n3. Test the changes.\n4. Push the altered agent to the **Dev2** branch.\n5. Create a merge request to the **Prod** branch.\n\nUser 3 reviews merge requests from both users and takes the following steps:\n\n1. Resolve conflicts.\n2. Commits approved changes.\n3. Restores the production Git branch to the production Conversational Agents (Dialogflow CX) agent."]]