Custom agents
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
Model information
- Available on GitLab Duo with self-hosted models
Version history
- Introduced in GitLab 18.5 with a feature flag named
global_ai_catalog. Enabled on GitLab.com. - Enabling in groups introduced in GitLab 18.7 with a feature flag named
ai_catalog_agents. Enabled on GitLab.com. - Changed to beta in GitLab 18.7.
- Generally available in GitLab 18.8.
- Feature flag
ai_catalog_agentsremoved in GitLab 18.9. - Feature flag
global_ai_catalogremoved in 18.10. - Enabling directly in projects as a maintainer introduced in GitLab 18.10 with a feature flag named
ai_catalog_project_level_enablement. Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated by default. - Available on the Free tier on GitLab.com with GitLab Credits in GitLab 18.10.
- Feature flag
ai_catalog_project_level_enablementremoved in GitLab 18.11.
Agents use AI to perform tasks and answer complex questions. Create custom agents to accomplish specific tasks, like creating merge requests or reviewing code. Or, use the AI Catalog to discover agents created by GitLab.
When you're ready to interact with an agent, enable it and start using it with GitLab Duo Chat in the GitLab UI, VS Code, and JetBrains IDEs.
Prerequisites
Agent visibility
Version history
- Roles that can view private agents expanded in GitLab 18.7.
- Restricted visibility introduced in GitLab 19.3 with a feature flag named
ai_catalog_internal_visibility. Enabled by default. - Generally available in GitLab 19.4. Feature flag
ai_catalog_internal_visibilityremoved.
When you create a custom agent, you select a project to manage it and choose whether the agent is public, private, or restricted.
Public agents:
- Can be viewed by anyone and can be enabled in any project that meets the prerequisites.
Restricted agents:
- Can be viewed and used by members of any project in the top-level group of the managing project.
- Can be enabled in other projects in the same top-level group.
- Cannot be viewed or turned on outside that top-level group.
- Cannot be viewed in the AI Catalog in Explore.
- Can be created only from a project, not from the AI Catalog in Explore.
You cannot make a public agent restricted if the agent has been turned on by a project outside of that top-level group.
Private agents:
- Can be viewed only by members of the managing project who have the Guest, Planner, Reporter, Developer, Maintainer, or Owner role.
- Cannot be enabled in projects other than the managing project.
You cannot make a public or restricted agent private if the agent has been turned on by a project other than the managing project.
View the agents for your project
Prerequisites:
- You must have the Developer, Maintainer, or Owner role for the project.
To view a list of agents associated with your project:
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select AI > Agents.
- To view agents enabled in the project, select the Enabled tab.
- To view agents managed by the project, select the Managed tab.
Select an agent to view its details.
Create an agent
Version history
- Restricted visibility introduced in GitLab 19.3 with a feature flag named
ai_catalog_internal_visibility. Enabled by default. - Generally available in GitLab 19.4. Feature flag
ai_catalog_internal_visibilityremoved.
You can create an agent from a project, or by using the AI Catalog.
Prerequisites:
- You must have the Maintainer or Owner role for the project.
From a project
To create an agent:
-
In the top bar, select Search or go to and find your project.
-
In the left sidebar, select AI > Agents.
-
Select New agent.
-
Under Basic information:
- In Display name, enter a name for the agent.
- In Description, enter a description for the agent.
-
Under Visibility & access, for Visibility, select Private, Restricted, or Public.
-
Under Prompts, in System prompt, enter a prompt to define the agent's personality, expertise, and behavior.
-
Optional. Under Available tools, from the Tools dropdown list, select which tools the agent can access. For example, for the agent to create issues automatically, select Create issue.
Note
Some tools require the IDE extension and are not available in the GitLab UI. For more information, see the list of agent tools.
-
Select Create agent.
From the AI Catalog
To create an agent:
-
In the top bar, select Search or go to > Explore.
-
Select AI Catalog, then select the Agents tab.
-
Select New agent.
-
Under Basic information:
- In Display name, enter a name for the agent.
- In Description, enter a description for the agent.
-
Under Visibility & access:
- From the Managed by dropdown list, select a project for the agent.
- For Visibility, select Private or Public.
-
Under Prompts, in System prompt, enter a prompt to define the agent's personality, expertise, and behavior.
-
Optional. Under Available tools, from the Tools dropdown list, select which tools the agent can access. For example, for the agent to create issues automatically, select Create issue.
Note
Some tools require the IDE extension and are not available in the GitLab UI. For more information, see the list of agent tools.
-
Select Create agent.
The agent appears in the AI Catalog. To use the agent with Chat, you must enable it.
Enable an agent
Version history
- Enabling a public agent for multiple projects introduced in GitLab 19.2 with a feature flag named
ai_catalog_bulk_item_consumer_create. Enabled by default. - Feature flag
ai_catalog_bulk_item_consumer_createremoved in GitLab 19.4. - Enabling an agent for all projects in a top-level group introduced in GitLab 19.5 with a feature flag named
ai_catalog_group_inherited_consumers. Disabled by default.
Enable an agent to use it with Chat.
When you enable an agent in a project, it is enabled in the top-level group for that project at the same time. You can enable an agent or flow up to 30 times per minute.
From the managing project
Prerequisites:
- Have the Maintainer or Owner role for the project.
To enable an agent:
- In the top bar, select Search or go to and find your project.
- In the left sidebar, select AI > Agents.
- Select the Managed tab, then select the agent you want to enable.
- In the upper-right corner, select Enable.
- Under Project, select the project you want to enable the agent in.
- Select Enable.
From the top-level group
[!flag] The availability of this feature is controlled by a feature flag. For more information, see the history.
When you enable an agent in a top-level group, the agent is enabled for all projects in the group. Projects that you create in or transfer to the group later also get access to the agent. You do not have to enable the agent in each project.
Prerequisites:
- Have the Maintainer or Owner role for the top-level group.
- The agent is public, or restricted to the same top-level group.
To enable an agent for all projects in a top-level group:
-
In the top bar, select Search or go to and find your top-level group.
-
In the left sidebar, select AI > Agents.
-
Select the agent you want to enable.
-
In the upper-right corner, select Enable for all projects.
-
Select Enable for all projects.
If the agent is already enabled in one or more projects in the group, select Replace and enable for all projects. The project configurations are deleted and the group configuration is used instead.
In the group, the agent is labeled Enabled for all projects. In each project, the agent is labeled Enabled by followed by the group name.
To disable the agent for all projects, on the agent's page, select Disable for all projects, then select Disable.
From the AI Catalog
Prerequisites:
- Have the Maintainer or Owner role for the project.
To enable an agent:
-
In the top bar, select Search or go to > Explore.
-
Select AI Catalog, then select the Agents tab.
-
Select the agent you want to enable.
-
In the upper-right corner, select Enable.
-
Under Project, select the project you want to enable the agent in.
To turn on a public or restricted agent for multiple projects, from the Project dropdown list, select the relevant projects. You can select up to 100 projects. You can enable an agent for multiple projects up to 10 times per minute.
-
Select Enable.
The agent appears in the group and project AI > Agents pages. If you enabled the agent in a project, maintainers of other projects in the top-level group can also enable the agent in their projects following the steps above.
In the project, you can start a new chat with the agent. For more information, see select an agent.
Use an agent
You can use a custom agent in the GitLab UI, VS Code, JetBrains IDEs, and as a subagent in a custom flow.
In the GitLab UI
Prerequisites:
- Enable the agent in the project you want to use it in.
To use a custom agent in the GitLab UI:
-
In the top bar, select Search or go to and find your project or group.
-
Open an issue, epic, or merge request.
-
On the GitLab Duo sidebar, select Add new chat ({pencil-square}).
-
From the dropdown list, select the custom agent.
A Chat conversation opens in the GitLab Duo sidebar on the right side of your screen.
-
Enter your question or request.
In VS Code
Prerequisites:
- Enable the agent in the project you want to use it in.
- Install and configure GitLab for VS Code version 6.47.0 or later.
- Set a default GitLab Duo namespace.
To use a custom agent in VS Code:
- In VS Code, in the left sidebar, select GitLab Duo Agent Platform ({duo-agentic-chat}).
- Under the message box, from the agent dropdown list, select the custom agent. In the classic layout, select the Chat tab, then from the New chat ({duo-chat-new}) dropdown list, select the custom agent.
- Enter your question or request.
In JetBrains IDEs
Prerequisites:
- Enable the agent in the project you want to use it in.
- Install and configure the GitLab Duo plugin for JetBrains IDEs version 3.19.0 or later.
- Set a default GitLab Duo namespace.
First, enable the GitLab Duo Agent Platform:
- In your JetBrains IDE, go to Settings > Tools > GitLab Duo.
- Under GitLab Duo Agent Platform, select the Enable GitLab Duo Agent Platform checkbox.
- Restart your IDE if prompted.
Then, to use a custom agent:
- In your JetBrains IDE, on the right tool window bar, select GitLab Duo Agent Platform ({duo-agentic-chat}).
- Under the message box, from the agent dropdown list, select the custom agent. In the classic layout, select the Chat tab, then from the New chat ({duo-chat-new}) dropdown list, select the custom agent.
- Enter your question or request.
In a custom flow
A custom flow can use the agent as a subagent.
This feature is in beta.
The flow lists the agent by item ID and exact version in its YAML, and a component of the flow
delegates tasks to it.
The agent does not have to be enabled in the project of the flow.
For the YAML, the rules, and the flag, see include.
When the agent is a subagent, the model that runs the flow reads its name and its description. The model uses them to decide when to delegate a task to the agent. Write the description so that a model can tell what the agent does and when to use it. A description written only for people to read in the AI Catalog might not be enough.
Disable an agent
Prerequisites:
- For groups, you must have the Maintainer or Owner role.
- For projects, you must have the Maintainer or Owner role.
To disable an agent:
- In the top bar, select Search or go to and find your group or project.
- Select AI > Agents.
- Find the agent you want to remove and select Actions ({ellipsis_v}) > Disable.
- On the confirmation dialog, select Disable.
The agent no longer appears in the project, and is not available in Chat. You can disable an agent or flow up to 30 times per minute.
Duplicate an agent
To make changes to an agent without overwriting the original, create a copy of an existing agent.
Prerequisites:
- You must have the Maintainer or Owner role for the project.
To duplicate an agent:
- In the top bar, select Search or go to > Explore.
- Select AI Catalog, then select the Agents tab.
- Select the agent you want to duplicate.
- In the upper-right corner, select Actions ({ellipsis_v}) > Duplicate.
- Select the project where you want to duplicate the agent.
- Optional. Edit any fields you want to change.
- Select Create agent.
Edit an agent
Edit an agent to change its configuration.
Prerequisites:
- You must be a member of the managing project and have the Maintainer or Owner role.
- In the top bar, select Search or go to and find your group or project.
- Select AI > Agents.
- Select the agent you want to edit.
- In the upper-right corner, select Edit.
- Edit any fields you want to change, then select Save changes.
Hide an agent
Hide an agent to remove it from the AI Catalog.
After you hide an agent, users can't enable it. However, they can still interact with the agent in the groups and projects it is already enabled in.
When a custom flow uses the agent as a subagent, hiding the agent stops that flow.
The flow stops at run time because the subagent can no longer be used.
To run the flow again, remove the agent from the include list of the flow, or replace it with a different agent.
Prerequisites:
- You must be a member of the managing project and have the Maintainer or Owner role.
To hide an agent:
- In the top bar, select Search or go to and find your group or project.
- Select AI > Agents.
- Find the agent you want to hide and select Actions ({ellipsis_v}) > Hide.
- In the confirmation dialog, select Confirm.
Delete an agent
Delete an agent to remove it from the instance.
When you delete an agent, you can choose one of two deletion methods:
- Delete permanently: The agent is removed from the instance. This action cannot be undone.
- Hide from the AI Catalog: The agent is hidden instead of removed. Users can continue to use the agent in the groups and projects it is enabled in.
If a project other than the managing project has turned on the agent, or a custom flow uses the agent as a subagent, the agent is always hidden instead of removed, even when you choose Delete permanently.
When a flow uses a hidden agent as a subagent, a save that changes its YAML or increases its visibility fails.
The error shows the item ID and version of the agent, not its name.
To save the flow, remove the agent from the include list of the flow, or replace it with a different agent.
Prerequisites:
- You must be an administrator.
- In the top bar, select Search or go to and find your group or project.
- Select AI > Agents.
- Find the agent you want to delete and select Actions ({ellipsis_v}) > Delete.
- In the confirmation dialog, under Deletion method, select Delete permanently or Hide from the AI Catalog.
- Select Confirm.
Turn custom agents on or off
Version history
- Introduced in GitLab 19.0.
By default, custom agents are turned on. You can turn them on or off for a top-level group or for an instance.
When custom agents are turned off:
- Users cannot create, enable, disable, or execute custom agents.
- Existing custom agents are no longer visible in the project under AI > Agents > Enabled.
- Custom agents created in the project appear under AI > Agents > Managed, but cannot be executed.
- Foundational agents and external agents remain available.
GitLab.com
Prerequisites:
- You must have the Owner role for the group.
- In the top bar, select Search or go to and find your group.
- In the left sidebar, select Settings > GitLab Duo.
- Select Change configuration.
- Under Custom and external agents and flows, select or clear the Allow custom agents checkbox.
- Select Save changes.
This setting cascades to all subgroups in the group.
GitLab Self-Managed
Prerequisites:
- You must be an administrator.
- In the upper-right corner, select Admin.
- In the left sidebar, select GitLab Duo.
- Select Change configuration.
- Under Custom and external agents and flows, select or clear the Allow custom agents checkbox.
- Select Save changes.
When the instance-level setting is turned off, group-level settings cannot override it.