[{"data":1,"prerenderedAt":844},["ShallowReactive",2],{"/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd":3,"navigation-en-us":47,"banner-en-us":468,"footer-en-us":478,"blog-post-authors-en-us-Rutvik Shah|Michael Friedrich":717,"blog-related-posts-en-us-developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd":744,"blog-promotions-en-us":782,"next-steps-en-us":834},{"id":4,"title":5,"authorSlugs":6,"authors":9,"body":12,"category":13,"categorySlug":13,"config":14,"content":18,"date":28,"description":19,"extension":29,"externalUrl":30,"featured":17,"heroImage":21,"isFeatured":17,"meta":31,"navigation":17,"path":32,"publishedDate":28,"rawbody":33,"seo":34,"slug":16,"stem":40,"tagSlugs":41,"tags":45,"template":15,"updatedDate":30,"__hash__":46},"blogPosts/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd.md","Developing GitLab Duo: Blending AI and Root Cause Analysis to fix CI/CD pipelines",[7,8],"rutvik-shah","michael-friedrich",[10,11],"Rutvik Shah","Michael Friedrich","___Generative AI marks a monumental shift in the software development industry, making it easier to develop, secure, and operate software. Our new blog series, written by our product and engineering teams, gives you an inside look at how we create, test, and deploy the AI features you need integrated throughout the enterprise. Get to know new capabilities within GitLab Duo and how they will help DevSecOps teams deliver better results for customers.___\n\nHave you ever encountered a broken [CI/CD](https://about.gitlab.com/topics/ci-cd/benefits-continuous-integration/) pipeline and had to halt your DevSecOps workflow, or even delay software deployment, as you try to figure out the root cause? Traditionally, when something goes wrong in the process of creating software, developers have to troubleshoot, dig through log files, and often do a lot of trial and error development. [GitLab Duo Root Cause Analysis](https://about.gitlab.com/gitlab-duo-agent-platform/), part of our suite of AI-powered features, removes the guesswork by determining the root cause for a failed CI/CD pipeline. In this article, you'll learn what Root Cause Analysis is and how to apply the AI-powered GitLab Duo feature to your DevSecOps workflow.\n\n> Discover the future of AI-driven software development with our GitLab 17 virtual launch event. [Watch today!](https://about.gitlab.com/eighteen/)\n\n### What is Root Cause Analysis?\n\nGitLab Duo Root Cause Analysis is an AI-powered feature that assists you in determining a root cause and suggesting a fix for a CI/CD job log failure by analyzing the logs.\n\nWhile Root Cause Analysis is often seen in product incident management, its workflows and debugging practices can be found in any DevSecOps workflow. Ops teams, administrators, and platform engineers are challenged by infrastructure-as-code (IaC) deployment errors, Kubernetes and GitOps problems, and long stack traces while investigating pipeline failures.\n\nGitLab Duo Root Cause Analysis keeps everyone in the same interface and uses AI-powered help to summarize, analyze, and propose fixes so that organizations can release secure software faster.\n\nA pipeline can encounter failures for a variety of reasons, including syntax errors in the code, missing dependencies that the pipeline relies on, test failures during the build process, Kubernetes and IaC deployment timeouts, and numerous other potential issues. When such failures occur, it becomes the responsibility of everyone to meticulously review the logs generated by the pipeline. This job log review process involves scrutinizing the detailed output to identify the specific errors and pinpoint the root cause of the pipeline failure. For example, the following pipeline has multiple job failures that need to be investigated and fixed.\n\n![Image depicting multiple job failures](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image3_aHR0cHM6_1750097332601.png)\n\nThe duration required to fix these failures can vary significantly and is largely influenced by several factors such as:\n- the developer's familiarity with the project\n- their level of experience in dealing with similar issues\n- their overall skill level in troubleshooting and problem-solving within the context of the pipeline.\n\nManual analysis can be exceedingly challenging and time-consuming, given that log data consists of application logs and system messages with a wide variety of potential sources of failures. A typical pipeline fix can consist of several iterations and context switching. The complexity and the unstructured nature of the logs is a perfect fit for speeding up the task using generative AI.  Using AI can reduce the time to identify and fix a pipeline error significantly and also lower the barrier of expertise that would be needed to fix a pipeline such as the above.\n\nWatch GitLab Duo Root Cause Analysis in action:\n\n\u003C!-- blank line -->\n\n\u003Cfigure class=\"video_container\">\n\n \u003Ciframe src=\"https://www.youtube.com/embed/sTpSLwX5DIs?si=J6-0Bf6PtYjrHX1K\" frameborder=\"0\" allowfullscreen=\"true\"> \u003C/iframe>\n\n\u003C/figure>\n\n\u003C!-- blank line -->\n\n### How does Root Cause Analysis work?\n\n[Root Cause Analysis](https://docs.gitlab.com/user/ai_experiments/#root-cause-analysis) works by forwarding a portion of the CI/CD job log to the [GitLab AI Gateway](https://docs.gitlab.com/architecture/blueprints/ai_gateway/). GitLab ensures that the portion sent will fit inside the large language model (LLM) token limits alongside a prompt that has been pre-crafted to provide insights into why the job might have failed. The prompt also instructs the LLM to provide an example of how a user might fix a broken job.\n\nHere are two example scenarios where Root Cause Analysis can provide assistance.\n\n#### 1. Analyze a Python dependency error\n\nA Python application can import package modules with functionality that is not provided in the standard library. The project [Challenge - Root Cause Analysis - Python Config](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config) implements an application that parses configuration and initializes an SQLite database, which both work well without any dependencies. It uses best practices in CI/CD with a Python environment and caching. The latest feature implementation adds a Redis caching client, and now the CI/CD build is failing for some reason.\nBy using Root Cause Analysis, you can immediately learn that the `ModuleNotFoundError` text means that the module is actually not installed in the Python environment. GitLab Duo also suggests an example fix: Installing the Redis module through the PIP package manager.\n![Image depicting 'modulenotfounderror' and GL Duo suggested resolution](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_1750097332602.png)\n\nThe failing pipeline can be viewed [here](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/jobs/6992716398).\nThe Root Cause Analysis prompt provides a summary of the problem, which seems to be a problem with a missing `redis` module. Let's try to fix the problem by installing the `redis` module. You can either call `pip install redis` in the CI/CD job `script` section, or use a more sophisticated approach with the `requirements.txt` file. The latter is useful for a single source of truth for dependencies installed in the development environment and CI/CD pipelines.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n```\n\nAfter fixing the missing Python dependency, the CI/CD job fails again. Use Root Cause Analysis again to learn that no Redis service is running in the job. Switch to using GitLab Duo Chat and use the prompt `How to start a Redis service in CI/CD` to learn how to configure the `services` attribute in the CI/CD job.\n\n![Depicts the prompt for how to start a Redis service](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097333/Blog/Content%20Images/Blog/Content%20Images/image6_aHR0cHM6_1750097332602.png)\n\nModify the `.gitlab-ci.yml` with the `test` job, and specify the `redis` service.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n\n  # Solution 3 - Running Redis\n  services:\n    - redis\n```\n\nRunning the Redis server allows you to successfully execute the Python application, and print its output into the CI/CD job log.\n\n![output of Python application](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image4_aHR0cHM6_1750097332603.png)\n\nThe solution is provided in the [solution/ directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/tree/main/solution?ref_type=heads).\n\n**Tip:** You can also ask [GitLab Duo Chat](https://docs.gitlab.com/user/gitlab_duo_chat/) to follow up on potential future problems:\n\n```markdown\nHow to lint Python code? Which tools are recommended for CI/CD.\nHow to pin a package version in Python requirements file?\t\nWhat are possible ways that this exception stacktrace is triggered in the future?\nAre there ways to prevent the application from failing?\n```\nThe next example is more advanced and includes multiple failures.\n#### 2. Analyze missing Go runtime\n\nCI/CD jobs can be executed in containers, spawned from the contributed `image` attribute. If the container does not provide a programming language runtime, the executed `script` sections referencing the `go` binary fail. For example, the error message `/bin/sh: eval: line 149: go: not found` needs to be understood and fixed.\nIf the `go` command is not found in the container's runtime context, this can have multiple reasons:\n\n1. The job uses a minimal container image, for example `alpine`, and the Go language runtime was not installed.\n1. The job uses the wrong default container image, for example, specified on top of the CI/CD configuration, or using the `default` keyword.\n1. The job does not use a container image but the shell executor. The host operating system does not have the Go language runtime installed, or it is otherwise broken/not configured.\n\nThe project [Challenge - Root Cause Analysis - Go GitLab Release Fetcher](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides an exercise challenge to analyze and fix CI/CD problems with a GitLab release fetcher application, written in Go. The `build` and `docker-build` CI/CD jobs are failing. Fixing the problem requires different scopes: Understanding why the Go runtime is not installed, and learning about the `Dockerfile` syntax.\n![Screenshot showing Change Docker Label job failed](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image5_aHR0cHM6_1750097332603.png)\n\nThe [`solution/` directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides two possible solutions after Root Cause Analysis.\n## Practice using Root Cause Analysis\n\nHere are some scenarios to use to practice using Root Cause Analysis.\n\n- When you are running into Kubernetes deployment errors or timeouts.\n- With OpenTofu or Terraform IaC pipelines failing to provision your cloud resources.\n\n- When the Ansible playbook fails with a cryptic permission error in CI/CD.\n\n- When the Java stack trace is 10 pages long.\n\n- With a shell script highlighting an execution error.\n\n- When a Perl script fails in a single line, which is the only line in the script.\n\n- When the CI/CD job times out and it is unclear which section would cause this.\n\n- When a network connection timeout is reached, and you think it cannot be DNS.\n\n### What is next for GitLab Duo Root Cause Analysis?\n\nWe want to help our users to get their pipelines back to passing in fewer iterations. The Root Cause Analysis will open and show the response in GitLab Duo Chat, our AI assistant. Users can build on the recommendation to generate a more precise fix by asking specific questions (e.g., programming language-specific fixes) or asking for alternative fixes based on the root cause.\n\nFor example, here is the Root Cause Analysis for a failing job:\n\n![Root Cause Analysis response](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_1750097332603.png)\n\nUsers can ask follow-up questions that build upon the AI-generated response.\n\n- I do not want to create my own Docker image. Please explain different ways to fix the problem.\n\n- I don't have access to the Docker image creation. It seems that the Go binary is missing. Are there alternative images you can suggest?\n\nGitLab also will be running quality benchmarks for the generated responses and shipping usability improvements.\n\nPlease see our [Root Cause Analysis GA epic](https://gitlab.com/groups/gitlab-org/-/epics/13080) for more details. We would also love your feedback on the feature. Please leave a comment on our [Root Cause Analysis feedback issue](https://gitlab.com/groups/gitlab-org/-/epics/13872).\n\n## Get started with Root Cause Analysis\n\nPlease see our [documentation](https://docs.gitlab.com/user/ai_experiments/#root-cause-analysis) on how to enable the feature available to our GitLab Ultimate customers. Also, GitLab Duo Root Cause Analysis will soon be coming to GitLab self-managed and GitLab Dedicated.\n\nNot a GitLab Ultimate customer? Start [a free trial](https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/blog&glm_content=default-saas-trial) today.\n## Read more of our \"Developing GitLab Duo\" series\n\n- [Developing GitLab Duo: How we validate and test AI models at scale](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: AI Impact analytics dashboard measures the ROI of AI](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: How we are dogfooding our AI features](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: Secure and thoroughly test AI-generated code](https://about.gitlab.com/blog/how-gitlab-duo-helps-secure-and-thoroughly-test-ai-generated-code/)","ai-ml",{"template":15,"slug":16,"featured":17},"BlogPost","developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",true,{"title":5,"description":19,"authors":20,"heroImage":21,"tags":22,"category":13,"date":28,"body":12},"Discover how we've infused Root Cause Analysis with AI to help remedy broken CI/CD pipelines, including example scenarios and take-away exercises.",[10,11],"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png",[23,24,25,26,27],"AI/ML","tutorial","DevSecOps","DevSecOps platform","features","2024-06-06","md",null,{},"/en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd","---\nseo:\n  title: >-\n    GitLab Duo: AI-powered CI/CD pipeline root cause analysis\n  description: >-\n    Discover how we've infused Root Cause Analysis with AI to help remedy broken\n    CI/CD pipelines, including example scenarios and take-away exercises.\n  ogTitle: >-\n    GitLab Duo: AI-powered CI/CD pipeline root cause analysis\n  ogDescription: >-\n    Discover how we've infused Root Cause Analysis with AI to help remedy broken\n    CI/CD pipelines, including example scenarios and take-away exercises.\n  noIndex: false\n  ogImage: >-\n    https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png\n  ogUrl: >-\n    https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd\n  ogSiteName: https://about.gitlab.com\n  ogType: article\n  canonicalUrls: >-\n    https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd\ntitle: 'Developing GitLab Duo: Blending AI and Root Cause Analysis to fix CI/CD pipelines'\ndescription: Discover how we've infused Root Cause Analysis with AI to help remedy broken CI/CD pipelines, including example scenarios and take-away exercises.\nauthors:\n  - Rutvik Shah\n  - Michael Friedrich\nheroImage: https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097321/Blog/Hero%20Images/Blog/Hero%20Images/blog-hero-banner-1-0178-820x470-fy25_7JlF3WlEkswGQbcTe8DOTB_1750097321081.png\ntags:\n  - AI/ML\n  - tutorial\n  - DevSecOps\n  - DevSecOps platform\n  - features\ncategory: ai-ml\ndate: '2024-06-06'\nslug: developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd\nfeatured: true\ntemplate: BlogPost\n---\n\n___Generative AI marks a monumental shift in the software development industry, making it easier to develop, secure, and operate software. Our new blog series, written by our product and engineering teams, gives you an inside look at how we create, test, and deploy the AI features you need integrated throughout the enterprise. Get to know new capabilities within GitLab Duo and how they will help DevSecOps teams deliver better results for customers.___\n\nHave you ever encountered a broken [CI/CD](https://about.gitlab.com/topics/ci-cd/benefits-continuous-integration/) pipeline and had to halt your DevSecOps workflow, or even delay software deployment, as you try to figure out the root cause? Traditionally, when something goes wrong in the process of creating software, developers have to troubleshoot, dig through log files, and often do a lot of trial and error development. [GitLab Duo Root Cause Analysis](https://about.gitlab.com/gitlab-duo-agent-platform/), part of our suite of AI-powered features, removes the guesswork by determining the root cause for a failed CI/CD pipeline. In this article, you'll learn what Root Cause Analysis is and how to apply the AI-powered GitLab Duo feature to your DevSecOps workflow.\n\n> Discover the future of AI-driven software development with our GitLab 17 virtual launch event. [Watch today!](https://about.gitlab.com/eighteen/)\n\n### What is Root Cause Analysis?\n\nGitLab Duo Root Cause Analysis is an AI-powered feature that assists you in determining a root cause and suggesting a fix for a CI/CD job log failure by analyzing the logs.\n\nWhile Root Cause Analysis is often seen in product incident management, its workflows and debugging practices can be found in any DevSecOps workflow. Ops teams, administrators, and platform engineers are challenged by infrastructure-as-code (IaC) deployment errors, Kubernetes and GitOps problems, and long stack traces while investigating pipeline failures.\n\nGitLab Duo Root Cause Analysis keeps everyone in the same interface and uses AI-powered help to summarize, analyze, and propose fixes so that organizations can release secure software faster.\n\nA pipeline can encounter failures for a variety of reasons, including syntax errors in the code, missing dependencies that the pipeline relies on, test failures during the build process, Kubernetes and IaC deployment timeouts, and numerous other potential issues. When such failures occur, it becomes the responsibility of everyone to meticulously review the logs generated by the pipeline. This job log review process involves scrutinizing the detailed output to identify the specific errors and pinpoint the root cause of the pipeline failure. For example, the following pipeline has multiple job failures that need to be investigated and fixed.\n\n![Image depicting multiple job failures](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image3_aHR0cHM6_1750097332601.png)\n\nThe duration required to fix these failures can vary significantly and is largely influenced by several factors such as:\n- the developer's familiarity with the project\n- their level of experience in dealing with similar issues\n- their overall skill level in troubleshooting and problem-solving within the context of the pipeline.\n\nManual analysis can be exceedingly challenging and time-consuming, given that log data consists of application logs and system messages with a wide variety of potential sources of failures. A typical pipeline fix can consist of several iterations and context switching. The complexity and the unstructured nature of the logs is a perfect fit for speeding up the task using generative AI.  Using AI can reduce the time to identify and fix a pipeline error significantly and also lower the barrier of expertise that would be needed to fix a pipeline such as the above.\n\nWatch GitLab Duo Root Cause Analysis in action:\n\n\u003C!-- blank line -->\n\n\u003Cfigure class=\"video_container\">\n\n \u003Ciframe src=\"https://www.youtube.com/embed/sTpSLwX5DIs?si=J6-0Bf6PtYjrHX1K\" frameborder=\"0\" allowfullscreen=\"true\"> \u003C/iframe>\n\n\u003C/figure>\n\n\u003C!-- blank line -->\n\n### How does Root Cause Analysis work?\n\n[Root Cause Analysis](https://docs.gitlab.com/user/ai_experiments/#root-cause-analysis) works by forwarding a portion of the CI/CD job log to the [GitLab AI Gateway](https://docs.gitlab.com/architecture/blueprints/ai_gateway/). GitLab ensures that the portion sent will fit inside the large language model (LLM) token limits alongside a prompt that has been pre-crafted to provide insights into why the job might have failed. The prompt also instructs the LLM to provide an example of how a user might fix a broken job.\n\nHere are two example scenarios where Root Cause Analysis can provide assistance.\n\n#### 1. Analyze a Python dependency error\n\nA Python application can import package modules with functionality that is not provided in the standard library. The project [Challenge - Root Cause Analysis - Python Config](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config) implements an application that parses configuration and initializes an SQLite database, which both work well without any dependencies. It uses best practices in CI/CD with a Python environment and caching. The latest feature implementation adds a Redis caching client, and now the CI/CD build is failing for some reason.\nBy using Root Cause Analysis, you can immediately learn that the `ModuleNotFoundError` text means that the module is actually not installed in the Python environment. GitLab Duo also suggests an example fix: Installing the Redis module through the PIP package manager.\n![Image depicting 'modulenotfounderror' and GL Duo suggested resolution](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_1750097332602.png)\n\nThe failing pipeline can be viewed [here](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/jobs/6992716398).\nThe Root Cause Analysis prompt provides a summary of the problem, which seems to be a problem with a missing `redis` module. Let's try to fix the problem by installing the `redis` module. You can either call `pip install redis` in the CI/CD job `script` section, or use a more sophisticated approach with the `requirements.txt` file. The latter is useful for a single source of truth for dependencies installed in the development environment and CI/CD pipelines.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n```\n\nAfter fixing the missing Python dependency, the CI/CD job fails again. Use Root Cause Analysis again to learn that no Redis service is running in the job. Switch to using GitLab Duo Chat and use the prompt `How to start a Redis service in CI/CD` to learn how to configure the `services` attribute in the CI/CD job.\n\n![Depicts the prompt for how to start a Redis service](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097333/Blog/Content%20Images/Blog/Content%20Images/image6_aHR0cHM6_1750097332602.png)\n\nModify the `.gitlab-ci.yml` with the `test` job, and specify the `redis` service.\n\n```yaml\ntest:\n  extends: [.python-req]\n  stage: test   before_script:\n    # [🦊] hint: Root cause analysis.\n    # Solution 1: Install redis using pip\n    - pip install redis\n    # Solution 2: Add redis to requirements.txt, use pip\n    - pip install -r requirements.txt\n  script:\n    - python src/main.py\n\n  # Solution 3 - Running Redis\n  services:\n    - redis\n```\n\nRunning the Redis server allows you to successfully execute the Python application, and print its output into the CI/CD job log.\n\n![output of Python application](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image4_aHR0cHM6_1750097332603.png)\n\nThe solution is provided in the [solution/ directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-python-config/-/tree/main/solution?ref_type=heads).\n\n**Tip:** You can also ask [GitLab Duo Chat](https://docs.gitlab.com/user/gitlab_duo_chat/) to follow up on potential future problems:\n\n```markdown\nHow to lint Python code? Which tools are recommended for CI/CD.\nHow to pin a package version in Python requirements file?\t\nWhat are possible ways that this exception stacktrace is triggered in the future?\nAre there ways to prevent the application from failing?\n```\nThe next example is more advanced and includes multiple failures.\n#### 2. Analyze missing Go runtime\n\nCI/CD jobs can be executed in containers, spawned from the contributed `image` attribute. If the container does not provide a programming language runtime, the executed `script` sections referencing the `go` binary fail. For example, the error message `/bin/sh: eval: line 149: go: not found` needs to be understood and fixed.\nIf the `go` command is not found in the container's runtime context, this can have multiple reasons:\n\n1. The job uses a minimal container image, for example `alpine`, and the Go language runtime was not installed.\n1. The job uses the wrong default container image, for example, specified on top of the CI/CD configuration, or using the `default` keyword.\n1. The job does not use a container image but the shell executor. The host operating system does not have the Go language runtime installed, or it is otherwise broken/not configured.\n\nThe project [Challenge - Root Cause Analysis - Go GitLab Release Fetcher](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides an exercise challenge to analyze and fix CI/CD problems with a GitLab release fetcher application, written in Go. The `build` and `docker-build` CI/CD jobs are failing. Fixing the problem requires different scopes: Understanding why the Go runtime is not installed, and learning about the `Dockerfile` syntax.\n![Screenshot showing Change Docker Label job failed](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image5_aHR0cHM6_1750097332603.png)\n\nThe [`solution/` directory](https://gitlab.com/gitlab-da/use-cases/ai/ai-workflows/gitlab-duo-challenges/root-cause-analysis/challenge-root-cause-analysis-go-gitlab-release-fetcher) provides two possible solutions after Root Cause Analysis.\n## Practice using Root Cause Analysis\n\nHere are some scenarios to use to practice using Root Cause Analysis.\n\n- When you are running into Kubernetes deployment errors or timeouts.\n- With OpenTofu or Terraform IaC pipelines failing to provision your cloud resources.\n\n- When the Ansible playbook fails with a cryptic permission error in CI/CD.\n\n- When the Java stack trace is 10 pages long.\n\n- With a shell script highlighting an execution error.\n\n- When a Perl script fails in a single line, which is the only line in the script.\n\n- When the CI/CD job times out and it is unclear which section would cause this.\n\n- When a network connection timeout is reached, and you think it cannot be DNS.\n\n### What is next for GitLab Duo Root Cause Analysis?\n\nWe want to help our users to get their pipelines back to passing in fewer iterations. The Root Cause Analysis will open and show the response in GitLab Duo Chat, our AI assistant. Users can build on the recommendation to generate a more precise fix by asking specific questions (e.g., programming language-specific fixes) or asking for alternative fixes based on the root cause.\n\nFor example, here is the Root Cause Analysis for a failing job:\n\n![Root Cause Analysis response](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750097332/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_1750097332603.png)\n\nUsers can ask follow-up questions that build upon the AI-generated response.\n\n- I do not want to create my own Docker image. Please explain different ways to fix the problem.\n\n- I don't have access to the Docker image creation. It seems that the Go binary is missing. Are there alternative images you can suggest?\n\nGitLab also will be running quality benchmarks for the generated responses and shipping usability improvements.\n\nPlease see our [Root Cause Analysis GA epic](https://gitlab.com/groups/gitlab-org/-/epics/13080) for more details. We would also love your feedback on the feature. Please leave a comment on our [Root Cause Analysis feedback issue](https://gitlab.com/groups/gitlab-org/-/epics/13872).\n\n## Get started with Root Cause Analysis\n\nPlease see our [documentation](https://docs.gitlab.com/user/ai_experiments/#root-cause-analysis) on how to enable the feature available to our GitLab Ultimate customers. Also, GitLab Duo Root Cause Analysis will soon be coming to GitLab self-managed and GitLab Dedicated.\n\nNot a GitLab Ultimate customer? Start [a free trial](https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/blog&glm_content=default-saas-trial) today.\n## Read more of our \"Developing GitLab Duo\" series\n\n- [Developing GitLab Duo: How we validate and test AI models at scale](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: AI Impact analytics dashboard measures the ROI of AI](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: How we are dogfooding our AI features](https://about.gitlab.com/blog/developing-gitlab-duo-ai-impact-analytics-dashboard-measures-the-roi-of-ai/)\n\n- [Developing GitLab Duo: Secure and thoroughly test AI-generated code](https://about.gitlab.com/blog/how-gitlab-duo-helps-secure-and-thoroughly-test-ai-generated-code/)\n",{"title":35,"description":19,"ogTitle":35,"ogDescription":19,"noIndex":36,"ogImage":21,"ogUrl":37,"ogSiteName":38,"ogType":39,"canonicalUrls":37},"GitLab Duo: AI-powered CI/CD pipeline root cause analysis",false,"https://about.gitlab.com/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd","https://about.gitlab.com","article","en-us/blog/developing-gitlab-duo-blending-ai-and-root-cause-analysis-to-fix-ci-cd",[42,24,43,44,27],"aiml","devsecops","devsecops-platform",[23,24,25,26,27],"bZFRX9rKo-g-674rvHU6gJjRk-TI9WsV_dlCD3qpmcs",{"logo":48,"freeTrial":53,"sales":58,"login":63,"items":68,"search":388,"minimal":419,"duo":438,"switchNav":447,"pricingDeployment":458},{"config":49},{"href":50,"dataGaName":51,"dataGaLocation":52},"/","gitlab logo","header",{"text":54,"config":55},"Get free trial",{"href":56,"dataGaName":57,"dataGaLocation":52},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":59,"config":60},"Talk to sales",{"href":61,"dataGaName":62,"dataGaLocation":52},"/sales/","sales",{"text":64,"config":65},"Sign in",{"href":66,"dataGaName":67,"dataGaLocation":52},"https://gitlab.com/users/sign_in/","sign in",[69,98,198,203,307,368],{"text":70,"config":71,"menu":73},"Platform",{"dataNavLevelOne":72},"platform",{"type":74,"columns":75},"cards",[76,82,90],{"title":70,"description":77,"link":78},"The intelligent orchestration platform for DevSecOps",{"text":79,"config":80},"Explore our Platform",{"href":81,"dataGaName":72,"dataGaLocation":52},"/platform/",{"title":83,"description":84,"link":85},"GitLab Duo Agent Platform","Agentic AI for the entire software lifecycle",{"text":86,"config":87},"Meet GitLab Duo",{"href":88,"dataGaName":89,"dataGaLocation":52},"/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":91,"description":92,"link":93},"Why GitLab","See the top reasons enterprises choose GitLab",{"text":94,"config":95},"Learn more",{"href":96,"dataGaName":97,"dataGaLocation":52},"/why-gitlab/","why gitlab",{"text":99,"left":17,"config":100,"menu":102},"Product",{"dataNavLevelOne":101},"solutions",{"type":103,"link":104,"columns":108,"feature":177},"lists",{"text":105,"config":106},"View all Solutions",{"href":107,"dataGaName":101,"dataGaLocation":52},"/solutions/",[109,133,156],{"title":110,"description":111,"link":112,"items":117},"Automation","CI/CD and automation to accelerate deployment",{"config":113},{"icon":114,"href":115,"dataGaName":116,"dataGaLocation":52},"AutomatedCodeAlt","/solutions/delivery-automation/","automated software delivery",[118,122,125,129],{"text":119,"config":120},"CI/CD",{"href":121,"dataGaLocation":52,"dataGaName":119},"/solutions/continuous-integration/",{"text":83,"config":123},{"href":88,"dataGaLocation":52,"dataGaName":124},"gitlab duo agent platform - product menu",{"text":126,"config":127},"Source Code Management",{"href":128,"dataGaLocation":52,"dataGaName":126},"/solutions/source-code-management/",{"text":130,"config":131},"Automated Software Delivery",{"href":115,"dataGaLocation":52,"dataGaName":132},"Automated software delivery",{"title":134,"description":135,"link":136,"items":141},"Security","Deliver code faster without compromising security",{"config":137},{"href":138,"dataGaName":139,"dataGaLocation":52,"icon":140},"/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[142,146,151],{"text":143,"config":144},"Application Security Testing",{"href":138,"dataGaName":145,"dataGaLocation":52},"Application security testing",{"text":147,"config":148},"Software Supply Chain Security",{"href":149,"dataGaLocation":52,"dataGaName":150},"/solutions/supply-chain/","Software supply chain security",{"text":152,"config":153},"Software Compliance",{"href":154,"dataGaName":155,"dataGaLocation":52},"/solutions/software-compliance/","software compliance",{"title":157,"link":158,"items":163},"Measurement",{"config":159},{"icon":160,"href":161,"dataGaName":162,"dataGaLocation":52},"DigitalTransformation","/solutions/visibility-measurement/","visibility and measurement",[164,168,172],{"text":165,"config":166},"Visibility & Measurement",{"href":161,"dataGaLocation":52,"dataGaName":167},"Visibility and Measurement",{"text":169,"config":170},"Value Stream Management",{"href":171,"dataGaLocation":52,"dataGaName":169},"/solutions/value-stream-management/",{"text":173,"config":174},"Analytics & Insights",{"href":175,"dataGaLocation":52,"dataGaName":176},"/solutions/analytics-and-insights/","Analytics and insights",{"title":178,"type":103,"items":179},"GitLab for",[180,186,192],{"text":181,"config":182},"Enterprise",{"icon":183,"href":184,"dataGaLocation":52,"dataGaName":185},"Building","/enterprise/","enterprise",{"text":187,"config":188},"Small Business",{"icon":189,"href":190,"dataGaLocation":52,"dataGaName":191},"Work","/small-business/","small business",{"text":193,"config":194},"Public Sector",{"icon":195,"href":196,"dataGaLocation":52,"dataGaName":197},"Organization","/solutions/public-sector/","public sector",{"text":199,"config":200},"Pricing",{"href":201,"dataGaName":202,"dataGaLocation":52,"dataNavLevelOne":202},"/pricing/","pricing",{"text":204,"config":205,"menu":207},"Resources",{"dataNavLevelOne":206},"resources",{"type":103,"link":208,"columns":212,"feature":296},{"text":209,"config":210},"View all resources",{"href":211,"dataGaName":206,"dataGaLocation":52},"/resources/",[213,246,268],{"title":214,"items":215},"Getting started",[216,221,226,231,236,241],{"text":217,"config":218},"Install",{"href":219,"dataGaName":220,"dataGaLocation":52},"/install/","install",{"text":222,"config":223},"Quick start guides",{"href":224,"dataGaName":225,"dataGaLocation":52},"/get-started/","quick setup checklists",{"text":227,"config":228},"Learn",{"href":229,"dataGaLocation":52,"dataGaName":230},"https://university.gitlab.com/","learn",{"text":232,"config":233},"Product documentation",{"href":234,"dataGaName":235,"dataGaLocation":52},"https://docs.gitlab.com/","product documentation",{"text":237,"config":238},"Best practice videos",{"href":239,"dataGaName":240,"dataGaLocation":52},"/getting-started-videos/","best practice videos",{"text":242,"config":243},"Integrations",{"href":244,"dataGaName":245,"dataGaLocation":52},"/integrations/","integrations",{"title":247,"items":248},"Discover",[249,254,259,263],{"text":250,"config":251},"Customer success stories",{"href":252,"dataGaName":253,"dataGaLocation":52},"/customers/","customer success stories",{"text":255,"config":256},"Blog",{"href":257,"dataGaName":258,"dataGaLocation":52},"/blog/","blog",{"text":260,"config":261},"The Source",{"href":262,"dataGaName":258,"dataGaLocation":52},"/the-source/",{"text":264,"config":265},"Remote",{"href":266,"dataGaName":267,"dataGaLocation":52},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":269,"items":270},"Connect",[271,276,281,286,291],{"text":272,"config":273},"GitLab Services",{"href":274,"dataGaName":275,"dataGaLocation":52},"/services/","services",{"text":277,"config":278},"Community",{"href":279,"dataGaName":280,"dataGaLocation":52},"/community/","community",{"text":282,"config":283},"Forum",{"href":284,"dataGaName":285,"dataGaLocation":52},"https://forum.gitlab.com/","forum",{"text":287,"config":288},"Events",{"href":289,"dataGaName":290,"dataGaLocation":52},"/events/","events",{"text":292,"config":293},"Partners",{"href":294,"dataGaName":295,"dataGaLocation":52},"/partners/","partners",{"config":297,"title":300,"text":301,"link":302},{"background":298,"textColor":299},"url('https://res.cloudinary.com/about-gitlab-com/image/upload/v1777322348/qpq8yrgn8knii57omj0c.png')","#000","What’s new in GitLab","Stay updated with our latest features and improvements.",{"text":303,"config":304},"Read the latest",{"href":305,"dataGaName":306,"dataGaLocation":52},"/releases/whats-new/","whats new",{"text":308,"config":309,"menu":311},"Company",{"dataNavLevelOne":310},"company",{"type":103,"columns":312},[313],{"items":314},[315,320,326,328,333,338,343,348,353,358,363],{"text":316,"config":317},"About",{"href":318,"dataGaName":319,"dataGaLocation":52},"/company/","about",{"text":321,"config":322,"footerGa":325},"Jobs",{"href":323,"dataGaName":324,"dataGaLocation":52},"/jobs/","jobs",{"dataGaName":324},{"text":287,"config":327},{"href":289,"dataGaName":290,"dataGaLocation":52},{"text":329,"config":330},"Leadership",{"href":331,"dataGaName":332,"dataGaLocation":52},"/company/team/e-group/","leadership",{"text":334,"config":335},"Team",{"href":336,"dataGaName":337,"dataGaLocation":52},"/company/team/","team",{"text":339,"config":340},"Handbook",{"href":341,"dataGaName":342,"dataGaLocation":52},"https://handbook.gitlab.com/","handbook",{"text":344,"config":345},"Investor relations",{"href":346,"dataGaName":347,"dataGaLocation":52},"https://ir.gitlab.com/","investor relations",{"text":349,"config":350},"Trust Center",{"href":351,"dataGaName":352,"dataGaLocation":52},"/security/","trust center",{"text":354,"config":355},"AI Transparency Center",{"href":356,"dataGaName":357,"dataGaLocation":52},"/ai-transparency-center/","ai transparency center",{"text":359,"config":360},"Newsletter",{"href":361,"dataGaName":362,"dataGaLocation":52},"/company/contact/#contact-forms","newsletter",{"text":364,"config":365},"Press",{"href":366,"dataGaName":367,"dataGaLocation":52},"/press/","press",{"text":369,"config":370,"menu":371},"Contact us",{"dataNavLevelOne":310},{"type":103,"columns":372},[373],{"items":374},[375,378,383],{"text":59,"config":376},{"href":61,"dataGaName":377,"dataGaLocation":52},"talk to sales",{"text":379,"config":380},"Support portal",{"href":381,"dataGaName":382,"dataGaLocation":52},"https://support.gitlab.com","support portal",{"text":384,"config":385},"Customer portal",{"href":386,"dataGaName":387,"dataGaLocation":52},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":389,"login":390,"suggestions":397},"Close",{"text":391,"link":392},"To search repositories and projects, login to",{"text":393,"config":394},"gitlab.com",{"href":66,"dataGaName":395,"dataGaLocation":396},"search login","search",{"text":398,"default":399},"Suggestions",[400,402,406,408,412,416],{"text":83,"config":401},{"href":88,"dataGaName":83,"dataGaLocation":396},{"text":403,"config":404},"Code Suggestions (AI)",{"href":405,"dataGaName":403,"dataGaLocation":396},"/solutions/code-suggestions/",{"text":119,"config":407},{"href":121,"dataGaName":119,"dataGaLocation":396},{"text":409,"config":410},"GitLab on AWS",{"href":411,"dataGaName":409,"dataGaLocation":396},"/partners/technology-partners/aws/",{"text":413,"config":414},"GitLab on Google Cloud",{"href":415,"dataGaName":413,"dataGaLocation":396},"/partners/technology-partners/google-cloud-platform/",{"text":417,"config":418},"Why GitLab?",{"href":96,"dataGaName":417,"dataGaLocation":396},{"freeTrial":420,"mobileIcon":425,"desktopIcon":430,"secondaryButton":433},{"text":421,"config":422},"Start free trial",{"href":423,"dataGaName":57,"dataGaLocation":424},"https://gitlab.com/-/trials/new/","nav",{"altText":426,"config":427},"Gitlab Icon",{"src":428,"dataGaName":429,"dataGaLocation":424},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":426,"config":431},{"src":432,"dataGaName":429,"dataGaLocation":424},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":434,"config":435},"Get Started",{"href":436,"dataGaName":437,"dataGaLocation":424},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/get-started/","get started",{"freeTrial":439,"mobileIcon":443,"desktopIcon":445},{"text":440,"config":441},"Learn more about GitLab Duo",{"href":88,"dataGaName":442,"dataGaLocation":424},"gitlab duo",{"altText":426,"config":444},{"src":428,"dataGaName":429,"dataGaLocation":424},{"altText":426,"config":446},{"src":432,"dataGaName":429,"dataGaLocation":424},{"button":448,"mobileIcon":453,"desktopIcon":455},{"text":449,"config":450},"/switch",{"href":451,"dataGaName":452,"dataGaLocation":424},"#contact","switch",{"altText":426,"config":454},{"src":428,"dataGaName":429,"dataGaLocation":424},{"altText":426,"config":456},{"src":457,"dataGaName":429,"dataGaLocation":424},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1773335277/ohhpiuoxoldryzrnhfrh.png",{"freeTrial":459,"mobileIcon":464,"desktopIcon":466},{"text":460,"config":461},"Back to pricing",{"href":201,"dataGaName":462,"dataGaLocation":424,"icon":463},"back to pricing","GoBack",{"altText":426,"config":465},{"src":428,"dataGaName":429,"dataGaLocation":424},{"altText":426,"config":467},{"src":432,"dataGaName":429,"dataGaLocation":424},{"title":469,"button":470,"config":475},"See how agentic AI transforms software delivery",{"text":471,"config":472},"Sign up for GitLab Transcend on June 10",{"href":473,"dataGaName":474,"dataGaLocation":52},"/releases/whats-new/#sign-up","transcend event",{"layout":476,"icon":477,"disabled":36},"release","AiStar",{"data":479},{"text":480,"source":481,"edit":487,"contribute":492,"config":497,"items":502,"minimal":706},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"text":482,"config":483},"View page source",{"href":484,"dataGaName":485,"dataGaLocation":486},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":488,"config":489},"Edit this page",{"href":490,"dataGaName":491,"dataGaLocation":486},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":493,"config":494},"Please contribute",{"href":495,"dataGaName":496,"dataGaLocation":486},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":498,"facebook":499,"youtube":500,"linkedin":501},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[503,550,601,645,672],{"title":199,"links":504,"subMenu":519},[505,509,514],{"text":506,"config":507},"View plans",{"href":201,"dataGaName":508,"dataGaLocation":486},"view plans",{"text":510,"config":511},"Why Premium?",{"href":512,"dataGaName":513,"dataGaLocation":486},"/pricing/premium/","why premium",{"text":515,"config":516},"Why Ultimate?",{"href":517,"dataGaName":518,"dataGaLocation":486},"/pricing/ultimate/","why ultimate",[520],{"title":521,"links":522},"Contact Us",[523,526,528,530,535,540,545],{"text":524,"config":525},"Contact sales",{"href":61,"dataGaName":62,"dataGaLocation":486},{"text":379,"config":527},{"href":381,"dataGaName":382,"dataGaLocation":486},{"text":384,"config":529},{"href":386,"dataGaName":387,"dataGaLocation":486},{"text":531,"config":532},"Status",{"href":533,"dataGaName":534,"dataGaLocation":486},"https://status.gitlab.com/","status",{"text":536,"config":537},"Terms of use",{"href":538,"dataGaName":539,"dataGaLocation":486},"/terms/","terms of use",{"text":541,"config":542},"Privacy statement",{"href":543,"dataGaName":544,"dataGaLocation":486},"/privacy/","privacy statement",{"text":546,"config":547},"Cookie preferences",{"dataGaName":548,"dataGaLocation":486,"id":549,"isOneTrustButton":17},"cookie preferences","ot-sdk-btn",{"title":99,"links":551,"subMenu":559},[552,555],{"text":26,"config":553},{"href":81,"dataGaName":554,"dataGaLocation":486},"devsecops platform",{"text":556,"config":557},"AI-Assisted Development",{"href":88,"dataGaName":558,"dataGaLocation":486},"ai-assisted development",[560],{"title":561,"links":562},"Topics",[563,568,573,578,583,586,591,596],{"text":564,"config":565},"CICD",{"href":566,"dataGaName":567,"dataGaLocation":486},"/topics/ci-cd/","cicd",{"text":569,"config":570},"GitOps",{"href":571,"dataGaName":572,"dataGaLocation":486},"/topics/gitops/","gitops",{"text":574,"config":575},"DevOps",{"href":576,"dataGaName":577,"dataGaLocation":486},"/topics/devops/","devops",{"text":579,"config":580},"Version Control",{"href":581,"dataGaName":582,"dataGaLocation":486},"/topics/version-control/","version control",{"text":25,"config":584},{"href":585,"dataGaName":43,"dataGaLocation":486},"/topics/devsecops/",{"text":587,"config":588},"Cloud Native",{"href":589,"dataGaName":590,"dataGaLocation":486},"/topics/cloud-native/","cloud native",{"text":592,"config":593},"AI for Coding",{"href":594,"dataGaName":595,"dataGaLocation":486},"/topics/devops/ai-for-coding/","ai for coding",{"text":597,"config":598},"Agentic AI",{"href":599,"dataGaName":600,"dataGaLocation":486},"/topics/agentic-ai/","agentic ai",{"title":602,"links":603},"Solutions",[604,606,608,613,617,620,624,627,629,632,635,640],{"text":143,"config":605},{"href":138,"dataGaName":143,"dataGaLocation":486},{"text":132,"config":607},{"href":115,"dataGaName":116,"dataGaLocation":486},{"text":609,"config":610},"Agile development",{"href":611,"dataGaName":612,"dataGaLocation":486},"/solutions/agile-delivery/","agile delivery",{"text":614,"config":615},"SCM",{"href":128,"dataGaName":616,"dataGaLocation":486},"source code management",{"text":564,"config":618},{"href":121,"dataGaName":619,"dataGaLocation":486},"continuous integration & delivery",{"text":621,"config":622},"Value stream management",{"href":171,"dataGaName":623,"dataGaLocation":486},"value stream management",{"text":569,"config":625},{"href":626,"dataGaName":572,"dataGaLocation":486},"/solutions/gitops/",{"text":181,"config":628},{"href":184,"dataGaName":185,"dataGaLocation":486},{"text":630,"config":631},"Small business",{"href":190,"dataGaName":191,"dataGaLocation":486},{"text":633,"config":634},"Public sector",{"href":196,"dataGaName":197,"dataGaLocation":486},{"text":636,"config":637},"Education",{"href":638,"dataGaName":639,"dataGaLocation":486},"/solutions/education/","education",{"text":641,"config":642},"Financial services",{"href":643,"dataGaName":644,"dataGaLocation":486},"/solutions/finance/","financial services",{"title":204,"links":646},[647,649,651,653,656,658,660,662,664,666,668,670],{"text":217,"config":648},{"href":219,"dataGaName":220,"dataGaLocation":486},{"text":222,"config":650},{"href":224,"dataGaName":225,"dataGaLocation":486},{"text":227,"config":652},{"href":229,"dataGaName":230,"dataGaLocation":486},{"text":232,"config":654},{"href":234,"dataGaName":655,"dataGaLocation":486},"docs",{"text":255,"config":657},{"href":257,"dataGaName":258,"dataGaLocation":486},{"text":250,"config":659},{"href":252,"dataGaName":253,"dataGaLocation":486},{"text":264,"config":661},{"href":266,"dataGaName":267,"dataGaLocation":486},{"text":272,"config":663},{"href":274,"dataGaName":275,"dataGaLocation":486},{"text":277,"config":665},{"href":279,"dataGaName":280,"dataGaLocation":486},{"text":282,"config":667},{"href":284,"dataGaName":285,"dataGaLocation":486},{"text":287,"config":669},{"href":289,"dataGaName":290,"dataGaLocation":486},{"text":292,"config":671},{"href":294,"dataGaName":295,"dataGaLocation":486},{"title":308,"links":673},[674,676,678,680,682,684,686,690,695,697,699,701],{"text":316,"config":675},{"href":318,"dataGaName":310,"dataGaLocation":486},{"text":321,"config":677},{"href":323,"dataGaName":324,"dataGaLocation":486},{"text":329,"config":679},{"href":331,"dataGaName":332,"dataGaLocation":486},{"text":334,"config":681},{"href":336,"dataGaName":337,"dataGaLocation":486},{"text":339,"config":683},{"href":341,"dataGaName":342,"dataGaLocation":486},{"text":344,"config":685},{"href":346,"dataGaName":347,"dataGaLocation":486},{"text":687,"config":688},"Sustainability",{"href":689,"dataGaName":687,"dataGaLocation":486},"/sustainability/",{"text":691,"config":692},"Diversity, inclusion and belonging (DIB)",{"href":693,"dataGaName":694,"dataGaLocation":486},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":349,"config":696},{"href":351,"dataGaName":352,"dataGaLocation":486},{"text":359,"config":698},{"href":361,"dataGaName":362,"dataGaLocation":486},{"text":364,"config":700},{"href":366,"dataGaName":367,"dataGaLocation":486},{"text":702,"config":703},"Modern Slavery Transparency Statement",{"href":704,"dataGaName":705,"dataGaLocation":486},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":707},[708,711,714],{"text":709,"config":710},"Terms",{"href":538,"dataGaName":539,"dataGaLocation":486},{"text":712,"config":713},"Cookies",{"dataGaName":548,"dataGaLocation":486,"id":549,"isOneTrustButton":17},{"text":715,"config":716},"Privacy",{"href":543,"dataGaName":544,"dataGaLocation":486},[718,732],{"id":719,"title":10,"body":30,"config":720,"content":722,"description":30,"extension":726,"meta":727,"navigation":17,"path":728,"seo":729,"stem":730,"__hash__":731},"blogAuthors/en-us/blog/authors/rutvik-shah.yml",{"template":721},"BlogAuthor",{"name":10,"config":723},{"headshot":724,"ctfId":725},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749661843/Blog/Author%20Headshots/rutvik_shah_headshot.png","6co92rUBTbWcyV3EW23iEx","yml",{},"/en-us/blog/authors/rutvik-shah",{},"en-us/blog/authors/rutvik-shah","JRArwqK-9V0Orki_E-QqmcQG2AsaZP6XGqa-9ZB6GR8",{"id":733,"title":11,"body":30,"config":734,"content":735,"description":30,"extension":726,"meta":739,"navigation":17,"path":740,"seo":741,"stem":742,"__hash__":743},"blogAuthors/en-us/blog/authors/michael-friedrich.yml",{"template":721},{"name":11,"config":736},{"headshot":737,"ctfId":738},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749659879/Blog/Author%20Headshots/dnsmichi-headshot.jpg","dnsmichi",{},"/en-us/blog/authors/michael-friedrich",{},"en-us/blog/authors/michael-friedrich","lJ-nfRIhdG49Arfrxdn1Vv4UppwD51BB13S3HwIswt4",[745,758,770],{"content":746,"config":756},{"title":747,"description":748,"authors":749,"date":751,"heroImage":752,"body":753,"category":13,"tags":754},"Atlassian will train on your data: Opt out with GitLab","Learn why Atlassian's latest move is a threat to data governance and how GitLab's approach helps ensure your customers' data stays private and protected.",[750],"Jessica Hurwitz","2026-05-04","https://res.cloudinary.com/about-gitlab-com/image/upload/v1773866173/vte9qh8rriznvyclhkes.png","Starting August 17, 2026, Atlassian will begin collecting customer metadata and in-app content from Jira, Confluence, and other cloud products to train its AI offerings, including Rovo and Rovo Dev. This announcement comes after [GitHub recently changed its Copilot data usage policy](https://about.gitlab.com/blog/github-copilots-new-policy-for-ai-training-is-a-governance-wake-up-call/). **Taken together, these changes suggest opt-out-by-default is becoming the industry norm. GitLab takes the opposite position: no data collection, no AI training on customer data, no matter what tier you're on.**\n\n[Atlassian's change](https://www.atlassian.com/trust/ai/data-contribution) is enabled by default for all cloud customers and affects roughly 300,000 organizations. For customers on the Free, Standard, and Premium tiers, metadata collection is mandatory and cannot be turned off. Only Enterprise-tier customers have the option to opt out. This policy change deserves a close read if your engineering, IT, and program management teams run on Atlassian because they are most exposed by this change — and least likely to have been consulted before it happened.\n\nAlthough the underlying governance questions are the same for both Atlassian and GitHub's changes, the data at risk is different. Where GitHub's change concerned source code and developer interactions, Atlassian's reaches into project plans, internal documentation, workflow configurations, and operational metadata across Jira, Confluence, and the broader Atlassian stack. **For organizations that rely on these tools as their system of record for how work gets planned and delivered, the implications run deep.**\n\n## What changed and what it means for your data\n\nAtlassian will collect two categories of information: \n\n- **Metadata:** de-identified operational signals like story points, sprint dates, and SLA values, including data from its Teamwork Graph and connected third-party apps  \n- **In-app content:** user-generated material such as Confluence page content, Jira issue titles, descriptions, and comments\n\nAtlassian says it will apply de-identification and aggregation before training. Collected data may be retained for up to seven years, with in-app data removed within 30 days of opt-out and models retrained within 90 days.\n\nThere are some exclusions: Customers using customer-managed encryption keys, Atlassian Government Cloud, Isolated Cloud, or those with HIPAA requirements are carved out from collection. But for the vast majority of Atlassian's cloud customer base, data collection will start unless you pay for the Enterprise tier and actively flip the switch.\n\nThis reverses Atlassian's prior stated position that customer data would not be used to train or improve AI services. Organizations that adopted Jira and Confluence to manage their most sensitive planning workflows, sprint boards, security tickets, incident postmortems, and internal documentation will soon be contributing that content to Atlassian's AI training pipeline, without ever being asked.\n\n## The governance gap in \"opt-out by default\"\n\nOpt-out-by-default data collection for AI training is an emerging pattern across the software industry. It raises the same set of questions every time: How does this interact with existing data processing agreements? Does the vendor's definition of \"metadata\" match what your legal and security teams would consider non-sensitive data?\n\n**For many organizations, the answer to these questions is \"we don't know.\"** \n\nWhen a vendor changes its data practices through a terms-of-service update, the burden falls on the customer to notice, evaluate the implications, and act within the window the vendor provides. \n\nThe mandatory nature of metadata collection on Free, Standard, and Premium tiers makes this more acute. The only exit is upgrading to Enterprise, which requires a minimum of 801 users and custom pricing that would represent a significant cost jump for teams that aren't there yet. Data protection, in other words, is now a purchasing decision.\n\nThe tiered structure also introduces a subtler problem. Metadata like story points, sprint velocity, SLA metrics, and task classifications may seem innocuous in isolation, but in aggregate they reveal project structure, team performance patterns, and delivery cadence. For organizations in competitive industries, that operational intelligence has real value, and \"de-identified\" does not necessarily mean \"non-sensitive\" once patterns are reconstructable at scale.\n\n## Why this matters more for Atlassian-stack organizations\n\nIn Atlassian-based organizations, Jira has been the center how teams plan, track, and deliver work. It’s the source of truth for sprint planning, bug tracking, release management, portfolio coordination, and cross-functional project execution. \n\nIn regulated industries like financial services, public sector and manufacturing, Jira and Confluence together hold sensitive operational data that may be subject to compliance requirements. The risk compounds for organizations that have expanded beyond Jira into the broader Atlassian ecosystem.\n\nWhen you run Jira, Confluence, Bitbucket, and Bamboo together, the surface area of data now feeding into AI training spans your project plans, internal documentation, source code metadata, and CI/CD configurations — each of which security and compliance teams would want to review before sharing with a vendor's training pipeline.\n\nAtlassian’s Teamwork Graph connectors add another dimension for customers who have integrated third-party tools, such as Slack, Figma, Google Drive, Salesforce, and ServiceNow, into their environment. Teamwork Graph connectors index relationship and activity signals from these connected apps, which means the metadata Atlassian collects will not be limited to what lives inside Atlassian products. For security and compliance teams accustomed to evaluating data flows on a per-vendor basis, this cross-platform reach complicates the assessment considerably.\n\nOrganizations that are already navigating [Atlassian's push from Data Center](https://about.gitlab.com/blog/atlassian-ending-data-center-as-gitlab-maintains-deployment-choice/) and Server editions to the cloud face a compounding challenge. Adding default AI data collection to that migration path raises the stakes further: **The question is no longer just \"do we move to Atlassian Cloud?\" but \"do we move to Atlassian Cloud knowing our data will feed AI training unless we're on the most expensive tier?\"**\n\n## What regulated industries should be evaluating now\n\nThe compliance implications vary by sector, but the obligation to reassess is consistent.\n\nIn financial services, frameworks like [SR 11-7](https://www.federalreserve.gov/supervisionreg/srletters/sr1107.htm) and [DORA](https://eur-lex.europa.eu/eli/reg/2022/2554/oj/eng) require documented, auditable oversight of third-party technology providers, including how those providers handle data. In the public sector, [NIST 800-53](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final) and [FISMA](https://www.cisa.gov/topics/cyber-threats-and-advisories/federal-information-security-modernization-act) make controlling where sensitive data flows a foundational requirement. In healthcare, [HIPAA](https://www.hhs.gov/hipaa/index.html) governs how patient-adjacent data is handled by third parties. \n\nAcross the board, a material change in a vendor's data practices, such as Atlassian moving from \"we don't train on your data\" to \"we do, by default,\" triggers a documentation and risk reassessment obligation. \n\nInstitutions operating under the [EU AI Act](https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng) face an additional dimension: opt-out framing aligns with U.S. norms, while European regulators generally expect opt-in consent for data processing of this nature.\n\nIf your model risk or vendor management team documented Atlassian's data handling controls before this announcement, the question isn't whether this change triggers a reassessment obligation. It does. The question is whether your team can take action before August 17.\n\n## What to look for in your platform vendors\n\nCTOs and CISOs across regulated industries need to adopt AI in a way they can explain to regulators, boards, and customers. Because of this, GitLab operates within the following set of principles:\n\n**Unconditional data commitments, not tier-dependent protections.** Regulated organizations need to know, with specificity, what happens to their data. A commitment that varies by plan tier, or that requires action before a deadline, introduces exactly the kind of uncontrolled variable that keeps CISOs up at night.\n\n**Transparency and auditability.** Model risk management frameworks require organizations to understand the AI systems they deploy, including the training data and third parties involved. Vendors who cannot answer these questions clearly create documentation risk.\n\n**Separation between customer data and vendor AI training.** When a platform vendor trains models on customer usage data, workflows and operational patterns become inputs to a system that also serves competitors. For organizations where project structure or delivery cadence represents competitive advantage, that exposure matters.\n\n## How GitLab's approach differs\n\nGitLab doesn't train on customer data — at any tier, full stop. AI vendors powering GitLab Duo features are contractually prohibited from using customer inputs or outputs for their own purposes, [a commitment GitLab CEO Bill Staples](https://www.linkedin.com/posts/williamstaples_gitlab-1810-agentic-ai-now-open-to-even-activity-7443280763715985408-aHxf) has consistently reiterated.\n\n[GitLab's AI Transparency Center](https://about.gitlab.com/ai-transparency-center/) documents exactly which models power which features, how data is handled, and what vendor commitments are in place. [GitLab's AI Continuity Plan](https://handbook.gitlab.com/handbook/product/ai/continuity-plan/) documents how vendor changes are managed, including any material changes to how AI vendors treat customer data. For institutions managing third-party AI risk under DORA or similar frameworks, vendor continuity and concentration are active governance concerns, and having a documented plan for both is part of what responsible AI tooling looks like.\n\nFor organizations that require AI processing to stay within their own infrastructure, [GitLab Duo Agent Platform](https://about.gitlab.com/gitlab-duo/) is available with GitLab Self-Managed deployments, including support for integration with self-hosted AI models. This means prompts and code never leave the customer's environment. GitLab also provides IP indemnification for Duo-generated output, with no filters required and no activation steps needed. Where your data lives remains your choice, no matter your deployment model or subscription tier.\n\n> Whether your organization stays on Atlassian or begins evaluating alternatives, the conversation about who controls your data and how it gets used should be happening now. **The August 17 deadline is approaching, but you still have time to [try GitLab Ultimate with Duo Agent Platform for free today](https://gitlab.com/-/trials/new).**",[23,755],"product",{"featured":17,"template":15,"slug":757},"atlassian-will-train-on-your-data-opt-out-with-gitlab",{"content":759,"config":768},{"title":760,"description":761,"authors":762,"heroImage":764,"date":765,"body":766,"category":13,"tags":767},"GitLab and Anthropic: Governed AI for enterprise development","GitLab deepens its Anthropic Claude integration, bringing governed AI, access to new models, and cloud flexibility to enterprise software development.",[763],"Stuart Moncada","https://res.cloudinary.com/about-gitlab-com/image/upload/v1776457632/llddiylsgwuze0u1rjks.png","2026-04-28","For enterprise and public sector leaders, the tension is familiar: Software teams need to move faster with AI, while security, compliance, and regulatory expectations only get more stringent. GitLab deepens its Anthropic Claude integration so organizations get access to newly released Claude models inside GitLab’s intelligent orchestration platform where governance, compliance, and auditability already run.\n\nClaude powers capabilities across GitLab Duo Agent Platform as the default model out of the box, across a variety of use cases from code generation and review to agentic chat and vulnerability resolution. If you've used GitLab Duo, you've already experienced how Duo agents automate workflows across the entire software development lifecycle (SDLC).\n\nThis accelerates the integration of Claude’s capabilities into GitLab, broadens how enterprises can deploy them, and reinforces what makes GitLab fundamentally different as a platform for software development and engineering: governance, compliance, and auditability built into every AI interaction.\n\n> \"GitLab Duo has accelerated how our teams plan, build, and ship software. The combination of Anthropic's Claude and GitLab's platform means we're getting more capable AI without changing how we work or how it is governed.\"\n>\n> – Mans Booijink, Operations Manager, Cube\n\n## The real differentiator: Governed AI\n\nWith GitLab, governance controls and auditing are built into the SDLC. When Claude suggests a code change through the GitLab Duo Agent Platform, that suggestion flows through the same merge request process, the same approval rules, the same security scanning, and the same audit trail as every other change. AI doesn't get a shortcut around your controls. It operates within them.\n\nAs GitLab moves deeper into agentic software development, where AI autonomously handles well-defined tasks, the governance layer becomes more important. An AI agent that can open a merge request, help resolve a vulnerability, or refactor a service needs to be auditable, attributable, and subject to the same policy enforcement as a human developer. That requirement is an architectural decision GitLab made from the start, and one that grows more consequential as AI agents take on broader responsibilities.\n\n## Enterprise deployment flexibility\n\nThis also expands how organizations access the latest Claude models through GitLab. Claude is available within GitLab through Google Cloud's Vertex AI and Amazon Bedrock, which means enterprises can route AI workloads through the hyperscaler commitments and cloud governance frameworks they already have in place. No separate vendor contract. No new data residency questions. Your existing Google Cloud or AWS relationship is the on-ramp. \n\nGitLab is now also available in the [Claude Marketplace](https://claude.com/platform/marketplace), allowing customers to purchase GitLab Credits and apply them toward existing Anthropic spending commitments – consolidating AI spend and simplifying how teams discover and procure GitLab alongside their Anthropic investments.\n\n## Advancing an agentic future\n\nGitLab's vision for agentic software development, where AI handles defined tasks autonomously across planning, coding, testing, securing, and deploying, requires models with strong reasoning, reliability, and safety characteristics. It also requires a platform where those autonomous actions are fully governed.\n\nAgentic workflows demand models with strong reasoning, reliability, and safety characteristics, criteria that guide how GitLab selects and integrates AI model partners. And GitLab's governance framework helps ensure that as AI agents assume more advanced development work, enterprises maintain full visibility and control over what those agents do, when they do it, and how changes are tracked.\n\n## What this means for GitLab customers\n\nIf you're already using GitLab Duo Agent Platform, you'll get access to Claude models and deeper AI assistance across your software development lifecycle, all within the governance framework you already rely on.\n\nIf you're evaluating AI-powered software development platforms, you shouldn't have to choose between advanced AI capabilities and enterprise control. This strategic integration is built to deliver both.\n\n> Want to learn more about GitLab Duo Agent Platform? [Get a demo or start a free trial today](https://about.gitlab.com/gitlab-duo-agent-platform/).",[23,755,295],{"featured":17,"template":15,"slug":769},"gitlab-and-anthropic-governed-ai-for-enterprise-development",{"content":771,"config":780},{"title":772,"description":773,"authors":774,"heroImage":776,"date":777,"body":778,"category":13,"tags":779},"Give your AI agent direct, structured GitLab access with glab CLI","The GitLab CLI (glab) provides AI agents structured, reliable access to projects via the MCP, eliminating friction. This tutorial shows how you can speed up code review and issue triage.",[775],"Kai Armstrong","https://res.cloudinary.com/about-gitlab-com/image/upload/v1776347152/unw3mzatkd5xyfbzcnni.png","2026-04-27","\nWhen teams use GitLab Duo, Claude, Cursor, and other AI assistants, more of the development workflow runs through an AI agent acting on your behalf — reading issues, reviewing merge requests, running pipelines, and helping you ship faster. Most developers are already using the GitLab CLI (`glab`) from the terminal to interact with GitLab. Combining the two is a natural next step.\n\n\nThe problem is that without the right tools, AI agents are essentially guessing when it comes to your GitLab projects. They might hallucinate the details of an issue they've never seen, summarize a merge request based on stale training data rather than its actual state, or require you to manually copy context from a browser tab and paste it into a chat window just to get started. Every one of those workarounds is friction: it slows you down, introduces the possibility of error, and puts a hard ceiling on what your agent can actually do on your behalf. `glab` changes that by giving agents a direct, reliable interface to your projects.\n\n\nWith `glab`, your agent fetches what it needs directly from GitLab, acts on it, and reports back — so you spend less time relaying information and more time on the work that matters.\n\n\nIn this tutorial, you'll learn how to use `glab` to give AI agents structured, reliable access to your GitLab projects. You'll also discover how that unlocks a faster, more capable development workflow.\n\n\n## How to connect your AI agent to GitLab through MCP\n\n\nThe most direct way to supercharge your AI workflow is to give your AI agent native access to `glab` through Model Context Protocol ([MCP](https://about.gitlab.com/topics/ai/model-context-protocol/)).\n\n\n MCP is an open standard that lets AI tools discover and use external capabilities at runtime. Once connected, your AI assistant can read issues, comment on merge requests, check pipeline status, and write back to GitLab, all without copying anything from the UI or writing a single API call yourself.\n\n\n To get started, run:\n\n\n ```shell\n # Start the glab MCP server\n glab mcp serve\n ```\n\n\n Once your MCP client is configured, your AI can answer questions like *\"What's the status of my open MRs?\"* or *\"Are there any failing pipelines on main?\"* by querying GitLab directly, not scraping the web UI, not relying on stale training data. See the [full setup docs](https://docs.gitlab.com/cli/) for configuration steps for Claude Code, Cursor, and other editors.\n\n\n One detail worth knowing: `glab` automatically adds `--output json` when invoked through MCP, for any command that supports it. Your agent gets clean, structured data without you needing to think about output formats. And because `glab` uses the official MCP SDK, it stays compatible as the\n protocol evolves.\n\n\n We've also been deliberate about *which* commands are exposed through MCP. Commands that require interactive terminal input are intentionally\n excluded, so your agent never gets stuck waiting for input that will never come. What's exposed is what actually works reliably in an agent context.\n\n\n ## Let your AI participate in code review\n\n\n Most developers have a backlog of MRs waiting for review. It's one of the most time-consuming parts of the job and one of the best places to put\n AI to work. With `glab`, your agent doesn't just observe your review queue, it can work through it with you.\n\n\n ### See exactly what still needs addressing\n\n\n Start with this:\n\n\n ```shell\n glab mr view 2677 --comments --unresolved --output json\n ```\n\n\n This input returns the full MR: metadata, description, and every\n unresolved discussion, as a single structured JSON payload. Hand that to\n your AI and it has everything it needs: which threads are open, what the\n reviewer asked for, and in what context. No tab-switching, no copy-pasting\n individual comments.\n\n\n \n ```json\n {\n   \"id\": 2677,\n   \"title\": \"feat: add OAuth2 support\",\n   \"state\": \"opened\",\n   \"author\": { \"username\": \"jdwick\" },\n   \"labels\": [\"backend\", \"needs-review\"],\n   \"blocking_discussions_resolved\": false,\n   \"discussions\": [\n     {\n       \"id\": \"3107030349\",\n       \"resolved\": false,\n       \"notes\": [\n         {\n           \"author\": { \"username\": \"dmurphy\" },\n           \"body\": \"This error handling will swallow panics — consider wrapping with recover()\",\n           \"created_at\": \"2026-03-14T09:23:11.000Z\"\n         }\n       ]\n     },\n     {\n       \"id\": \"3107030412\",\n       \"resolved\": false,\n       \"notes\": [\n         {\n           \"author\": { \"username\": \"sreeves\" },\n           \"body\": \"Token refresh logic needs a test for the expired token case\",\n           \"created_at\": \"2026-03-14T10:05:44.000Z\"\n         }\n       ]\n     }\n   ]\n }\n ```\n\n\n Instead of reading through every thread yourself, you ask your agent  *\"what do I still need to fix in MR 2677?\"* and get back a prioritized summary with suggested changes. This all happens from a single command.\n\n\n ### Close the loop programmatically\n\n\n Once your AI has helped you address the feedback, it can resolve\n discussions:\n\n\n ```shell\n # List all discussions — structured, ready for the agent to process\n glab mr note list 456 --output json\n\n # Resolve a discussion once the feedback is addressed\n glab mr note resolve 456 3107030349\n\n # Reopen if something needs another look\n glab mr note reopen 456 3107030349\n ```\n\n\n\n ```json\n [\n   {\n     \"id\": 3107030349,\n     \"body\": \"This error handling will swallow panics — consider wrapping with recover()\",\n     \"author\": { \"username\": \"dmurphy\" },\n     \"resolved\": false,\n     \"resolvable\": true\n   },\n   {\n     \"id\": 3107030412,\n     \"body\": \"Token refresh logic needs a test for the expired token case\",\n     \"author\": { \"username\": \"sreeves\" },\n     \"resolved\": false,\n     \"resolvable\": true\n   }\n ]\n ```\n\n\n\n Note IDs are visible directly in the GitLab UI and API, no extra lookup needed. Your agent can work through the full list, verify each fix, and\n resolve as it goes.\n\n\n ## Talk to your AI about your code more effectively\n\n\n Even if you're not running an MCP server, there's a simpler shift that makes a huge difference: using `glab` to feed your AI better information.\n\n\n Think about the last time you asked an AI assistant to help triage issues or debug a failing pipeline. You probably copied some text from the GitLab UI and pasted it into the chat. Here's what your agent is actually\n working with when you do that:\n\n\n ```text\n open issues: 12 • milestone: 17.10 • label: bug, needs-triage ...\n ```\n\n\n Compare that to what it gets with `glab`:\n\n\n \n ```json\n [\n   {\n     \"iid\": 902,\n     \"title\": \"Pipeline fails on merge to main\",\n     \"labels\": [\"bug\", \"needs-triage\"],\n     \"milestone\": { \"title\": \"17.10\" },\n     \"assignees\": []\n   },\n   ...\n ]\n ```\n\n\n Structured, typed, complete; no ambiguity, no parsing guesswork. That's the difference between an agent that can act and one that has to ask\n follow-up questions.\n\n\n If you're using the MCP server, you get this automatically: `glab` adds `--output json` for any command that supports it. If you're working directly\n from the terminal, just add the flag yourself:\n\n\n ```shell\n # Pull open issues for triage\n glab issue list --label \"needs-triage\" --output json\n\n # Check pipeline status\n glab ci status --output json\n\n # Get full MR details\n glab mr view 456 --output json\n ```\n\n\n We've significantly expanded JSON output support in recent releases. It now covers CI status, milestones, labels, releases, schedules, cluster agents, work items, MR approvers, repo contributors, and more. If `glab` can\n retrieve it, your AI can consume it cleanly.\n\n\n ### A real workflow\n\n\n ```shell\n $ glab issue list --label \"needs-triage\" --milestone \"17.10\"\n --output json\n ```\n\n\n ```text\n Agent: I found 2 unassigned bugs in the 17.10 milestone that need triage:\n 1. #902 — Pipeline fails on merge to main (opened 5 days ago)\n 2. #903 — Auth token not refreshing on expiry (opened 4 days ago)\n Both are unassigned. Want me to draft triage notes and suggest assignees based on recent commit history?\n ```\n\n\n ## Your agent is never limited to built-in commands\n\n\n `glab`'s first-class commands cover the most common workflows, but your agent is never limited to them. Through `glab api`, it has authenticated access to the full GitLab REST and GraphQL API surface, using the same session, with no extra credentials or configuration required.\n\n\n This is a meaningful differentiator. Most CLI tools stop at what their commands expose. With `glab`, if GitLab's API supports it, your agent can do it. It's always working from a trusted, authenticated context.\n\n\n A practical example: fetching just the list of changed files in an MR before deciding which diffs to pull in full:\n\n\n ```shell\n # Get changed file paths — lightweight, no diff content yet\n glab api \"/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/diffs?per_page=100\" \\\n | jq '.[].new_path'\n\n# Then fetch only the specific file your agent needs\nglab api \"/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/diffs?per_page=100\" \\\n| jq '.[] | select(.new_path == \"path/to/file.go\")'\n ```\n\n\n ```text\n \"internal/auth/token.go\"\n \"internal/auth/token_test.go\"\n \"internal/oauth/refresh.go\"\n ```\n\n\n For anything the REST API doesn't cover (epics, certain work item queries, complex cross-project data),  `glab api graphql` gives you the full\n GraphQL interface:\n\n\n ```shell\n   glab api graphql -f query='\n {\n   project(fullPath: \"gitlab-org/gitlab\") {\n     mergeRequest(iid: \"12345\") {\n       title\n       reviewers { nodes { username } }\n     }\n   }\n }'\n ```\n\n ```json\n{\n   \"data\": {\n     \"project\": {\n       \"mergeRequest\": {\n         \"title\": \"feat: add OAuth2 support\",\n         \"reviewers\": {\n           \"nodes\": [\n             { \"username\": \"dmurphy\" },\n             { \"username\": \"sreeves\" }\n           ]\n         }\n       }\n     }\n   }\n }\n\n ```\n\n\n Your agent has a single, authenticated entry point to everything GitLab exposes without the token juggling, separate API clients, or configuration\n overhead.\n\n\n ## What's coming and your feedback\n\n\n Two improvements we're actively working on will make `glab` even more useful for agent workflows:\n\n\n **Agent-aware help text.** Today, `--help` output is written for humansvat a terminal. We're updating it to surface the non-interactive alternative\n for every interactive command, flag which commands support `--output json`, and generally make help a useful resource for agents discovering\n capabilities at runtime — not just humans.\n\n\n **Better machine-readable errors.** When something goes wrong today, agents get the same human-readable error messages as terminal users. We're\n changing that so errors in JSON mode return structured output, giving your agent the information it needs to handle failures gracefully, retry intelligently, or surface the right context back to you.\n\n\n Both of these are in active development. If you're already using `glab` with an AI tool, you're exactly the audience we want feedback from.\n\n\n * **What friction are you hitting?** Commands that don't behave well in agent contexts, error messages that aren't actionable, gaps in JSON output\n coverage. We want to know.\n\n * **What workflows have you unlocked?** Real usage patterns help us prioritize what to build next.\n\n\n Join the discussion in [our feedback issue](https://gitlab.com/gitlab-org/cli/-/issues/8177) — that's where we're shaping the roadmap for agent-friendliness, and where your input will have the most direct impact. If you've found a specific gap, [open an issue](https://gitlab.com/gitlab-org/cli/-/issues/new). If you've got a fix in mind, contributions are welcome. Visit [CONTRIBUTING.md](https://gitlab.com/gitlab-org/cli/-/blob/main/CONTRIBUTING.md) to get started.\n\n\n The GitLab CLI has always been about giving developers more control over their workflow. As AI becomes a bigger part of how we all work, that means making `glab` the best possible interface between your AI tools and your GitLab projects. We're just getting started and we'd love to build the next part with you.\n",[23,755,24],{"featured":17,"template":15,"slug":781},"give-your-ai-agent-direct-structured-gitlab-access-with-glab-cli",{"promotions":783},[784,797,808,820],{"id":785,"categories":786,"header":787,"text":788,"button":789,"image":794},"ai-modernization",[13],"Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":790,"config":791},"Get your AI maturity score",{"href":792,"dataGaName":793,"dataGaLocation":258},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":795},{"src":796},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":798,"categories":799,"header":800,"text":788,"button":801,"image":805},"devops-modernization",[755,43],"Are you just managing tools or shipping innovation?",{"text":802,"config":803},"Get your DevOps maturity score",{"href":804,"dataGaName":793,"dataGaLocation":258},"/assessments/devops-modernization-assessment/",{"config":806},{"src":807},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":809,"categories":810,"header":812,"text":788,"button":813,"image":817},"security-modernization",[811],"security","Are you trading speed for security?",{"text":814,"config":815},"Get your security maturity score",{"href":816,"dataGaName":793,"dataGaLocation":258},"/assessments/security-modernization-assessment/",{"config":818},{"src":819},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"id":821,"paths":822,"header":825,"text":826,"button":827,"image":832},"github-azure-migration",[823,824],"migration-from-azure-devops-to-gitlab","integrating-azure-devops-scm-and-gitlab","Is your team ready for GitHub's Azure move?","GitHub is already rebuilding around Azure. Find out what it means for you.",{"text":828,"config":829},"See how GitLab compares to GitHub",{"href":830,"dataGaName":831,"dataGaLocation":258},"/compare/gitlab-vs-github/github-azure-migration/","github azure migration",{"config":833},{"src":807},{"header":835,"blurb":836,"button":837,"secondaryButton":842},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":838,"config":839},"Get your free trial",{"href":840,"dataGaName":57,"dataGaLocation":841},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":524,"config":843},{"href":61,"dataGaName":62,"dataGaLocation":841},1777934794845]