Setting up a CI/CD workflow

If you are planning to work on an AI agent in a team, you require finer-grained control over the development process. In a situation when several developers work on a single project simultaneously, it is good to know which team members made specific updates and make them available to others.

To follow this scenario, you can implement the CI/CD strategy for your AI agent project. You can store dialog scripts in a specific GitHub branch to which the development team merge changes. Then, connect your project to this branch in Alan AI Studio. Alan AI Studio will pull the scripts and add them to your AI agent project in the read-only mode.

From now on, as soon as any developer updates the scripts in the branch, Alan AI Studio will be immediately notified on these updates and load the most recent version of the dialog scripts in the code editor. You will then be able to test your AI agent using the Debugging Chat, Test View and so on.

To be able to set up a CI/CD workflow using GitHub, you need to:

  1. Sync with GitHub

  2. Add a GitHub repository with a CI/CD workflow

Syncing with GitHub

To sync with GitHub:

  1. In Alan AI Studio, open the project.

  2. In the left pane of the code editor, click Sync with GitHub.

  3. If you are not signed in yet, sign in to GitHub.

  4. At the Authorize Alan AI step, review and confirm GitHub access settings:

    • If you want to store dialog scripts in an organization repository owned by you, next to the organization name, click Grant.

    • If you want to store dialog scripts in an organization repository owned by another person, next to the organization name, click Request. The organization owner will have to review and grant access to organization resources to Alan AI. For details, see GitHub documentation.

    Then click Authorize alan-ai to allow Alan AI to access your personal and organization data.

../../../_images/github-auth.png

Adding a GitHub repository with a CI/CD workflow

To link your AI agent project to a GitHub repository with a CI/CD workflow:

  1. In the left pane of the code editor, click Add GitHub repo.

  2. On the GitHub CI/CD tab, select the target:

    1. From the Select organization list, select the type of repository in which you want to store dialog scripts: personal or organization.

    2. From the Select repository list, select a repository. If you have access to multiple repositories, use search to find the necessary one.

    3. From the Select branch list, select a branch.

    4. To define a specific folder in the repository, in the files and folders list below, select a folder.

    5. At the bottom of the window, click Add files. Alan AI will automatically pull the target content and displays it in your project in the read-only mode.

../../../_images/git-integration-cicd.png

To disconnect from the GitHub repository, in the left pane, click the close icon next to the repository name and choose to which scripts state you want to revert:

  • To keep the version of the scripts that is currently available in the linked GitHub repository, in the displayed window, enter the version name and click Save CI/CD state as a version.

  • To revert to the version that was available before you linked your AI agent project to the GitHub repository, click Reset to Last.