Agents
- Tier: Premium, Ultimate
- Add-on: GitLab Duo Core, Pro, or Enterprise
- Offering: GitLab.com
- Status: Experiment
The availability of this feature is controlled by a feature flag. For more information, see the history.
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, you can enable it or execute a test run.
Prerequisites
To use agents, you must meet the prerequisites.
There are additional requirements depending on the agent’s visibility.
Agent visibility
When you create an agent, you associate it with a project and choose whether it is public or private.
- A public agent can be viewed by anyone and can be added to any project that meets the prerequisites.
- A private agent can be viewed only by members of the associated project who have at least the Developer role. Private agents cannot be added to projects other than the associated project.
Create an agent
Prerequisites:
- You must have at least the Maintainer role for the project.
To create an agent:
- On the left sidebar, select Search or go to > Explore.
- Select AI Catalog.
- 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 or Public.
- From the Source project dropdown list, select a project for the agent.
- 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.
- Select Create agent.
The agent now appears in the AI Catalog.
Enable an agent
Enable an agent in a project to use it with Chat.
Prerequisites:
- You must have at least the Maintainer role for the project.
- On the left sidebar, select Search or go to > Explore.
- Select AI Catalog and find the agent you want to enable.
- Next to the agent name, select Actions ( ) > Enable in project.
The agent appears on the project’s Agents page.
Run an agent
Execute a test run to start a session with the agent.
Prerequisites:
- You must be a member of the associated project and have at least the Maintainer role.
To run an agent:
- On the left sidebar, select Search or go to > Explore.
- Select AI Catalog.
- Select your agent, then select Test.
- On the dialog, enter your instructions, then select Run.
The session starts on the associated project’s Agent sessions page.
Duplicate an agent
Create a copy of an existing agent and associate it with a different project. Do this if you want to use an agent someone else created, or make changes to an agent without overwriting the original.
Prerequisites:
- You must have at least the Maintainer role for the project.
To duplicate an agent:
- On the left sidebar, select Search or go to > Explore.
- Select AI Catalog and find the agent you want to duplicate.
- Next to the agent name, select Actions ( ) > Duplicate.
- Optional. Edit any fields you want to change.
- Select Create agent.
Manage agents
Edit an agent to change its configuration, or delete it to remove it from the AI Catalog.
Prerequisites:
- You must be a member of the associated project and have at least the Maintainer role.
- On the left sidebar, select Search or go to > Explore.
- Select AI Catalog and find the agent you want to manage.
- Next to the agent name, select Actions ( ).
- To edit an agent:
- Select Edit.
- Edit any fields you want to change, then select Save changes.
- To delete an agent:
- Select Delete.
- On the confirmation dialog, select Delete.
- To edit an agent: