GitLab Duo Principles - Hands-On Lab: GitLab Duo Agent Platform

This Hands-On Guide walks you through using GitLab Duo Agent Platform to process complex topics.

Objectives

By the end of this lab, you will learn how to:

  • Configure and operate GitLab Duo Agent Platform
  • Automate issue and merge request creation using AI agents
  • Implement AI-assisted project planning and analysis

Estimated time to complete: 15 minutes

Task A: Create issues and Merge Requests via Duo Agentic Chat

  1. Select the New project button.

  2. Select the Create from template tile.

  3. Select the Instance tab.

  4. Select Use template next to the GitLab Swag Shop template.

  5. In the Project name field, enter DAP Demo.

  6. Leave everything else as default and select Create project

    Throughout this workshop, you will get AI-generated support from GitLab Duo Chat.

  7. In the upper-right corner, select the GitLab Duo Chat icon and choose Add new Chat.

  8. Select GitLab Duo. If you are already using the GitLab Duo agent, click Current GitLab Duo Chat.

    NOTE: If you didn’t get the option of choosing the agent, it is probably because you are not using Agentic chat. If this is the case, simply click on the Agentic slider just above the input field to activate Agentic chat. Then repeat the step above.

  9. Type /reset to clear the context.

  10. Copy and paste the following prompt into chat:

    Read the file `RunBooks/issues_and_mrs_lvl-101.json` and create GitLab issues and merge requests.
    
    **RULES:**
    - Process items sequentially - finish one completely before starting the next
    - Once an issue is created, move on (do NOT recreate)
    - Skip labels entirely (not supported)
    
    **For each item in "issues" array:**
    
    1. **Create Issue** - use "title" and "description" fields
    2. **Create Branch** - use exact "source_branch" name, base from main
    3. **Create MR** - use "mr_title", "mr_description" + "Closes #<issue_iid>", target main
    4. **Add Note** - only if "add_note" is true, use "note_content"
    
    **Expected Result:**
    - 3 issues
    - 3 branches
    - 3 MRs (each linked to its issue)
    - 1 note on the third MR
    
    **After completion, report:**
    - Each issue IID and URL
    - Each MR IID, URL, and linked issue
    - Any errors encountered
    

    These features are early access and prone to mistake. If you encounter an error /reset, or clicking New GitLab Duo Chat again can help.

  11. If you are asked to Approve an action Duo Chat wants to execute, please do so.

    Duo Chat will create issues, merge Request on existing branches for us, so that we have a project setup we can work with. It will be around 9 approvals you need to give. You are the HITL (Human in the Loop). Then you will see as a closing statement a Completion Report

  12. Once the Flow completes, view your issues and merge requests to see the tasks have been completed.

Let’s explore how GitLab Duo Chat can act as an intelligent agent to help with various development tasks:

Task B. Ask Duo Chat to analyze your current project

  1. Using the right hand navigation options click the Add New Chat button, and select GitLab Duo as the agent we want to converse with.

  2. In the new chat window ask the following prompt:

    Analyze this project's structure and suggest improvements for maintainability and scalability
    
  3. Follow up after you read the output with this prompt:

    Create an issue in this project based on your recommendations.
    
  4. Approve the Tool usage and read the issue Duo has created.

  5. Edit the Assignees section, and assign the issue to yourself.

  6. Again click Add new chat button, and select GitLab Duo Chat.

  7. Prompt in the chatbox with the following (make sure Agentic mode is switched on):

    Give me the Quick Wins for this project.
    
  8. We see how AI understands the entire project context and prioritizes our work. Let us follow those recommendations of the agent, and continue working with our agent by typing in this prompt:

    Give me the link to the item in Priority 1.
    

Task C. Review the state of your project issues

  1. Open Plan > Issues using the menu on the left. You get a list with existing issues.

  2. In the upper-right corner, click the Add New Chat icon and select the Planner Agent. During this workshop we will be taking advantage of our new Agentic AI features, so make sure Agentic mode is still selected.

  3. Prompt them with:

    Which issues are missing estimates, due dates or assignees?
    

    Observe the results, which help you and your team to get a better grip on your project state.

Task D. Explore Duo Chat for Development Tasks

Let’s explore how Duo Chat can assist with various development planning and analysis tasks.

  1. Click the Add new chat icon in the upper-right corner and select the GitLab Duo Agent. Make sure Agentic mode is still selected.

  2. Try asking Duo about testing strategies for your project:

    Recommend a comprehensive testing strategy for this application, including unit, integration, and end-to-end tests
    
  3. Get performance insights:

    Analyze this Python application for potential performance bottlenecks and suggest optimizations. Output suggestions in chat.
    
  4. Ask about deployment approaches:

    What would be the best deployment strategy for this Python application? Include considerations for scaling and monitoring.
    
  5. Explore modernization recommendations:

    How can I modernize this Python application to use current best practices and frameworks?
    

Optional: Further Practice

Feel free to try out more of what Duo can do for you. For example, create a detailed issue with an implementation plan:

Create an issue with implementation plan for adding a product carousel to the swag shop.

Requirements:
- Horizontal carousel for product articles with prev/next navigation and touch support
- Show product image, title, price, and CTA button per item
- Responsive, accessible (ARIA, keyboard nav)
- Use existing tech stack, minimal dependencies

Issue should include:
- User story
- Acceptance criteria
- Technical implementation plan broken into subtasks
- Estimated effort per task
- Testing requirements

Lab Guide Complete

You have completed this lab exercise. You can view the other lab guides for this course.

Suggestions?

If you wish to make a change to the lab, please submit your changes via Merge Request.

Last modified January 30, 2026: Lab 6 Creation Via DAP Demo (4fb240ee)