doc/user/gitlab_duo_chat/agentic_chat.md
{{< details >}}
{{< /details >}}
{{< collapsible title="Model information" >}}
{{< /collapsible >}}
{{< history >}}
duo_agentic_chat. Disabled by default.duo_workflow_workhorse and duo_workflow_web_chat_mutation_tools. Both flags are enabled by default.duo_agentic_chat enabled by default in GitLab 18.2.duo_workflow_workhorse and duo_workflow_web_chat_mutation_tools removed in GitLab 18.4.self_hosted_agent_platform. Disabled by default.self_hosted_agent_platform enabled in GitLab 18.7.agentic_chat_ga and ai_duo_agent_platform_ga_rollout_self_managed. Both flags are enabled by default. Feature flag duo_agentic_chat removed.self_hosted_agent_platform, agentic_chat_ga, and ai_duo_agent_platform_ga_rollout_self_managed removed in GitLab 18.10.{{< /history >}}
GitLab Duo Agentic Chat is an enhanced version of GitLab Duo Non-Agentic Chat. This new Chat can autonomously perform actions on your behalf, to help you answer complex questions more comprehensively.
While the non-agentic 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.
Agentic Chat can:
<i class="fa-youtube-play" aria-hidden="true"></i> For an overview, see GitLab Duo Chat (agentic).
<!-- Video published on 2025-06-02 -->You can use GitLab Duo Chat in:
{{< history >}}
paneled_view. Enabled by default.paneled_view removed.{{< /history >}}
Prerequisites:
To use Chat in the GitLab UI:
In the top bar, select Search or go to and find your project.
On the GitLab Duo sidebar, select either Add new chat ({{< icon name="pencil-square" >}}) or Current GitLab Duo Chat ({{< icon name="duo-chat" >}}).
If you have selected a new chat, from the dropdown list, select an agent.
A Chat conversation opens in the GitLab Duo sidebar on the right side of your screen.
Under the chat text box, ensure the Agentic toggle is turned on.
Enter your question in the chat text box and press <kbd>Enter</kbd> or select Send.
Optional. You can:
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.
Prerequisites:
Turn on GitLab Duo Chat:
Then, to use GitLab Duo Chat:
Prerequisites:
Turn on GitLab Duo Chat:
Then, to use GitLab Duo Chat:
Prerequisites:
Turn on GitLab Duo Chat:
Then, to use GitLab Duo Chat:
{{< history >}}
{{< /history >}}
To view your chat history:
In the GitLab UI, on the GitLab Duo sidebar, select GitLab Duo Chat history ({{< icon name="history" >}}).
In your IDE, in the upper-right corner of the message box, select Chat history ({{< icon name="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.
{{< history >}}
{{< /history >}}
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 <kbd>Enter</kbd> or select Send.
Create a new Chat conversation:
In the GitLab UI, you can do either of the following:
/new and press <kbd>Enter</kbd> or select Send.A new Chat conversation replaces the existing one.
Under the Chat text box, ensure the Agentic toggle is turned on.
In your IDE, in the upper-right corner of the message box, select New chat ({{< icon name="plus" >}}).
Enter your question and press <kbd>Enter</kbd> 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.
To search for a specific conversation in the chat history:
Because of LLM context window limits, conversations are truncated to 200,000 tokens (roughly 800,000 characters) each.
{{< history >}}
{{< /history >}}
Individual conversations expire and are automatically deleted after 30 days of inactivity.
Customize how GitLab Duo Chat behaves in your local environment by providing instructions that reflect your coding style, team practices, and project requirements.
GitLab Duo Chat supports two approaches:
chat-rules.md: For GitLab only.
Best for personal preferences and team standards.AGENTS.md: For GitLab and other AI
tools that support the AGENTS.md specification. Best for project context, monorepo organization,
and directory-specific conventions.You can use both files simultaneously. GitLab Duo Chat applies instructions from all available rule files.
Learn more about how to customize GitLab Duo.
{{< details >}}
{{< /details >}}
{{< history >}}
ai_user_model_switching. Disabled by default.ai_user_model_switching removed in GitLab 18.7.{{< /history >}}
When you use Chat in the GitLab UI, VS Code, or a JetBrains IDE, you can select the model to use for conversations.
If you open a previous chat from the chat history and continue that conversation, Chat uses the model that you previously selected.
If you select a new model when in an existing conversation, Chat creates a new conversation.
Prerequisites:
{{< tabs >}}
{{< tab title=GitLab.com >}}
{{< /tab >}}
{{< tab title="Self-managed" >}}
{{< /tab >}}
{{< /tabs >}}
To select a model:
{{< history >}}
{{< /history >}}
When you use Chat in a project in the GitLab UI, VS Code, or a JetBrains IDE, you can select a specific agent for Chat to use.
Prerequisites:
To select an agent:
After you create a conversation with an agent:
{{< history >}}
{{< /history >}}
Prompt caching is enabled by default, and only works when the selected Agentic Chat model is from Anthropic or is an Anthropic model served through Vertex.
When prompt caching is enabled, chat prompt data is temporarily stored in memory by the model vendor.
Prompt caching significantly improves latency by avoiding the re-processing of cached prompt and input data.
You can turn off prompt caching in the GitLab Duo settings, depending on the offering:
This also turns off prompt caching for Code Suggestions.
| Capability | GitLab Duo Non-Agentic Chat | GitLab Duo Agentic Chat |
|---|---|---|
| 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. <sup>1</sup> | 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 GitLab Duo Enterprise add-on. | Yes |
| Restart a conversation | Yes. Use /new or /reset. | Yes. Use /new or, if in the UI, /reset. |
| Delete a conversation | Yes, in the chat history. | 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 |
Footnotes:
When working with GitLab Duo Chat, you might encounter issues.
For information on resolving these issues, see Troubleshooting.
Your feedback is valuable in helping us improve this feature. Share your experience in issue 542198.