Skip to content

GitLab Duo Chat (Agentic)

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core, Pro, or Enterprise
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
  • Status: Beta
  • LLM: Anthropic Claude Sonnet 4
  • Available on GitLab Duo with self-hosted models: Not supported

Version history

The availability of this feature is controlled by feature flags. For more information, see the history.

GitLab Duo Chat (Agentic) is an enhanced version of GitLab Duo Chat (Classic). This new Chat can autonomously perform actions on your behalf, to help you answer complex questions more comprehensively.

While the classic Chat answers questions based on a single context, the agentic Chat searches, retrieves, and combines information from multiple sources across your GitLab projects to provide more thorough and relevant answers. The agentic Chat can also create and edit files for you.

"Agentic" means that Chat:

  • Autonomously uses a large language model to determine what information is needed.
  • Executes a sequence of operations to gather that information.
  • Formulates a response to your questions.
  • Can create and change local files.

For larger problems, like understanding a codebase or generating an implementation plan, use the software development flow of the GitLab Duo Agent Platform.

For an overview, see GitLab Duo Chat (Agentic).

Use GitLab Duo Chat

You can use GitLab Duo Chat in:

  • If you have GitLab Duo Pro or Enterprise, the GitLab UI.
  • VS Code.
  • A JetBrains IDE.
  • Visual Studio for Windows.

Prerequisites:

  • A GitLab Duo Core, Pro, or Enterprise add-on.
  • A Premium or Ultimate subscription.
  • You have an assigned seat for or access to GitLab Duo Chat.
  • You have turned on beta and experimental features for your GitLab instance or group.

Use GitLab Duo Chat in the GitLab UI

  • Add-on: GitLab Duo Pro or Enterprise

To use Agentic Chat in the GitLab UI:

  1. Go to a project in a group that meets the prerequisites.
  2. In the upper-right corner, select GitLab Duo Chat. A drawer opens on the right side of your screen.
  3. Under the chat text box, turn on the Agentic mode (Beta) toggle.
  4. Enter your question in the chat text box and press Enter or select Send. It may take a few seconds for the interactive AI chat to produce an answer.
  5. Optional. Ask a follow-up question.

Use GitLab Duo Chat in VS Code

Prerequisites:

You can only use GitLab Duo Chat in a project:

  • Hosted on a GitLab instance.
  • That is part of a group that meets the prerequisites.

To use GitLab Duo Chat:

  1. In VS Code, go to Settings > Settings.
  2. Search for agent platform.
  3. Under Gitlab › Duo Agent Platform: Enabled, select the Enable GitLab Duo Agent Platform checkbox.
  4. On the left sidebar, select GitLab Duo Agent Platform (Beta) ({duo-agentic-chat}).
  5. Select the Chat tab.
  6. Select Refresh page if prompted.
  7. In the message box, enter your question and press Enter or select Send.

Use GitLab Duo Chat in JetBrains IDEs

Prerequisites:

To use GitLab Duo Chat in a project, it must be:

  • Hosted on a GitLab instance.
  • Part of a group that meets the prerequisites.

To use GitLab Duo Chat:

  1. In your JetBrains IDE, go to Settings > Tools > GitLab Duo.
  2. Under GitLab Duo Agent Platform (Beta), select the Enable GitLab Duo Agent Platform checkbox.
  3. Restart your IDE if prompted.
  4. On the left sidebar, select GitLab Duo Agent Platform (Beta) ({duo-agentic-chat}).
  5. Select the Chat tab.
  6. In the message box, enter your question and press Enter or select Send.

Use GitLab Duo Chat in Visual Studio

Prerequisites:

To use GitLab Duo Chat in a project, it must be:

  • Hosted on a GitLab instance.
  • Part of a group that meets the prerequisites.

To use GitLab Duo Chat:

  1. In Visual Studio, go to Tools > Options > GitLab.
  2. Under GitLab, select General.
  3. For Enable Agentic Duo Chat (experimental), select True, and then OK.
  4. Select Extensions > GitLab > Open Agentic Chat.
  5. In the message box, enter your question and press Enter.

View the chat history

Version history

  • Chat history introduced on IDEs in GitLab 18.2.
  • Added for GitLab UI in GitLab 18.3.

To view your chat history:

  • In the GitLab UI: In the upper-right corner of the Chat drawer, select Chat history ({history}).
  • In your IDE: In the upper-right corner of the message box, select Chat history ({history}).

In the GitLab UI, all of the conversations in your chat history are visible.

In your IDE, the last 20 conversations are visible. Issue 1308 proposes to change this.

Have multiple conversations

Version history

  • Multiple conversations introduced in GitLab 18.3.

You can have an unlimited number of simultaneous conversations with GitLab Duo Chat.

Your conversations synchronize across GitLab Duo Chat in the GitLab UI and your IDE.

  1. Open GitLab Duo Chat in the GitLab UI or your IDE.

  2. Enter your question and press Enter or select Send.

  3. Create a new conversation:

    • In the GitLab UI: In the upper-right corner of the drawer, select New chat ({duo-chat-new}).
    • In your IDE: In the upper-right corner of the message box, select New chat ({plus}).
  4. Enter your question and press Enter or select Send.

  5. To view all of your conversations, look at your chat history.

  6. To switch between conversations, in your chat history, select the appropriate conversation.

  7. IDE only: To search for a specific conversation in the chat history, in the Search chats text box, enter your search term.

Because of LLM context window limits, conversations are truncated to 200,000 tokens (roughly 800,000 characters) each.

Delete a conversation

Version history

  • Ability to delete a conversation introduced in GitLab 18.2.
  1. In the GitLab UI or your IDE, select the chat history.
  2. In the history, select Delete this chat ({remove}).

Individual conversations expire and are automatically deleted after 30 days of inactivity.

Create custom rules

Version history

  • Custom rules added in GitLab 18.2.

In your IDE, if you have specific instructions that you want GitLab Duo Chat to follow in every conversation, you can create custom rules.

Prerequisites:

Conversations that existed before you created any custom rules do not follow those rules.

  1. In your IDE workspace, create a custom rules file: .gitlab/duo/chat-rules.md.

  2. Enter the custom rules into the file. For example:

    - don't put comments in the generated code
    - be brief in your explanations
    - always use single quotes for JavaScript strings
  3. Save the file.

  4. To have GitLab Duo Chat follow the new custom rules, start a new conversation, or /clear the existing conversation.

    You must do this every time you change the custom rules.

GitLab Duo Chat capabilities

GitLab Duo Chat (Agentic) extends GitLab Duo Chat (Classic) capabilities with the following features:

  • Project search: Can search through your projects to find relevant issues, merge requests, and other artifacts using keyword-based search. Agentic Chat does not have semantic search capability.
  • File access: Can read and list files in your local project without you needing to manually specify file paths.
  • Create and edit files: Can create files and edit multiple files in multiple locations. This affects the local files.
  • Resource retrieval: Can automatically retrieve detailed information about issues, merge requests, and pipeline logs of your current project.
  • Multi-source analysis: Can combine information from multiple sources to provide more complete answers to complex questions. You can use Model Context Protocol to connect GitLab Duo Chat (Agentic) to external data sources and tools.
  • Custom rules: Conversations can follow any customised rules that you specify.
  • GitLab Duo Chat (Agentic) in the GitLab UI only - Commit creation: Can create and push commits.

Chat feature comparison

Capability GitLab Duo Chat (Classic) GitLab Duo Chat (Agentic)
Ask general programming questions Yes Yes
Get answers about an open file in the editor Yes Yes. Provide the path of the file in your question.
Provide context about specified files Yes. Use /include to add a file to the conversation. Yes. Provide the path of the file in your question.
Autonomously search project contents No Yes
Autonomously create files and change files No Yes. Ask it to change files. Note, it may overwrite changes that you have made manually and have not committed, yet.
Retrieve issues and MRs without specifying IDs No Yes. Search by other criteria. For example, an MR or issue's title or assignee.
Combine information from multiple sources No Yes
Analyze pipeline logs Yes. Requires Duo Enterprise add-on. Yes
Restart a conversation Yes. Use /reset. Yes. Use /reset.
Delete a conversation Yes. Use /clear. Yes, in the chat history
Create issues and MRs No Yes
Use Git read-only commands No Yes
Use Git write commands No Yes, UI only
Run Shell commands No Yes, IDEs only
Run MCP tools No Yes, IDEs only

Use cases

You might find GitLab Duo Chat particularly helpful when you:

  • Need answers that require information from multiple files or GitLab resources.
  • Want to ask questions about your codebase without having to specify exact file paths.
  • Are trying to understand the status of issues or merge requests across a project.
  • Want to have files created or edited for you.

Example prompts

GitLab Duo Chat works best with natural language questions. Here are some examples:

  • Read the project structure and explain it to me, or Explain the project.
  • Find the API endpoints that handle user authentication in this codebase.
  • Please explain the authorization flow for <application name>.
  • How do I add a GraphQL mutation in this repository?
  • Show me how error handling is implemented across our application.
  • Component <component name> has methods for <x> and <y>. Could you split it up into two components?
  • Could you add in-line documentation for all Java files in <directory>?
  • Do merge request <MR URL> and merge request <MR URL> fully address this issue <issue URL>?

Troubleshooting

When working with GitLab Duo Chat, you might encounter the following issues.

Network connectivity problems

Because GitLab Duo Chat (Agentic) requires network access to retrieve resources, network restrictions might impact its functionality.

To help resolve GitLab Duo Chat networking issues, see the GitLab Duo Agent Platform network issue troubleshooting documentation.

GitLab Duo Chat does not show up in the IDE

You might find that GitLab Duo Chat (Agentic) is not visible in your IDE. To resolve this, make sure that:

  1. You have enabled GitLab Duo Chat (Agentic) in the VS Code or JetBrains IDE settings.
  2. You have one project open in your IDE workspace, and that project is connected to a GitLab project.
  3. The GitLab project is in a group namespace.
  4. You have a Premium or Ultimate subscription.
  5. GitLab Duo is turned on.
  6. GitLab Duo experimental and beta features are turned on for your top-level group on GitLab.com, or your instance on GitLab Self-Managed. Contact your administrator if necessary.

Slow response times

Chat has significant latency when processing requests.

This issue occurs because Chat makes multiple API calls to gather information, so responses often take much longer compared to Chat.

Limited permissions

Chat can access the same resources that your GitLab user has permission to access.

Search limitations

Chat uses keyword-based search instead of semantic search. This means that Chat might miss relevant content that does not contain the exact keywords used in the search.

Feedback

Because this is a beta feature, your feedback is valuable in helping us improve it. Share your experiences, suggestions, or issues in issue 542198.

Related topics