GitLab Duo Workflow

  • Tier: Ultimate
  • Offering: GitLab.com
  • Status: Private beta
  • LLM: Anthropic Claude 3.5 Sonnet
History

The availability of this feature is controlled by a feature flag. For more information, see the history. This feature is available for internal GitLab team members for testing, but not ready for production use.

This feature is a private beta and is not intended for customer usage outside of initial design partners. We expect major changes to this feature.

This page contains information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. The development, release, and timing of any products, features, or functionality may be subject to change or delay and remain at the sole discretion of GitLab Inc.

GitLab Duo Workflow helps you complete development tasks directly in the VS Code integrated development environment (IDE).

Workflow:

  • Runs in your IDE so that you do not have to switch contexts or tools.
  • Creates and works through a plan, in response to your prompt.
  • Stages proposed changes in your project’s repository. You control when to accept, modify, or reject the suggestions.
  • Understands the context of your project structure, codebase, and history. You can also add your own context, such as relevant GitLab issues or merge requests.

For a click-through demo, see GitLab Duo Workflow.

Prerequisites

Before you can use Workflow, you must:

Though not recommended, you can set up Workflow in a Docker container. You do not need to use Docker to run Workflow.

Connect to your repository

To use Workflow in VS Code, ensure your repository is properly connected.

  1. In VS Code, on the top menu, select Terminal > New Terminal.

  2. Clone your repository: git clone <repository>.

  3. Change to the directory where your repository was cloned and check out your branch: git checkout <branch_name>.

  4. Ensure your project is selected:

    1. On the left sidebar, select GitLab Workflow ( tanuki ).
    2. Select the project name. If you have multiple projects, select the one you want to work with.
  5. In the terminal, ensure your repository is configured with a remote: git remote -v. The results should look similar to:

    Copy to clipboard
    origin  git@gitlab.com:gitlab-org/gitlab.git (fetch)
    origin  git@gitlab.com:gitlab-org/gitlab.git (push)

    If no remote is defined, or you have multiple remotes:

    1. On the left sidebar, select Source Control ( branch ).
    2. On the Source Control label, right-click and select Repositories.
    3. Next to your repository, select the ellipsis ( ellipsis_h ), then Remote > Add Remote.
    4. Select Add remote from GitLab.
    5. Choose a remote.

Now you can use Workflow to help solve your coding tasks.

Use Workflow in VS Code

To use Workflow in VS Code:

  1. Open the command palette:
    • On macOS: Cmd + Shift + P
    • On Windows and Linux: Ctrl + P.
  2. Type GitLab Duo Workflow and select GitLab: Show Duo Workflow.
  3. In the text box, specify a code task in detail.
  4. Select Start.

After you describe your task, Workflow generates and executes on a plan to address it. While it executes, you can pause or ask it to adjust the plan.

For more information about how to interact with Workflow, see best practices.

The context Workflow is aware of

When you ask Workflow for help with a task, it is aware of some files by default. You can also provide it with additional context.

AreaHow to use GitLab Workflow
EpicsEnter the epic ID and the name of the group the epic is in. The group must include a project that meets the project prerequisites.
IssuesEnter the issue ID if it’s in the current project. You can also enter a project ID from a different project, as long as it meets the project prerequisites.
Local filesWorkflow is aware of all files available to Git in the project branch. You can also reference a specific file by its file path.
Merge requestsEnter the merge request ID if it’s in the current project. You can also enter a project ID from a different project, as long as it meets the project prerequisites.
Merge request pipelinesEnter the merge request ID that has the pipeline, if it’s in the current project. You can also enter a project ID from a different project, as long as it meets the project prerequisites.

Workflow also has access to the GitLab Search API to find related issues or merge requests.

Supported languages

Workflow officially supports the following languages:

  • CSS
  • Go
  • HTML
  • Java
  • JavaScript
  • Markdown
  • Python
  • Ruby
  • TypeScript

APIs that Workflow has access to

To create solutions and understand the context of the problem, Workflow accesses several GitLab APIs.

Specifically, an OAuth token with the ai_workflows scope has access to the following APIs:

Audit log

An audit event is created for each API request done by Workflow. On your GitLab Self-Managed instance, you can view these events on the instance audit events page.

Give feedback

Workflow is a private beta and your feedback is crucial to improve it for you and others. To report issues or suggest improvements, complete this survey.