GitLab Duo Workflow
- Tier: Ultimate
- Offering: GitLab.com
- Status: Private beta
- LLM: Anthropic Claude 3.5 Sonnet
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.
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:
- Install Visual Studio Code (VS Code).
- Set up the GitLab Workflow extension for VS Code. Minimum version 5.16.0.
- Have an account on GitLab.com.
- Have a project that meets the following requirements:
- The project is on GitLab.com.
- You have at least the Developer role.
- The project belongs to a group namespace with an Ultimate subscription.
- Beta and experimental features must be turned on.
- GitLab Duo must be turned on.
- The repository you want to work with should be small or medium-sized. Workflow can be slow or fail for large repositories.
- Successfully connect to your repository.
- Ensure an HTTP/2 connection to the Workflow service is possible.
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.
In VS Code, on the top menu, select Terminal > New Terminal.
Clone your repository:
git clone <repository>
.Change to the directory where your repository was cloned and check out your branch:
git checkout <branch_name>
.Ensure your project is selected:
- On the left sidebar, select GitLab Workflow ( ).
- Select the project name. If you have multiple projects, select the one you want to work with.
In the terminal, ensure your repository is configured with a remote:
git remote -v
. The results should look similar to: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:
- On the left sidebar, select Source Control ( ).
- On the Source Control label, right-click and select Repositories.
- Next to your repository, select the ellipsis ( ), then Remote > Add Remote.
- Select Add remote from GitLab.
- 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:
- Open the command palette:
- On macOS: Cmd + Shift + P
- On Windows and Linux: Ctrl + P.
- Type
GitLab Duo Workflow
and select GitLab: Show Duo Workflow. - In the text box, specify a code task in detail.
- For assistance writing your prompt, see use case examples and best practices.
- Workflow is aware of all files available to Git in the project branch.
- You can also give Workflow additional context.
- Workflow cannot access external sources or the web.
- 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.
Area | How to use GitLab Workflow |
---|---|
Epics | Enter the epic ID and the name of the group the epic is in. The group must include a project that meets the project prerequisites. |
Issues | Enter 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 files | Workflow is aware of all files available to Git in the project branch. You can also reference a specific file by its file path. |
Merge requests | Enter 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 pipelines | Enter 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:
- Projects API
- Search API
- CI Pipelines API
- CI Jobs API
- Merge Requests API
- Epics API
- Issues API
- Notes API
- Usage Data API
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.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support