[{"data":1,"prerenderedAt":813},["ShallowReactive",2],{"/en-us/blog/how-gitlab-duo-agent-platform-transforms-dataops":3,"navigation-en-us":35,"banner-en-us":446,"footer-en-us":456,"blog-post-authors-en-us-Dennis van Rooijen":698,"blog-related-posts-en-us-how-gitlab-duo-agent-platform-transforms-dataops":713,"blog-promotions-en-us":751,"next-steps-en-us":803},{"id":4,"title":5,"authorSlugs":6,"authors":8,"body":10,"category":11,"categorySlug":11,"config":12,"content":16,"date":20,"description":17,"extension":25,"externalUrl":26,"featured":14,"heroImage":19,"isFeatured":14,"meta":27,"navigation":14,"path":28,"publishedDate":20,"rawbody":29,"seo":30,"slug":13,"stem":31,"tagSlugs":32,"tags":33,"template":15,"updatedDate":26,"__hash__":34},"blogPosts/en-us/blog/how-gitlab-duo-agent-platform-transforms-dataops.yml","How GitLab Duo Agent Platform transforms DataOps",[7],"dennis-van-rooijen",[9],"Dennis van Rooijen","Creating dbt models manually is a tedious process that can consume hours of a data engineer's time. Especially when no (big) business transformations are made, it is not the most attractive part of an engineer's work with data.\nBut what if you could automate this entire process? In this walkthrough, I'll show you exactly how [GitLab Duo Agent Platform](https://about.gitlab.com/gitlab-duo-agent-platform/) can generate comprehensive dbt models in just minutes, complete with proper structure, tests, and documentation.\n## What we're building\nOur marketing team wants to effectively manage and optimize advertising investments. One of the advertising platforms is Reddit, so, therefore, we are extracting data from the Reddit Ads API to our enterprise [Data Platform](https://handbook.gitlab.com/handbook/enterprise-data/platform/) Snowflake. At GitLab, we have three layers of storage:\n1. `raw` layer - first landing point for unprocessed data from external sources; not ready for business use 2. `prep` layer - first transformation layer with source models; still not ready for general business use 3. `prod` layer - final transformed data ready for business use and Tableau reporting\n![Chart of storage layers](https://res.cloudinary.com/about-gitlab-com/image/upload/v1758030995/zo7vespktzfdtdtiauz7.png)\nFor this walkthrough, data has already landed in the raw layer by our extraction solution Fivetran, and we'll generate dbt models that handle the data through the `prep` layer to the `prod` layer.\nWithout having to write a single line of dbt code ourselves, by the end of the walkthrough we will have:\n- **Source models** in the prep layer - **Workspace models** in the prod layer - **Complete dbt configurations** for all 13 tables (which includes 112 columns) in the Reddit Ads dataset - **Test queries** to validate the outcomes\nThe entire process will take less than 10 minutes, compared to the hours it would typically require manually. Here are the steps to follow:\n## 1. Prepare the data structure\nBefore GitLab Duo can generate our models, it needs to understand the complete table structure. The key is running a query against Snowflake's information schema, because we are currently investigating how to connect GitLab Duo via Model Context Protocol ([MCP](https://about.gitlab.com/topics/ai/model-context-protocol/)) to our Snowflake instance:\n```sql\nSELECT \n    table_name,\n    column_name,\n    data_type,\n    is_nullable,\n    CASE \n        WHEN is_nullable = 'NO' THEN 'PRIMARY_KEY'\n        ELSE NULL \n    END as key_type\nFROM raw.information_schema.columns WHERE table_schema = 'REDDIT_ADS' ORDER BY table_name, ordinal_position;\n```\nThis query captures:\n- All table and column names - Data types for proper model structure - Nullable constraints - Primary key identification (non-nullable columns in this dataset)\n**Pro tip:** In the Reddit Ads dataset, all non-nullable columns serve as primary keys — a pattern. I validated by checking tables like `ad_group`, which has two non-nullable columns (`account_id` and `id`) that are both marked as primary keys. Running this query returned 112 rows of metadata that I exported as a CSV file for model generation. While this manual step works well today, we're investigating a direct GitLab Duo integration with our Data Platform via MCP to automate this process entirely.\n## 2. Set up GitLab Duo\nThere are two ways to interact with [GitLab Duo](https://docs.gitlab.com/user/get_started/getting_started_gitlab_duo/):\n1. **Web UI chat function** 2. **Visual Studio Code plugin**\nI chose the VS Code plugin because I can run the dbt models locally to test them.\n## 3. Enter the 'magic' prompt\nHere's the exact prompt I used to generate all the dbt code:\n```text\nCreate dbt models for all the tables in the file structure.csv.\nI want to have the source models created, with a filter that dedupes the data based on the primary key. Create these in a new folder reddit_ads. I want to have workspace models created and store these in the workspace_marketing schema.\nTake this MR as example: [I've referenced to previous source implementation]. Here is the same done for Source A, but now it needs to be done for Reddit Ads. \nPlease check the dbt style guide when creating the code: https://handbook.gitlab.com/handbook/enterprise-data/platform/dbt-guide/\n```\nKey elements that made this prompt effective:\n- **Clear specifications** for both source and workspace models. - **Reference example** from a previous similar merge request. - **Style guide reference** to ensure code quality and consistency. - **Specific schema targeting** for proper organization.\n## 4. GitLab Duo's process\nAfter submitting the prompt, GitLab Duo got to work. The entire generation process took a few minutes, during which GitLab Duo:\n1. **Read and analyzed** the CSV input file. 2. **Examined table structures** from the metadata. 3. **Referenced our dbt style guide** for coding standards. 4. **Took similar merge request into account** to properly structure. 5. **Generated source models** for all 13 tables. 6. **Created workspace models** for all 13 tables. 7. **Generated supporting dbt files**:\n   - `sources.yml` configuration.\n   - `schema.yml` files with tests and documentation.\n   - Updated `dbt_project.yml` with schema references.\n\n## The results\nThe output was remarkable:\n- **1 modified file:** dbt_project.yml (added reddit_ads schema configuration) - **29 new files:**\n  - **26 dbt models** (13 source + 13 workspace)\n  - **3 YAML files**\n- **Nearly 900 lines of code** generated automatically - **Built-in data tests,** including unique constraints on primary key columns - **Generic descriptions** for all models and columns - **Proper deduplication logic** in source models - **Clean, consistent code structure** following the GitLab dbt style guide\n```text\ntransform/snowflake-dbt/ ├── dbt_project.yml                                                    [MODIFIED] └── models/\n    ├── sources/\n    │   └── reddit_ads/\n    │       ├── reddit_ads_ad_group_source.sql                        [NEW]\n    │       ├── reddit_ads_ad_source.sql                              [NEW]\n    │       ├── reddit_ads_business_account_source.sql                [NEW]\n    │       ├── reddit_ads_campaign_source.sql                        [NEW]\n    │       ├── reddit_ads_custom_audience_history_source.sql         [NEW]\n    │       ├── reddit_ads_geolocation_source.sql                     [NEW]\n    │       ├── reddit_ads_interest_source.sql                        [NEW]\n    │       ├── reddit_ads_targeting_community_source.sql             [NEW]\n    │       ├── reddit_ads_targeting_custom_audience_source.sql       [NEW]\n    │       ├── reddit_ads_targeting_device_source.sql                [NEW]\n    │       ├── reddit_ads_targeting_geolocation_source.sql           [NEW]\n    │       ├── reddit_ads_targeting_interest_source.sql              [NEW]\n    │       ├── reddit_ads_time_zone_source.sql                       [NEW]\n    │       ├── schema.yml                                            [NEW]\n    │       └── sources.yml                                           [NEW]\n    └── workspaces/\n        └── workspace_marketing/\n            └── reddit_ads/\n                ├── schema.yml                                        [NEW]\n                ├── wk_reddit_ads_ad.sql                              [NEW]\n                ├── wk_reddit_ads_ad_group.sql                        [NEW]\n                ├── wk_reddit_ads_business_account.sql                [NEW]\n                ├── wk_reddit_ads_campaign.sql                        [NEW]\n                ├── wk_reddit_ads_custom_audience_history.sql         [NEW]\n                ├── wk_reddit_ads_geolocation.sql                     [NEW]\n                ├── wk_reddit_ads_interest.sql                        [NEW]\n                ├── wk_reddit_ads_targeting_community.sql             [NEW]\n                ├── wk_reddit_ads_targeting_custom_audience.sql       [NEW]\n                ├── wk_reddit_ads_targeting_device.sql                [NEW]\n                ├── wk_reddit_ads_targeting_geolocation.sql           [NEW]\n                ├── wk_reddit_ads_targeting_interest.sql              [NEW]\n                └── wk_reddit_ads_time_zone.sql                       [NEW]\n\n```\n### Sample generated code\nHere's an example of the generated code quality. For the `time_zone` table, GitLab Duo created:\n**Prep Layer Source Model**\n```sql\nWITH source AS (\n  SELECT *\n  FROM {{ source('reddit_ads','time_zone') }}\n  QUALIFY ROW_NUMBER() OVER (PARTITION BY id ORDER BY _fivetran_synced DESC) = 1\n),\nrenamed AS (\n  SELECT\n    id::VARCHAR                               AS time_zone_id,\n    code::VARCHAR                             AS time_zone_code,\n    dst_offset::NUMBER                        AS time_zone_dst_offset,\n    is_dst_active::BOOLEAN                    AS is_time_zone_dst_active,\n    name::VARCHAR                             AS time_zone_name,\n    offset::NUMBER                            AS time_zone_offset,\n    _fivetran_synced::TIMESTAMP               AS fivetran_synced_at\n  FROM source\n)\nSELECT * FROM renamed\n```\n**Schema.yml**\n```yaml\nmodels:\n  - name: reddit_ads_time_zone_source\n    description: Time zone data from Reddit Ads system\n    columns:\n      - name: time_zone_id\n        description: Unique identifier for time zone records\n        data_tests:\n          - unique\n          - not_null\n      - name: time_zone_code\n        description: Code for the time zone\n      - name: time_zone_dst_offset\n        description: Daylight saving time offset for the time zone\n      - name: is_time_zone_dst_active\n        description: Flag indicating if daylight saving time is active\n      - name: time_zone_name\n        description: Name of the time zone\n      - name: time_zone_offset\n        description: Offset for the time zone\n      - name: fivetran_synced_at\n        description: Timestamp when the record was last synced by Fivetran\n\n```\n**Source.yml**\n```yaml\nsources:\n  - name: reddit_ads\n    database: RAW\n    schema: reddit_ads\n    loaded_at_field: _fivetran_synced\n    loader: fivetran\n    description: Reddit Ads data\n\n    quoting:\n      database: true\n      schema: false\n      identifier: false\n\n    tables:\n      - name: time_zone\n\n```\n**Workspace Model**\n```sql\nWITH source AS (\n  SELECT *\n  FROM {{ ref('reddit_ads_time_zone_source') }}\n)\nSELECT * FROM source\n```\n## 5. Quality validation\nNow that the code looks good, I pushed it to the MR and executed [CI test pipeline](https://handbook.gitlab.com/handbook/enterprise-data/platform/ci-jobs/#build_changes) to test the code and validate the outcome. I asked GitLab Duo to create a validation query:\n```text\nCreate a test query to test the row counts between the raw layer and the workspace layer. Keep in mind that we do deduplication, so we can compare both using distinct on the primary keys.\n```\nThe AI generated a comprehensive validation query that:\n- Compared row counts between raw and workspace layers. - Accounted for deduplication logic. - Tested all 13 tables. - Calculated data retention percentages.\n\u003Cdetails> \u003Csummary>Generated SQL Test query\u003C/summary>\n```sql\n-- Reddit Ads Row Count Validation Test -- Compares distinct counts between RAW layer and WORKSPACE_MARKETING layer -- Accounts for deduplication logic in source models\nWITH raw_counts AS (\n  -- Single primary key tables\n  SELECT 'ad' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.AD\n  \n  UNION ALL\n  \n  SELECT 'business_account' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.BUSINESS_ACCOUNT\n  \n  UNION ALL\n  \n  SELECT 'campaign' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.CAMPAIGN\n  \n  UNION ALL\n  \n  SELECT 'custom_audience_history' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.CUSTOM_AUDIENCE_HISTORY\n  \n  UNION ALL\n  \n  SELECT 'geolocation' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.GEOLOCATION\n  \n  UNION ALL\n  \n  SELECT 'interest' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.INTEREST\n  \n  UNION ALL\n  \n  SELECT 'time_zone' AS table_name, COUNT(DISTINCT id) AS raw_count\n  FROM RAW.REDDIT_ADS.TIME_ZONE\n  \n  -- Composite primary key tables\n  UNION ALL\n  \n  SELECT 'ad_group' AS table_name, COUNT(DISTINCT CONCAT(account_id, '|', id)) AS raw_count\n  FROM RAW.REDDIT_ADS.AD_GROUP\n  \n  UNION ALL\n  \n  SELECT 'targeting_community' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', community_id)) AS raw_count\n  FROM RAW.REDDIT_ADS.TARGETING_COMMUNITY\n  \n  UNION ALL\n  \n  SELECT 'targeting_custom_audience' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', custom_audience_id)) AS raw_count\n  FROM RAW.REDDIT_ADS.TARGETING_CUSTOM_AUDIENCE\n  \n  UNION ALL\n  \n  SELECT 'targeting_device' AS table_name, COUNT(DISTINCT _fivetran_id) AS raw_count\n  FROM RAW.REDDIT_ADS.TARGETING_DEVICE\n  \n  UNION ALL\n  \n  SELECT 'targeting_geolocation' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', geolocation_id)) AS raw_count\n  FROM RAW.REDDIT_ADS.TARGETING_GEOLOCATION\n  \n  UNION ALL\n  \n  SELECT 'targeting_interest' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', interest_id)) AS raw_count\n  FROM RAW.REDDIT_ADS.TARGETING_INTEREST\n),\nworkspace_counts AS (\n  -- Workspace layer counts using primary keys from schema.yml\n  SELECT 'ad' AS table_name, COUNT(DISTINCT ad_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_AD\n  \n  UNION ALL\n  \n  SELECT 'business_account' AS table_name, COUNT(DISTINCT business_account_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_BUSINESS_ACCOUNT\n  \n  UNION ALL\n  \n  SELECT 'campaign' AS table_name, COUNT(DISTINCT campaign_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_CAMPAIGN\n  \n  UNION ALL\n  \n  SELECT 'custom_audience_history' AS table_name, COUNT(DISTINCT custom_audience_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_CUSTOM_AUDIENCE_HISTORY\n  \n  UNION ALL\n  \n  SELECT 'geolocation' AS table_name, COUNT(DISTINCT geolocation_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_GEOLOCATION\n  \n  UNION ALL\n  \n  SELECT 'interest' AS table_name, COUNT(DISTINCT interest_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_INTEREST\n  \n  UNION ALL\n  \n  SELECT 'time_zone' AS table_name, COUNT(DISTINCT time_zone_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TIME_ZONE\n  \n  -- Composite primary key tables\n  UNION ALL\n  \n  SELECT 'ad_group' AS table_name, COUNT(DISTINCT CONCAT(ad_group_account_id, '|', ad_group_id)) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_AD_GROUP\n  \n  UNION ALL\n  \n  SELECT 'targeting_community' AS table_name, COUNT(DISTINCT CONCAT(targeting_community_ad_group_id, '|', targeting_community_id)) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_COMMUNITY\n  \n  UNION ALL\n  \n  SELECT 'targeting_custom_audience' AS table_name, COUNT(DISTINCT CONCAT(targeting_custom_audience_ad_group_id, '|', targeting_custom_audience_id)) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_CUSTOM_AUDIENCE\n  \n  UNION ALL\n  \n  SELECT 'targeting_device' AS table_name, COUNT(DISTINCT targeting_device_fivetran_id) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_DEVICE\n  \n  UNION ALL\n  \n  SELECT 'targeting_geolocation' AS table_name, COUNT(DISTINCT CONCAT(targeting_geolocation_ad_group_id, '|', targeting_geolocation_id)) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_GEOLOCATION\n  \n  UNION ALL\n  \n  SELECT 'targeting_interest' AS table_name, COUNT(DISTINCT CONCAT(targeting_interest_ad_group_id, '|', targeting_interest_id)) AS workspace_count\n  FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_INTEREST\n)\n-- Final comparison with validation results SELECT \n  r.table_name,\n  r.raw_count,\n  w.workspace_count,\n  r.raw_count - w.workspace_count AS count_difference,\n  CASE \n    WHEN r.raw_count = w.workspace_count THEN '✅ PASS'\n    WHEN r.raw_count > w.workspace_count THEN '⚠️ RAW > WORKSPACE (Expected due to deduplication)'\n    ELSE '❌ FAIL - WORKSPACE > RAW (Unexpected)'\n  END AS validation_status,\n  ROUND((w.workspace_count::FLOAT / r.raw_count::FLOAT) * 100, 2) AS data_retention_percentage\nFROM raw_counts r JOIN workspace_counts w ON r.table_name = w.table_name ORDER BY r.table_name;\n```\n\u003C/details>\n![query results table](https://res.cloudinary.com/about-gitlab-com/image/upload/v1758030995/guicjhzwvrz3czwjs3xo.png)\nRunning this query showed:\n- **Zero differences** in row counts after deduplication - **100% data retention** across all tables - **All tests passed** successfully\n## The bottom line: Massive time savings\n- **Traditional approach:** 6-8 hours of manual coding, testing, and debugging\n- **GitLab Duo approach:** 6-8 minutes of generation + review time\nThis represents a 60x improvement in developer efficiency (from 6-8 hours to 6-8 minutes), while maintaining high code quality.\n## Best practices for success\nBased on this experience, here are key recommendations:\n### Prepare your metadata\n- Extract complete table structures including data types and constraints. - Identify primary keys and relationships upfront. - Export clean, well-formatted CSV input files.\n**Note:** By connecting GitLab Duo via MCP to your (meta)data, you could exclude this manual step.\n### Provide clear context\n- Reference existing example MRs when possible. - Specify your coding standards and style guides. - Be explicit about folder structure and naming conventions.\n### Validate thoroughly\n- Always create validation queries for data integrity. - Test locally before merging. - Run your CI/CD pipeline to catch any issues.\n### Leverage AI for follow-up tasks\n- Generate test queries automatically. - Create documentation templates. - Build validation scripts.\n## What's next\nThis demonstration shows how AI-powered development tools like GitLab Duo are also transforming data engineering workflows. The ability to generate hundreds of lines of production-ready code in minutes —  complete with tests, documentation, and proper structure — represents a fundamental shift in how we approach repetitive development tasks.\nBy leveraging AI to handle the repetitive aspects of dbt model creation, data engineers can focus on higher-value activities like data modeling strategy, performance optimization, and business logic implementation.\n**Ready to try this yourself?** Start with a small dataset, prepare your metadata carefully, and watch as GitLab Duo transforms hours of work into minutes of automated generation.\n> [Trial GitLab Duo Agent Platform today.](https://about.gitlab.com/gitlab-duo-agent-platform/)\n## Read more\n- [GitLab 18.3: Expanding AI orchestration in software engineering](https://about.gitlab.com/blog/gitlab-18-3-expanding-ai-orchestration-in-software-engineering/) - [GitLab Duo Agent Platform Public Beta: Next-gen AI orchestration and more](https://about.gitlab.com/blog/gitlab-duo-agent-platform-public-beta/)\n","ai-ml",{"slug":13,"featured":14,"template":15},"how-gitlab-duo-agent-platform-transforms-dataops",true,"BlogPost",{"title":5,"description":17,"authors":18,"heroImage":19,"date":20,"category":11,"tags":21,"body":10},"Explore how to turn hours of manual coding into minutes of automated generation with this comprehensive dbt model creation walkthrough.",[9],"blog/hero%20images/workflow_1800x945.png","2025-09-16",[22,23,24],"product","tutorial","features","yml",null,{},"/en-us/blog/how-gitlab-duo-agent-platform-transforms-dataops","seo:\n  title: How GitLab Duo Agent Platform transforms DataOps\n  description: Explore how to turn hours of manual coding into minutes of automated generation with this comprehensive dbt model creation walkthrough.\nconfig:\n  slug: how-gitlab-duo-agent-platform-transforms-dataops\n  featured: true\n  template: BlogPost\ncontent:\n  title: How GitLab Duo Agent Platform transforms DataOps\n  description: Explore how to turn hours of manual coding into minutes of automated generation with this comprehensive dbt model creation walkthrough.\n  authors:\n    - Dennis van Rooijen\n  heroImage: blog/hero%20images/workflow_1800x945.png\n  date: '2025-09-16'\n  category: ai-ml\n  tags:\n    - product\n    - tutorial\n    - features\n  body: >\n    Creating dbt models manually is a tedious process that can consume hours of a data engineer's time. Especially when no (big) business transformations are made, it is not the most attractive part of an engineer's work with data.\n\n    But what if you could automate this entire process? In this walkthrough, I'll show you exactly how [GitLab Duo Agent Platform](https://about.gitlab.com/gitlab-duo-agent-platform/) can generate comprehensive dbt models in just minutes, complete with proper structure, tests, and documentation.\n\n    ## What we're building\n\n    Our marketing team wants to effectively manage and optimize advertising investments. One of the advertising platforms is Reddit, so, therefore, we are extracting data from the Reddit Ads API to our enterprise [Data Platform](https://handbook.gitlab.com/handbook/enterprise-data/platform/) Snowflake. At GitLab, we have three layers of storage:\n\n    1. `raw` layer - first landing point for unprocessed data from external sources; not ready for business use\n    2. `prep` layer - first transformation layer with source models; still not ready for general business use\n    3. `prod` layer - final transformed data ready for business use and Tableau reporting\n\n    ![Chart of storage layers](https://res.cloudinary.com/about-gitlab-com/image/upload/v1758030995/zo7vespktzfdtdtiauz7.png)\n\n    For this walkthrough, data has already landed in the raw layer by our extraction solution Fivetran, and we'll generate dbt models that handle the data through the `prep` layer to the `prod` layer.\n\n    Without having to write a single line of dbt code ourselves, by the end of the walkthrough we will have:\n\n    - **Source models** in the prep layer\n    - **Workspace models** in the prod layer\n    - **Complete dbt configurations** for all 13 tables (which includes 112 columns) in the Reddit Ads dataset\n    - **Test queries** to validate the outcomes\n\n    The entire process will take less than 10 minutes, compared to the hours it would typically require manually. Here are the steps to follow:\n\n    ## 1. Prepare the data structure\n\n    Before GitLab Duo can generate our models, it needs to understand the complete table structure. The key is running a query against Snowflake's information schema, because we are currently investigating how to connect GitLab Duo via Model Context Protocol ([MCP](https://about.gitlab.com/topics/ai/model-context-protocol/)) to our Snowflake instance:\n\n    ```sql\n\n    SELECT \n        table_name,\n        column_name,\n        data_type,\n        is_nullable,\n        CASE \n            WHEN is_nullable = 'NO' THEN 'PRIMARY_KEY'\n            ELSE NULL \n        END as key_type\n    FROM raw.information_schema.columns\n    WHERE table_schema = 'REDDIT_ADS'\n    ORDER BY table_name, ordinal_position;\n\n    ```\n\n    This query captures:\n\n    - All table and column names\n    - Data types for proper model structure\n    - Nullable constraints\n    - Primary key identification (non-nullable columns in this dataset)\n\n    **Pro tip:** In the Reddit Ads dataset, all non-nullable columns serve as primary keys — a pattern. I validated by checking tables like `ad_group`, which has two non-nullable columns (`account_id` and `id`) that are both marked as primary keys. Running this query returned 112 rows of metadata that I exported as a CSV file for model generation. While this manual step works well today, we're investigating a direct GitLab Duo integration with our Data Platform via MCP to automate this process entirely.\n\n    ## 2. Set up GitLab Duo\n\n    There are two ways to interact with [GitLab Duo](https://docs.gitlab.com/user/get_started/getting_started_gitlab_duo/):\n\n    1. **Web UI chat function**\n    2. **Visual Studio Code plugin**\n\n    I chose the VS Code plugin because I can run the dbt models locally to test them.\n\n    ## 3. Enter the 'magic' prompt\n\n    Here's the exact prompt I used to generate all the dbt code:\n\n    ```text\n\n    Create dbt models for all the tables in the file structure.csv.\n\n    I want to have the source models created, with a filter that dedupes the data based on the primary key. Create these in a new folder reddit_ads.\n    I want to have workspace models created and store these in the workspace_marketing schema.\n\n    Take this MR as example: [I've referenced to previous source implementation]. Here is the same done for Source A, but now it needs to be done for Reddit Ads. \n\n    Please check the dbt style guide when creating the code: https://handbook.gitlab.com/handbook/enterprise-data/platform/dbt-guide/\n\n    ```\n\n    Key elements that made this prompt effective:\n\n    - **Clear specifications** for both source and workspace models.\n    - **Reference example** from a previous similar merge request.\n    - **Style guide reference** to ensure code quality and consistency.\n    - **Specific schema targeting** for proper organization.\n\n    ## 4. GitLab Duo's process\n\n    After submitting the prompt, GitLab Duo got to work. The entire generation process took a few minutes, during which GitLab Duo:\n\n    1. **Read and analyzed** the CSV input file.\n    2. **Examined table structures** from the metadata.\n    3. **Referenced our dbt style guide** for coding standards.\n    4. **Took similar merge request into account** to properly structure.\n    5. **Generated source models** for all 13 tables.\n    6. **Created workspace models** for all 13 tables.\n    7. **Generated supporting dbt files**:\n       - `sources.yml` configuration.\n       - `schema.yml` files with tests and documentation.\n       - Updated `dbt_project.yml` with schema references.\n\n    ## The results\n\n    The output was remarkable:\n\n    - **1 modified file:** dbt_project.yml (added reddit_ads schema configuration)\n    - **29 new files:**\n      - **26 dbt models** (13 source + 13 workspace)\n      - **3 YAML files**\n    - **Nearly 900 lines of code** generated automatically\n    - **Built-in data tests,** including unique constraints on primary key columns\n    - **Generic descriptions** for all models and columns\n    - **Proper deduplication logic** in source models\n    - **Clean, consistent code structure** following the GitLab dbt style guide\n\n    ```text\n\n    transform/snowflake-dbt/\n    ├── dbt_project.yml                                                    [MODIFIED]\n    └── models/\n        ├── sources/\n        │   └── reddit_ads/\n        │       ├── reddit_ads_ad_group_source.sql                        [NEW]\n        │       ├── reddit_ads_ad_source.sql                              [NEW]\n        │       ├── reddit_ads_business_account_source.sql                [NEW]\n        │       ├── reddit_ads_campaign_source.sql                        [NEW]\n        │       ├── reddit_ads_custom_audience_history_source.sql         [NEW]\n        │       ├── reddit_ads_geolocation_source.sql                     [NEW]\n        │       ├── reddit_ads_interest_source.sql                        [NEW]\n        │       ├── reddit_ads_targeting_community_source.sql             [NEW]\n        │       ├── reddit_ads_targeting_custom_audience_source.sql       [NEW]\n        │       ├── reddit_ads_targeting_device_source.sql                [NEW]\n        │       ├── reddit_ads_targeting_geolocation_source.sql           [NEW]\n        │       ├── reddit_ads_targeting_interest_source.sql              [NEW]\n        │       ├── reddit_ads_time_zone_source.sql                       [NEW]\n        │       ├── schema.yml                                            [NEW]\n        │       └── sources.yml                                           [NEW]\n        └── workspaces/\n            └── workspace_marketing/\n                └── reddit_ads/\n                    ├── schema.yml                                        [NEW]\n                    ├── wk_reddit_ads_ad.sql                              [NEW]\n                    ├── wk_reddit_ads_ad_group.sql                        [NEW]\n                    ├── wk_reddit_ads_business_account.sql                [NEW]\n                    ├── wk_reddit_ads_campaign.sql                        [NEW]\n                    ├── wk_reddit_ads_custom_audience_history.sql         [NEW]\n                    ├── wk_reddit_ads_geolocation.sql                     [NEW]\n                    ├── wk_reddit_ads_interest.sql                        [NEW]\n                    ├── wk_reddit_ads_targeting_community.sql             [NEW]\n                    ├── wk_reddit_ads_targeting_custom_audience.sql       [NEW]\n                    ├── wk_reddit_ads_targeting_device.sql                [NEW]\n                    ├── wk_reddit_ads_targeting_geolocation.sql           [NEW]\n                    ├── wk_reddit_ads_targeting_interest.sql              [NEW]\n                    └── wk_reddit_ads_time_zone.sql                       [NEW]\n\n    ```\n\n    ### Sample generated code\n\n    Here's an example of the generated code quality. For the `time_zone` table, GitLab Duo created:\n\n    **Prep Layer Source Model**\n\n    ```sql\n\n    WITH source AS (\n      SELECT *\n      FROM {{ source('reddit_ads','time_zone') }}\n      QUALIFY ROW_NUMBER() OVER (PARTITION BY id ORDER BY _fivetran_synced DESC) = 1\n    ),\n\n    renamed AS (\n      SELECT\n        id::VARCHAR                               AS time_zone_id,\n        code::VARCHAR                             AS time_zone_code,\n        dst_offset::NUMBER                        AS time_zone_dst_offset,\n        is_dst_active::BOOLEAN                    AS is_time_zone_dst_active,\n        name::VARCHAR                             AS time_zone_name,\n        offset::NUMBER                            AS time_zone_offset,\n        _fivetran_synced::TIMESTAMP               AS fivetran_synced_at\n      FROM source\n    )\n\n    SELECT * FROM renamed\n\n    ```\n\n    **Schema.yml**\n\n    ```yaml\n\n    models:\n      - name: reddit_ads_time_zone_source\n        description: Time zone data from Reddit Ads system\n        columns:\n          - name: time_zone_id\n            description: Unique identifier for time zone records\n            data_tests:\n              - unique\n              - not_null\n          - name: time_zone_code\n            description: Code for the time zone\n          - name: time_zone_dst_offset\n            description: Daylight saving time offset for the time zone\n          - name: is_time_zone_dst_active\n            description: Flag indicating if daylight saving time is active\n          - name: time_zone_name\n            description: Name of the time zone\n          - name: time_zone_offset\n            description: Offset for the time zone\n          - name: fivetran_synced_at\n            description: Timestamp when the record was last synced by Fivetran\n\n    ```\n\n    **Source.yml**\n\n    ```yaml\n\n    sources:\n      - name: reddit_ads\n        database: RAW\n        schema: reddit_ads\n        loaded_at_field: _fivetran_synced\n        loader: fivetran\n        description: Reddit Ads data\n\n        quoting:\n          database: true\n          schema: false\n          identifier: false\n\n        tables:\n          - name: time_zone\n\n    ```\n\n    **Workspace Model**\n\n    ```sql\n\n    WITH source AS (\n      SELECT *\n      FROM {{ ref('reddit_ads_time_zone_source') }}\n    )\n\n    SELECT * FROM source\n\n    ```\n\n    ## 5. Quality validation\n\n    Now that the code looks good, I pushed it to the MR and executed [CI test pipeline](https://handbook.gitlab.com/handbook/enterprise-data/platform/ci-jobs/#build_changes) to test the code and validate the outcome. I asked GitLab Duo to create a validation query:\n\n    ```text\n\n    Create a test query to test the row counts between the raw layer and the workspace layer. Keep in mind that we do deduplication, so we can compare both using distinct on the primary keys.\n\n    ```\n\n    The AI generated a comprehensive validation query that:\n\n    - Compared row counts between raw and workspace layers.\n    - Accounted for deduplication logic.\n    - Tested all 13 tables.\n    - Calculated data retention percentages.\n\n    \u003Cdetails>\n    \u003Csummary>Generated SQL Test query\u003C/summary>\n\n    ```sql\n\n    -- Reddit Ads Row Count Validation Test\n    -- Compares distinct counts between RAW layer and WORKSPACE_MARKETING layer\n    -- Accounts for deduplication logic in source models\n\n    WITH raw_counts AS (\n      -- Single primary key tables\n      SELECT 'ad' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.AD\n      \n      UNION ALL\n      \n      SELECT 'business_account' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.BUSINESS_ACCOUNT\n      \n      UNION ALL\n      \n      SELECT 'campaign' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.CAMPAIGN\n      \n      UNION ALL\n      \n      SELECT 'custom_audience_history' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.CUSTOM_AUDIENCE_HISTORY\n      \n      UNION ALL\n      \n      SELECT 'geolocation' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.GEOLOCATION\n      \n      UNION ALL\n      \n      SELECT 'interest' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.INTEREST\n      \n      UNION ALL\n      \n      SELECT 'time_zone' AS table_name, COUNT(DISTINCT id) AS raw_count\n      FROM RAW.REDDIT_ADS.TIME_ZONE\n      \n      -- Composite primary key tables\n      UNION ALL\n      \n      SELECT 'ad_group' AS table_name, COUNT(DISTINCT CONCAT(account_id, '|', id)) AS raw_count\n      FROM RAW.REDDIT_ADS.AD_GROUP\n      \n      UNION ALL\n      \n      SELECT 'targeting_community' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', community_id)) AS raw_count\n      FROM RAW.REDDIT_ADS.TARGETING_COMMUNITY\n      \n      UNION ALL\n      \n      SELECT 'targeting_custom_audience' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', custom_audience_id)) AS raw_count\n      FROM RAW.REDDIT_ADS.TARGETING_CUSTOM_AUDIENCE\n      \n      UNION ALL\n      \n      SELECT 'targeting_device' AS table_name, COUNT(DISTINCT _fivetran_id) AS raw_count\n      FROM RAW.REDDIT_ADS.TARGETING_DEVICE\n      \n      UNION ALL\n      \n      SELECT 'targeting_geolocation' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', geolocation_id)) AS raw_count\n      FROM RAW.REDDIT_ADS.TARGETING_GEOLOCATION\n      \n      UNION ALL\n      \n      SELECT 'targeting_interest' AS table_name, COUNT(DISTINCT CONCAT(ad_group_id, '|', interest_id)) AS raw_count\n      FROM RAW.REDDIT_ADS.TARGETING_INTEREST\n    ),\n\n    workspace_counts AS (\n      -- Workspace layer counts using primary keys from schema.yml\n      SELECT 'ad' AS table_name, COUNT(DISTINCT ad_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_AD\n      \n      UNION ALL\n      \n      SELECT 'business_account' AS table_name, COUNT(DISTINCT business_account_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_BUSINESS_ACCOUNT\n      \n      UNION ALL\n      \n      SELECT 'campaign' AS table_name, COUNT(DISTINCT campaign_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_CAMPAIGN\n      \n      UNION ALL\n      \n      SELECT 'custom_audience_history' AS table_name, COUNT(DISTINCT custom_audience_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_CUSTOM_AUDIENCE_HISTORY\n      \n      UNION ALL\n      \n      SELECT 'geolocation' AS table_name, COUNT(DISTINCT geolocation_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_GEOLOCATION\n      \n      UNION ALL\n      \n      SELECT 'interest' AS table_name, COUNT(DISTINCT interest_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_INTEREST\n      \n      UNION ALL\n      \n      SELECT 'time_zone' AS table_name, COUNT(DISTINCT time_zone_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TIME_ZONE\n      \n      -- Composite primary key tables\n      UNION ALL\n      \n      SELECT 'ad_group' AS table_name, COUNT(DISTINCT CONCAT(ad_group_account_id, '|', ad_group_id)) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_AD_GROUP\n      \n      UNION ALL\n      \n      SELECT 'targeting_community' AS table_name, COUNT(DISTINCT CONCAT(targeting_community_ad_group_id, '|', targeting_community_id)) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_COMMUNITY\n      \n      UNION ALL\n      \n      SELECT 'targeting_custom_audience' AS table_name, COUNT(DISTINCT CONCAT(targeting_custom_audience_ad_group_id, '|', targeting_custom_audience_id)) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_CUSTOM_AUDIENCE\n      \n      UNION ALL\n      \n      SELECT 'targeting_device' AS table_name, COUNT(DISTINCT targeting_device_fivetran_id) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_DEVICE\n      \n      UNION ALL\n      \n      SELECT 'targeting_geolocation' AS table_name, COUNT(DISTINCT CONCAT(targeting_geolocation_ad_group_id, '|', targeting_geolocation_id)) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_GEOLOCATION\n      \n      UNION ALL\n      \n      SELECT 'targeting_interest' AS table_name, COUNT(DISTINCT CONCAT(targeting_interest_ad_group_id, '|', targeting_interest_id)) AS workspace_count\n      FROM REDDIT_DBT_MODEL_GENERATION_PROD.WORKSPACE_MARKETING.WK_REDDIT_ADS_TARGETING_INTEREST\n    )\n\n    -- Final comparison with validation results\n    SELECT \n      r.table_name,\n      r.raw_count,\n      w.workspace_count,\n      r.raw_count - w.workspace_count AS count_difference,\n      CASE \n        WHEN r.raw_count = w.workspace_count THEN '✅ PASS'\n        WHEN r.raw_count > w.workspace_count THEN '⚠️ RAW > WORKSPACE (Expected due to deduplication)'\n        ELSE '❌ FAIL - WORKSPACE > RAW (Unexpected)'\n      END AS validation_status,\n      ROUND((w.workspace_count::FLOAT / r.raw_count::FLOAT) * 100, 2) AS data_retention_percentage\n    FROM raw_counts r\n    JOIN workspace_counts w ON r.table_name = w.table_name\n    ORDER BY r.table_name;\n\n    ```\n\n    \u003C/details>\n\n    ![query results table](https://res.cloudinary.com/about-gitlab-com/image/upload/v1758030995/guicjhzwvrz3czwjs3xo.png)\n\n    Running this query showed:\n\n    - **Zero differences** in row counts after deduplication\n    - **100% data retention** across all tables\n    - **All tests passed** successfully\n\n    ## The bottom line: Massive time savings\n\n    - **Traditional approach:** 6-8 hours of manual coding, testing, and debugging\n\n    - **GitLab Duo approach:** 6-8 minutes of generation + review time\n\n    This represents a 60x improvement in developer efficiency (from 6-8 hours to 6-8 minutes), while maintaining high code quality.\n\n    ## Best practices for success\n\n    Based on this experience, here are key recommendations:\n\n    ### Prepare your metadata\n\n    - Extract complete table structures including data types and constraints.\n    - Identify primary keys and relationships upfront.\n    - Export clean, well-formatted CSV input files.\n\n    **Note:** By connecting GitLab Duo via MCP to your (meta)data, you could exclude this manual step.\n\n    ### Provide clear context\n\n    - Reference existing example MRs when possible.\n    - Specify your coding standards and style guides.\n    - Be explicit about folder structure and naming conventions.\n\n    ### Validate thoroughly\n\n    - Always create validation queries for data integrity.\n    - Test locally before merging.\n    - Run your CI/CD pipeline to catch any issues.\n\n    ### Leverage AI for follow-up tasks\n\n    - Generate test queries automatically.\n    - Create documentation templates.\n    - Build validation scripts.\n\n    ## What's next\n\n    This demonstration shows how AI-powered development tools like GitLab Duo are also transforming data engineering workflows. The ability to generate hundreds of lines of production-ready code in minutes —  complete with tests, documentation, and proper structure — represents a fundamental shift in how we approach repetitive development tasks.\n\n    By leveraging AI to handle the repetitive aspects of dbt model creation, data engineers can focus on higher-value activities like data modeling strategy, performance optimization, and business logic implementation.\n\n    **Ready to try this yourself?** Start with a small dataset, prepare your metadata carefully, and watch as GitLab Duo transforms hours of work into minutes of automated generation.\n\n    > [Trial GitLab Duo Agent Platform today.](https://about.gitlab.com/gitlab-duo-agent-platform/)\n\n    ## Read more\n\n    - [GitLab 18.3: Expanding AI orchestration in software engineering](https://about.gitlab.com/blog/gitlab-18-3-expanding-ai-orchestration-in-software-engineering/)\n    - [GitLab Duo Agent Platform Public Beta: Next-gen AI orchestration and more](https://about.gitlab.com/blog/gitlab-duo-agent-platform-public-beta/)\n",{"title":5,"description":17},"en-us/blog/how-gitlab-duo-agent-platform-transforms-dataops",[22,23,24],[22,23,24],"ndGab7f4f-YNnzLVYV7YOU9FhqWVJGLKxy31rnCIrvA",{"data":36},{"logo":37,"freeTrial":42,"sales":47,"login":52,"items":57,"search":366,"minimal":397,"duo":416,"switchNav":425,"pricingDeployment":436},{"config":38},{"href":39,"dataGaName":40,"dataGaLocation":41},"/","gitlab logo","header",{"text":43,"config":44},"Get free trial",{"href":45,"dataGaName":46,"dataGaLocation":41},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":48,"config":49},"Talk to sales",{"href":50,"dataGaName":51,"dataGaLocation":41},"/sales/","sales",{"text":53,"config":54},"Sign in",{"href":55,"dataGaName":56,"dataGaLocation":41},"https://gitlab.com/users/sign_in/","sign in",[58,85,180,185,287,347],{"text":59,"config":60,"cards":62},"Platform",{"dataNavLevelOne":61},"platform",[63,69,77],{"title":59,"description":64,"link":65},"The intelligent orchestration platform for DevSecOps",{"text":66,"config":67},"Explore our Platform",{"href":68,"dataGaName":61,"dataGaLocation":41},"/platform/",{"title":70,"description":71,"link":72},"GitLab Duo Agent Platform","Agentic AI for the entire software lifecycle",{"text":73,"config":74},"Meet GitLab Duo",{"href":75,"dataGaName":76,"dataGaLocation":41},"/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":78,"description":79,"link":80},"Why GitLab","See the top reasons enterprises choose GitLab",{"text":81,"config":82},"Learn more",{"href":83,"dataGaName":84,"dataGaLocation":41},"/why-gitlab/","why gitlab",{"text":86,"left":14,"config":87,"link":89,"lists":93,"footer":162},"Product",{"dataNavLevelOne":88},"solutions",{"text":90,"config":91},"View all Solutions",{"href":92,"dataGaName":88,"dataGaLocation":41},"/solutions/",[94,118,141],{"title":95,"description":96,"link":97,"items":102},"Automation","CI/CD and automation to accelerate deployment",{"config":98},{"icon":99,"href":100,"dataGaName":101,"dataGaLocation":41},"AutomatedCodeAlt","/solutions/delivery-automation/","automated software delivery",[103,107,110,114],{"text":104,"config":105},"CI/CD",{"href":106,"dataGaLocation":41,"dataGaName":104},"/solutions/continuous-integration/",{"text":70,"config":108},{"href":75,"dataGaLocation":41,"dataGaName":109},"gitlab duo agent platform - product menu",{"text":111,"config":112},"Source Code Management",{"href":113,"dataGaLocation":41,"dataGaName":111},"/solutions/source-code-management/",{"text":115,"config":116},"Automated Software Delivery",{"href":100,"dataGaLocation":41,"dataGaName":117},"Automated software delivery",{"title":119,"description":120,"link":121,"items":126},"Security","Deliver code faster without compromising security",{"config":122},{"href":123,"dataGaName":124,"dataGaLocation":41,"icon":125},"/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[127,131,136],{"text":128,"config":129},"Application Security Testing",{"href":123,"dataGaName":130,"dataGaLocation":41},"Application security testing",{"text":132,"config":133},"Software Supply Chain Security",{"href":134,"dataGaLocation":41,"dataGaName":135},"/solutions/supply-chain/","Software supply chain security",{"text":137,"config":138},"Software Compliance",{"href":139,"dataGaName":140,"dataGaLocation":41},"/solutions/software-compliance/","software compliance",{"title":142,"link":143,"items":148},"Measurement",{"config":144},{"icon":145,"href":146,"dataGaName":147,"dataGaLocation":41},"DigitalTransformation","/solutions/visibility-measurement/","visibility and measurement",[149,153,157],{"text":150,"config":151},"Visibility & Measurement",{"href":146,"dataGaLocation":41,"dataGaName":152},"Visibility and Measurement",{"text":154,"config":155},"Value Stream Management",{"href":156,"dataGaLocation":41,"dataGaName":154},"/solutions/value-stream-management/",{"text":158,"config":159},"Analytics & Insights",{"href":160,"dataGaLocation":41,"dataGaName":161},"/solutions/analytics-and-insights/","Analytics and insights",{"title":163,"items":164},"GitLab for",[165,170,175],{"text":166,"config":167},"Enterprise",{"href":168,"dataGaLocation":41,"dataGaName":169},"/enterprise/","enterprise",{"text":171,"config":172},"Small Business",{"href":173,"dataGaLocation":41,"dataGaName":174},"/small-business/","small business",{"text":176,"config":177},"Public Sector",{"href":178,"dataGaLocation":41,"dataGaName":179},"/solutions/public-sector/","public sector",{"text":181,"config":182},"Pricing",{"href":183,"dataGaName":184,"dataGaLocation":41,"dataNavLevelOne":184},"/pricing/","pricing",{"text":186,"config":187,"link":189,"lists":193,"feature":278},"Resources",{"dataNavLevelOne":188},"resources",{"text":190,"config":191},"View all resources",{"href":192,"dataGaName":188,"dataGaLocation":41},"/resources/",[194,227,250],{"title":195,"items":196},"Getting started",[197,202,207,212,217,222],{"text":198,"config":199},"Install",{"href":200,"dataGaName":201,"dataGaLocation":41},"/install/","install",{"text":203,"config":204},"Quick start guides",{"href":205,"dataGaName":206,"dataGaLocation":41},"/get-started/","quick setup checklists",{"text":208,"config":209},"Learn",{"href":210,"dataGaLocation":41,"dataGaName":211},"https://university.gitlab.com/","learn",{"text":213,"config":214},"Product documentation",{"href":215,"dataGaName":216,"dataGaLocation":41},"https://docs.gitlab.com/","product documentation",{"text":218,"config":219},"Best practice videos",{"href":220,"dataGaName":221,"dataGaLocation":41},"/getting-started-videos/","best practice videos",{"text":223,"config":224},"Integrations",{"href":225,"dataGaName":226,"dataGaLocation":41},"/integrations/","integrations",{"title":228,"items":229},"Discover",[230,235,240,245],{"text":231,"config":232},"Customer success stories",{"href":233,"dataGaName":234,"dataGaLocation":41},"/customers/","customer success stories",{"text":236,"config":237},"Blog",{"href":238,"dataGaName":239,"dataGaLocation":41},"/blog/","blog",{"text":241,"config":242},"The Source",{"href":243,"dataGaName":244,"dataGaLocation":41},"/the-source/","the source",{"text":246,"config":247},"Remote",{"href":248,"dataGaName":249,"dataGaLocation":41},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":251,"items":252},"Connect",[253,258,263,268,273],{"text":254,"config":255},"GitLab Services",{"href":256,"dataGaName":257,"dataGaLocation":41},"/services/","services",{"text":259,"config":260},"Community",{"href":261,"dataGaName":262,"dataGaLocation":41},"/community/","community",{"text":264,"config":265},"Forum",{"href":266,"dataGaName":267,"dataGaLocation":41},"https://forum.gitlab.com/","forum",{"text":269,"config":270},"Events",{"href":271,"dataGaName":272,"dataGaLocation":41},"/events/","events",{"text":274,"config":275},"Partners",{"href":276,"dataGaName":277,"dataGaLocation":41},"/partners/","partners",{"textColor":279,"title":280,"text":281,"link":282},"#000","What’s new in GitLab","Stay updated with our latest features and improvements.",{"text":283,"config":284},"Read the latest",{"href":285,"dataGaName":286,"dataGaLocation":41},"/releases/whats-new/","whats new",{"text":288,"config":289,"lists":291},"Company",{"dataNavLevelOne":290},"company",[292],{"items":293},[294,299,305,307,312,317,322,327,332,337,342],{"text":295,"config":296},"About",{"href":297,"dataGaName":298,"dataGaLocation":41},"/company/","about",{"text":300,"config":301,"footerGa":304},"Jobs",{"href":302,"dataGaName":303,"dataGaLocation":41},"/jobs/","jobs",{"dataGaName":303},{"text":269,"config":306},{"href":271,"dataGaName":272,"dataGaLocation":41},{"text":308,"config":309},"Leadership",{"href":310,"dataGaName":311,"dataGaLocation":41},"/company/team/e-group/","leadership",{"text":313,"config":314},"Team",{"href":315,"dataGaName":316,"dataGaLocation":41},"/company/team/","team",{"text":318,"config":319},"Handbook",{"href":320,"dataGaName":321,"dataGaLocation":41},"https://handbook.gitlab.com/","handbook",{"text":323,"config":324},"Investor relations",{"href":325,"dataGaName":326,"dataGaLocation":41},"https://ir.gitlab.com/","investor relations",{"text":328,"config":329},"Trust Center",{"href":330,"dataGaName":331,"dataGaLocation":41},"/security/","trust center",{"text":333,"config":334},"AI Transparency Center",{"href":335,"dataGaName":336,"dataGaLocation":41},"/ai-transparency-center/","ai transparency center",{"text":338,"config":339},"Newsletter",{"href":340,"dataGaName":341,"dataGaLocation":41},"/company/contact/#contact-forms","newsletter",{"text":343,"config":344},"Press",{"href":345,"dataGaName":346,"dataGaLocation":41},"/press/","press",{"text":348,"config":349,"lists":350},"Contact us",{"dataNavLevelOne":290},[351],{"items":352},[353,356,361],{"text":48,"config":354},{"href":50,"dataGaName":355,"dataGaLocation":41},"talk to sales",{"text":357,"config":358},"Support portal",{"href":359,"dataGaName":360,"dataGaLocation":41},"https://support.gitlab.com","support portal",{"text":362,"config":363},"Customer portal",{"href":364,"dataGaName":365,"dataGaLocation":41},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":367,"login":368,"suggestions":375},"Close",{"text":369,"link":370},"To search repositories and projects, login to",{"text":371,"config":372},"gitlab.com",{"href":55,"dataGaName":373,"dataGaLocation":374},"search login","search",{"text":376,"default":377},"Suggestions",[378,380,384,386,390,394],{"text":70,"config":379},{"href":75,"dataGaName":70,"dataGaLocation":374},{"text":381,"config":382},"Code Suggestions (AI)",{"href":383,"dataGaName":381,"dataGaLocation":374},"/solutions/code-suggestions/",{"text":104,"config":385},{"href":106,"dataGaName":104,"dataGaLocation":374},{"text":387,"config":388},"GitLab on AWS",{"href":389,"dataGaName":387,"dataGaLocation":374},"/partners/technology-partners/aws/",{"text":391,"config":392},"GitLab on Google Cloud",{"href":393,"dataGaName":391,"dataGaLocation":374},"/partners/technology-partners/google-cloud-platform/",{"text":395,"config":396},"Why GitLab?",{"href":83,"dataGaName":395,"dataGaLocation":374},{"freeTrial":398,"mobileIcon":403,"desktopIcon":408,"secondaryButton":411},{"text":399,"config":400},"Start free trial",{"href":401,"dataGaName":46,"dataGaLocation":402},"https://gitlab.com/-/trials/new/","nav",{"altText":404,"config":405},"Gitlab Icon",{"src":406,"dataGaName":407,"dataGaLocation":402},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":404,"config":409},{"src":410,"dataGaName":407,"dataGaLocation":402},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":412,"config":413},"Get Started",{"href":414,"dataGaName":415,"dataGaLocation":402},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/get-started/","get started",{"freeTrial":417,"mobileIcon":421,"desktopIcon":423},{"text":418,"config":419},"Learn more about GitLab Duo",{"href":75,"dataGaName":420,"dataGaLocation":402},"gitlab duo",{"altText":404,"config":422},{"src":406,"dataGaName":407,"dataGaLocation":402},{"altText":404,"config":424},{"src":410,"dataGaName":407,"dataGaLocation":402},{"button":426,"mobileIcon":431,"desktopIcon":433},{"text":427,"config":428},"/switch",{"href":429,"dataGaName":430,"dataGaLocation":402},"#contact","switch",{"altText":404,"config":432},{"src":406,"dataGaName":407,"dataGaLocation":402},{"altText":404,"config":434},{"src":435,"dataGaName":407,"dataGaLocation":402},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1773335277/ohhpiuoxoldryzrnhfrh.png",{"freeTrial":437,"mobileIcon":442,"desktopIcon":444},{"text":438,"config":439},"Back to pricing",{"href":183,"dataGaName":440,"dataGaLocation":402,"icon":441},"back to pricing","GoBack",{"altText":404,"config":443},{"src":406,"dataGaName":407,"dataGaLocation":402},{"altText":404,"config":445},{"src":410,"dataGaName":407,"dataGaLocation":402},{"title":447,"button":448,"config":453},"See how agentic AI transforms software delivery",{"text":449,"config":450},"Watch GitLab Transcend now",{"href":451,"dataGaName":452,"dataGaLocation":41},"/events/transcend/virtual/","transcend event",{"layout":454,"icon":455,"disabled":14},"release","AiStar",{"data":457},{"text":458,"source":459,"edit":465,"contribute":470,"config":475,"items":480,"minimal":687},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"text":460,"config":461},"View page source",{"href":462,"dataGaName":463,"dataGaLocation":464},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":466,"config":467},"Edit this page",{"href":468,"dataGaName":469,"dataGaLocation":464},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":471,"config":472},"Please contribute",{"href":473,"dataGaName":474,"dataGaLocation":464},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":476,"facebook":477,"youtube":478,"linkedin":479},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[481,528,582,626,653],{"title":181,"links":482,"subMenu":497},[483,487,492],{"text":484,"config":485},"View plans",{"href":183,"dataGaName":486,"dataGaLocation":464},"view plans",{"text":488,"config":489},"Why Premium?",{"href":490,"dataGaName":491,"dataGaLocation":464},"/pricing/premium/","why premium",{"text":493,"config":494},"Why Ultimate?",{"href":495,"dataGaName":496,"dataGaLocation":464},"/pricing/ultimate/","why ultimate",[498],{"title":499,"links":500},"Contact Us",[501,504,506,508,513,518,523],{"text":502,"config":503},"Contact sales",{"href":50,"dataGaName":51,"dataGaLocation":464},{"text":357,"config":505},{"href":359,"dataGaName":360,"dataGaLocation":464},{"text":362,"config":507},{"href":364,"dataGaName":365,"dataGaLocation":464},{"text":509,"config":510},"Status",{"href":511,"dataGaName":512,"dataGaLocation":464},"https://status.gitlab.com/","status",{"text":514,"config":515},"Terms of use",{"href":516,"dataGaName":517,"dataGaLocation":464},"/terms/","terms of use",{"text":519,"config":520},"Privacy statement",{"href":521,"dataGaName":522,"dataGaLocation":464},"/privacy/","privacy statement",{"text":524,"config":525},"Cookie preferences",{"dataGaName":526,"dataGaLocation":464,"id":527,"isOneTrustButton":14},"cookie preferences","ot-sdk-btn",{"title":86,"links":529,"subMenu":538},[530,534],{"text":531,"config":532},"DevSecOps platform",{"href":68,"dataGaName":533,"dataGaLocation":464},"devsecops platform",{"text":535,"config":536},"AI-Assisted Development",{"href":75,"dataGaName":537,"dataGaLocation":464},"ai-assisted development",[539],{"title":540,"links":541},"Topics",[542,547,552,557,562,567,572,577],{"text":543,"config":544},"CICD",{"href":545,"dataGaName":546,"dataGaLocation":464},"/topics/ci-cd/","cicd",{"text":548,"config":549},"GitOps",{"href":550,"dataGaName":551,"dataGaLocation":464},"/topics/gitops/","gitops",{"text":553,"config":554},"DevOps",{"href":555,"dataGaName":556,"dataGaLocation":464},"/topics/devops/","devops",{"text":558,"config":559},"Version Control",{"href":560,"dataGaName":561,"dataGaLocation":464},"/topics/version-control/","version control",{"text":563,"config":564},"DevSecOps",{"href":565,"dataGaName":566,"dataGaLocation":464},"/topics/devsecops/","devsecops",{"text":568,"config":569},"Cloud Native",{"href":570,"dataGaName":571,"dataGaLocation":464},"/topics/cloud-native/","cloud native",{"text":573,"config":574},"AI for Coding",{"href":575,"dataGaName":576,"dataGaLocation":464},"/topics/devops/ai-for-coding/","ai for coding",{"text":578,"config":579},"Agentic AI",{"href":580,"dataGaName":581,"dataGaLocation":464},"/topics/agentic-ai/","agentic ai",{"title":583,"links":584},"Solutions",[585,587,589,594,598,601,605,608,610,613,616,621],{"text":128,"config":586},{"href":123,"dataGaName":128,"dataGaLocation":464},{"text":117,"config":588},{"href":100,"dataGaName":101,"dataGaLocation":464},{"text":590,"config":591},"Agile development",{"href":592,"dataGaName":593,"dataGaLocation":464},"/solutions/agile-delivery/","agile delivery",{"text":595,"config":596},"SCM",{"href":113,"dataGaName":597,"dataGaLocation":464},"source code management",{"text":543,"config":599},{"href":106,"dataGaName":600,"dataGaLocation":464},"continuous integration & delivery",{"text":602,"config":603},"Value stream management",{"href":156,"dataGaName":604,"dataGaLocation":464},"value stream management",{"text":548,"config":606},{"href":607,"dataGaName":551,"dataGaLocation":464},"/solutions/gitops/",{"text":166,"config":609},{"href":168,"dataGaName":169,"dataGaLocation":464},{"text":611,"config":612},"Small business",{"href":173,"dataGaName":174,"dataGaLocation":464},{"text":614,"config":615},"Public sector",{"href":178,"dataGaName":179,"dataGaLocation":464},{"text":617,"config":618},"Education",{"href":619,"dataGaName":620,"dataGaLocation":464},"/solutions/education/","education",{"text":622,"config":623},"Financial services",{"href":624,"dataGaName":625,"dataGaLocation":464},"/solutions/finance/","financial services",{"title":186,"links":627},[628,630,632,634,637,639,641,643,645,647,649,651],{"text":198,"config":629},{"href":200,"dataGaName":201,"dataGaLocation":464},{"text":203,"config":631},{"href":205,"dataGaName":206,"dataGaLocation":464},{"text":208,"config":633},{"href":210,"dataGaName":211,"dataGaLocation":464},{"text":213,"config":635},{"href":215,"dataGaName":636,"dataGaLocation":464},"docs",{"text":236,"config":638},{"href":238,"dataGaName":239,"dataGaLocation":464},{"text":231,"config":640},{"href":233,"dataGaName":234,"dataGaLocation":464},{"text":246,"config":642},{"href":248,"dataGaName":249,"dataGaLocation":464},{"text":254,"config":644},{"href":256,"dataGaName":257,"dataGaLocation":464},{"text":259,"config":646},{"href":261,"dataGaName":262,"dataGaLocation":464},{"text":264,"config":648},{"href":266,"dataGaName":267,"dataGaLocation":464},{"text":269,"config":650},{"href":271,"dataGaName":272,"dataGaLocation":464},{"text":274,"config":652},{"href":276,"dataGaName":277,"dataGaLocation":464},{"title":288,"links":654},[655,657,659,661,663,665,667,671,676,678,680,682],{"text":295,"config":656},{"href":297,"dataGaName":290,"dataGaLocation":464},{"text":300,"config":658},{"href":302,"dataGaName":303,"dataGaLocation":464},{"text":308,"config":660},{"href":310,"dataGaName":311,"dataGaLocation":464},{"text":313,"config":662},{"href":315,"dataGaName":316,"dataGaLocation":464},{"text":318,"config":664},{"href":320,"dataGaName":321,"dataGaLocation":464},{"text":323,"config":666},{"href":325,"dataGaName":326,"dataGaLocation":464},{"text":668,"config":669},"Sustainability",{"href":670,"dataGaName":668,"dataGaLocation":464},"/sustainability/",{"text":672,"config":673},"Diversity, inclusion and belonging (DIB)",{"href":674,"dataGaName":675,"dataGaLocation":464},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":328,"config":677},{"href":330,"dataGaName":331,"dataGaLocation":464},{"text":338,"config":679},{"href":340,"dataGaName":341,"dataGaLocation":464},{"text":343,"config":681},{"href":345,"dataGaName":346,"dataGaLocation":464},{"text":683,"config":684},"Modern Slavery Transparency Statement",{"href":685,"dataGaName":686,"dataGaLocation":464},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":688},[689,692,695],{"text":690,"config":691},"Terms",{"href":516,"dataGaName":517,"dataGaLocation":464},{"text":693,"config":694},"Cookies",{"dataGaName":526,"dataGaLocation":464,"id":527,"isOneTrustButton":14},{"text":696,"config":697},"Privacy",{"href":521,"dataGaName":522,"dataGaLocation":464},[699],{"id":700,"title":701,"body":26,"config":702,"content":705,"description":26,"extension":25,"meta":708,"navigation":14,"path":709,"seo":710,"stem":711,"__hash__":712},"blogAuthors/en-us/blog/authors/dennis-van-rooijen.yml","Dennis Van Rooijen",{"template":703,"gitlabHandle":704},"BlogAuthor","dvanrooijen2",{"name":9,"config":706},{"headshot":707},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758031391/muvwg1sxetzekmuhqdql.png",{},"/en-us/blog/authors/dennis-van-rooijen",{},"en-us/blog/authors/dennis-van-rooijen","-VrBQM0MkpSMVi6cd_BwGMYKVgzryOCw3IxXukVkNGg",[714,727,739],{"content":715,"config":725},{"title":716,"description":717,"authors":718,"heroImage":720,"date":721,"body":722,"category":11,"tags":723},"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.",[719],"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/).",[724,22,277],"AI/ML",{"featured":14,"template":15,"slug":726},"gitlab-and-anthropic-governed-ai-for-enterprise-development",{"content":728,"config":737},{"title":729,"description":730,"authors":731,"heroImage":733,"date":734,"body":735,"category":11,"tags":736},"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.",[732],"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",[724,22,23],{"featured":14,"template":15,"slug":738},"give-your-ai-agent-direct-structured-gitlab-access-with-glab-cli",{"content":740,"config":748},{"title":741,"description":742,"authors":743,"heroImage":733,"date":745,"body":746,"category":11,"tags":747},"GitHub Copilot's new policy for AI training is a governance wake-up call","Learn what GitHub's Copilot policy change means for regulated industries, and why GitLab's commitment to customer data privacy matters.",[744],"Allie Holland","2026-04-20","GitHub recently [announced](https://github.blog/news-insights/company-news/updates-to-github-copilot-interaction-data-usage-policy/) a significant change to how it handles data from Copilot users. Starting April 24, 2026, interaction data from Copilot Free, Pro, and Pro+ users, including inputs, outputs, code snippets, and associated context, will be used to train AI models by default, unless users actively opt out. Copilot Business and Enterprise customers are exempt under existing contract terms.\n\nFor organizations in regulated industries, including finance, healthcare, defense, and public sector, the policy shift raises questions that go beyond individual developer preferences. It forces a harder look at a question that engineering and security leaders should be asking every AI vendor in their stack: Do you train on our code? \n\nGitLab's answer is no. GitLab does not train AI models on customer code at any tier, and AI vendors are contractually prohibited from using customer inputs or outputs for their own purposes. The [GitLab AI Transparency Center](https://about.gitlab.com/ai-transparency-center/) makes that commitment auditable: a single location documenting which models power which features, how data is handled, subprocessor relationships, and data retention periods. The GitLab AI Transparency Center also lists the compliance status of each feature, including confirmation that GitLab's current AI features do not qualify as high-risk systems under the EU AI Act. It's a standard GitLab CEO Bill Staples has consistently [reiterated](https://www.linkedin.com/posts/williamstaples_gitlab-1810-agentic-ai-now-open-to-even-activity-7443280763715985408-aHxf?utm_source=share&utm_medium=member_desktop&rcm=ACoAABsu7EUBcb_a1-JHKS9RC0B5rf8Ye-5XM60) and one reflected in GitLab's mission and [Trust Center](https://trust.gitlab.com/).\n\n## What the policy change actually means\n\nGitHub's announcement also specifies that the data may be shared with GitHub affiliates, including Microsoft, for AI development purposes.\n\nA policy change of this nature forces organizations to re-examine their AI governance posture, audit their Copilot license tiers, and confirm that the right controls are configured across their teams.\n\n## Why AI governance matters in regulated environments\n\nSource code is often among an organization's most sensitive intellectual property. It may contain references to internal systems, reflect proprietary business logic, or touch data flows governed by strict retention and access policies. When that code passes through an AI assistant, questions about training data usage, model vendor relationships, and data residency become compliance concerns.\n\nThe exposure is particularly acute for financial services firms that have invested in proprietary algorithms, fraud detection logic, credit risk models, underwriting rules, trading strategies. When AI tooling processes that code and uses it to train models serving competitors, vendor data practices become an IP concern.\n\nFinancial institutions operating under [the Federal Reserve's Supervisory Guidance on Model Risk Management (SR 11-7) and the](https://www.federalreserve.gov/supervisionreg/srletters/sr1107.htm) [Digital Operational Resilience Act (DORA)](https://eur-lex.europa.eu/eli/reg/2022/2554/oj/eng) are required to maintain documented, auditable oversight of third-party technology providers, including understanding how those providers handle data. Third-party AI tools used in development workflows increasingly fall within the scope of model risk oversight, and material changes to vendor data practices require updated documentation. \n\nIn the public sector, [the National Institute of Standards and Technology Special Publication 800-53 (NIST 800-53)](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final) and the [Federal Information Security Modernization Act (FISMA)](https://www.cisa.gov/topics/cyber-threats-and-advisories/federal-information-security-modernization-act) establish that sensitive or classified code must never leave a controlled boundary. For U.S. Department of Defense and intelligence community environments in particular, a vendor's default data posture is an operational concern. In healthcare, [the Health Insurance Portability and Accountability Act (HIPAA)](https://www.hhs.gov/hipaa/index.html) governs how patient-adjacent data is handled by third parties, and development environments that touch clinical systems increasingly fall within that scope.\n\nAcross all of these contexts, the common thread is the same: A vendor policy that changes data usage defaults, requires individual opt-out, and offers different protections depending on account tier introduces exactly the kind of uncontrolled variable that compliance teams cannot afford.\n\n## What regulated industries actually need from AI vendors\n\nRegulated organizations have largely moved past debating whether to adopt AI in development workflows. The focus now is on doing so in a way they can defend to regulators, boards, and customers. That shift has surfaced a consistent set of requirements regardless of sector.\n\n**Contractual certainty.** Regulated firms need to know, with specificity, what happens to their data. A clear, documented, unconditional commitment is what's required, not something that varies by plan or requires action before a deadline.\n\n**Auditability.** Model risk management frameworks require organizations to understand and validate the AI systems they deploy, including the training data behind those models and the third parties involved in their development. Vendors who cannot answer these questions create documentation risk for the organizations relying on them.\n\n**Separation from vendor incentives.** When an AI vendor trains models on customer usage data, code and workflows become inputs to a system that also serves competitors. For institutions with proprietary trading logic, underwriting models, or fraud detection systems, that's a genuine IP exposure.\n\n## GitLab's position on AI data governance\n\nGitLab does not use customer code to train AI models. This commitment applies at every tier, and AI vendors are contractually prohibited from using inputs or outputs associated with GitLab customers for their own purposes.\n\nThis is a deliberate architectural and policy choice, not a feature of a particular pricing tier. As GitLab's [post on enterprise independence](https://about.gitlab.com/blog/why-enterprise-independence-matters-more-than-ever-in-devsecops/) notes, data governance has become \"an increasingly critical factor in enterprise technology decisions, driven by a complex web of national and regional data protection laws and growing concern about control over sensitive intellectual property.\"\n\nGitLab is also cloud-neutral and model-neutral while supporting self-hosted deployments, not commercially tied to any single cloud provider or large language model (LLM). That i[ndependence matters](https://about.gitlab.com/blog/why-enterprise-independence-matters-more-than-ever-in-devsecops/) for regulated organizations evaluating vendor concentration risk. The [AI Continuity Plan](https://handbook.gitlab.com/handbook/product/ai/continuity-plan/) documents how vendor changes are managed, including material changes to how AI vendors treat customer data, a direct response to the governance requirements under frameworks like [DORA](https://handbook.gitlab.com/handbook/legal/dora/). \n\n## The governance gap AI teams need to close\n\nGitHub's policy update is a reminder that for organizations in regulated industries, understanding exactly how an AI tool handles data is a prerequisite for using it at all. That means asking vendors for clear, documented answers: Is our data used for model training? Who are your AI model subprocessors? What happens if a vendor changes its data practices? Can we deploy in a way that keeps all AI processing within our own infrastructure? What indemnification do you offer for AI-generated output?\n\nVendors who can answer those questions clearly, and document those answers in an auditable form, are vendors you can build on. **Those who cannot will create compliance debt every time they ship a policy update.** And when a vendor can change its data practices with 30 days notice, that's not a partnership built for regulated industries. That's a liability.\n\n> Learn more about GitLab's approach to AI governance at the [GitLab AI Transparency Center](https://about.gitlab.com/ai-transparency-center/).",[724,22],{"featured":749,"template":15,"slug":750},false,"github-copilots-new-policy-for-ai-training-is-a-governance-wake-up-call",{"promotions":752},[753,766,777,789],{"id":754,"categories":755,"header":756,"text":757,"button":758,"image":763},"ai-modernization",[11],"Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":759,"config":760},"Get your AI maturity score",{"href":761,"dataGaName":762,"dataGaLocation":239},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":764},{"src":765},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":767,"categories":768,"header":769,"text":757,"button":770,"image":774},"devops-modernization",[22,566],"Are you just managing tools or shipping innovation?",{"text":771,"config":772},"Get your DevOps maturity score",{"href":773,"dataGaName":762,"dataGaLocation":239},"/assessments/devops-modernization-assessment/",{"config":775},{"src":776},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":778,"categories":779,"header":781,"text":757,"button":782,"image":786},"security-modernization",[780],"security","Are you trading speed for security?",{"text":783,"config":784},"Get your security maturity score",{"href":785,"dataGaName":762,"dataGaLocation":239},"/assessments/security-modernization-assessment/",{"config":787},{"src":788},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"id":790,"paths":791,"header":794,"text":795,"button":796,"image":801},"github-azure-migration",[792,793],"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":797,"config":798},"See how GitLab compares to GitHub",{"href":799,"dataGaName":800,"dataGaLocation":239},"/compare/gitlab-vs-github/github-azure-migration/","github azure migration",{"config":802},{"src":776},{"header":804,"blurb":805,"button":806,"secondaryButton":811},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":807,"config":808},"Get your free trial",{"href":809,"dataGaName":46,"dataGaLocation":810},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":502,"config":812},{"href":50,"dataGaName":51,"dataGaLocation":810},1777493602175]