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: Yes
Version history
- VS Code introduced on GitLab.com in GitLab 18.1 as an experiment with a flag named
duo_agentic_chat
. Disabled by default. - VS Code enabled on GitLab Self-Managed in GitLab 18.2.
- GitLab UI introduced on GitLab.com and GitLab Self-Managed in GitLab 18.2 with flags named
duo_workflow_workhorse
andduo_workflow_web_chat_mutation_tools
. Both flags are enabled by default. - Feature flag
duo_agentic_chat
enabled by default in GitLab 18.2. - JetBrains IDEs introduced in GitLab 18.2.
- Changed to beta in GitLab 18.2.
- Visual Studio for Windows introduced in GitLab 18.3.
- Added to GitLab Duo Core in GitLab 18.3.
- Feature flags
duo_workflow_workhorse
andduo_workflow_web_chat_mutation_tools
removed in GitLab 18.4. - For GitLab Duo with self-hosted models, introduced in GitLab 18.4, as an experiment with a feature flag named
self_hosted_agent_platform
. Disabled by default.
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:
- The GitLab UI.
- VS Code.
- A JetBrains IDE.
- Visual Studio for Windows.
Use GitLab Duo Chat in the GitLab UI
Version history
- Ability for Chat to remember your most recent conversation added in GitLab 18.4.
Prerequisites:
- Ensure you meet the prerequisites.
To use Chat in the GitLab UI:
- On the left sidebar, select Search or go to and find your project.
- In the upper-right corner, select GitLab Duo Chat. A drawer opens on the right side of your screen.
- Under the chat text box, turn on the Agentic mode (Beta) toggle.
- Enter your question in the chat text box and press Enter or select Send. It may take a few seconds to produce an answer.
- Optional. Ask a follow-up question.
If you reload the webpage you are on, or go to another webpage, Chat remembers your most recent conversation, and that conversation is still active in the Chat drawer.
Use GitLab Duo Chat in VS Code
Prerequisites:
- Install and configure the GitLab Workflow extension for VS Code version 6.15.1 or later.
- Ensure you meet the other prerequisites.
Turn on GitLab Duo Chat:
- In VS Code, go to Settings > Settings.
- Search for
agent platform
. - Under Gitlab › Duo Agent Platform: Enabled, select the Enable GitLab Duo Agent Platform checkbox.
Then, to use GitLab Duo Chat:
- On the left sidebar, select GitLab Duo Agent Platform (Beta) ({duo-agentic-chat}).
- Select the Chat tab.
- Select Refresh page if prompted.
- In the message box, enter your question and press Enter or select Send.
Use GitLab Duo Chat in JetBrains IDEs
Prerequisites:
- Install and configure the GitLab plugin for JetBrains version 3.11.1 or later.
- Ensure you meet the other prerequisites.
Turn on GitLab Duo Chat:
- In your JetBrains IDE, go to Settings > Tools > GitLab Duo.
- Under GitLab Duo Agent Platform (Beta), select the Enable GitLab Duo Agent Platform checkbox.
- Restart your IDE if prompted.
Then, to use GitLab Duo Chat:
- On the left sidebar, select GitLab Duo Agent Platform (Beta) ({duo-agentic-chat}).
- Select the Chat tab.
- In the message box, enter your question and press Enter or select Send.
Use GitLab Duo Chat in Visual Studio
Prerequisites:
- Install and configure the GitLab extension for Visual Studio version 0.60.0 or later.
- Ensure you meet the other prerequisites.
Turn on GitLab Duo Chat:
- In Visual Studio, go to Tools > Options > GitLab.
- Under GitLab, select General.
- For Enable Agentic Duo Chat (experimental), select True, and then OK.
Then, to use GitLab Duo Chat:
- Select Extensions > GitLab > Open Agentic Chat.
- 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.
-
Open GitLab Duo Chat in the GitLab UI or your IDE.
-
Enter your question and press Enter or select Send.
-
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}).
-
Enter your question and press Enter or select Send.
-
To view all of your conversations, look at your chat history.
-
To switch between conversations, in your chat history, select the appropriate conversation.
-
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.
- In the GitLab UI or your IDE, select the chat history.
- 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:
- For VS Code, install and configure the GitLab Workflow extension for VS Code version 6.32.2 or later.
- For a JetBrains IDE, install and configure the GitLab plugin for JetBrains version 3.12.2 or later.
- For Visual Studio, install and configure the GitLab extension for Visual Studio version 0.60.0 or later.
Conversations that existed before you created any custom rules do not follow those rules.
-
In your IDE workspace, create a custom rules file:
.gitlab/duo/chat-rules.md
. -
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
-
Save the file.
-
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.
For more information, see the Custom rules in GitLab Duo Agentic Chat blog.
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
, orExplain 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.
Trouble connecting or viewing
To ensure you are connected properly and can view Chat, see Troubleshooting.
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.