Customize GitLab Duo Agent Platform
You can customize the Agent Platform to match your workflow, coding standards, or project requirements.
Customization options
| Method | AI features1 | Use cases | Supported in |
|---|---|---|---|
| Use custom rules to provide instructions. | - GitLab Duo Chat - Agents - Flows, excluding Code Review Flow |
- Apply personal preferences. - Enforce team standards. |
- GitLab UI - Editor extensions - GitLab Duo CLI |
| Create an AGENTS.md file to provide instructions. | - GitLab Duo Chat - Flows, excluding Code Review Flow |
- Account for project-specific context. - Organize a monorepo. - Enforce directory-specific conventions. |
- GitLab UI - Editor extensions - GitLab Duo CLI - Non-GitLab AI coding tools |
| Create MR review instructions to ensure consistent and specific code review standards in your project. | - Code Review Flow | Apply: - Language-specific review rules. - Security standards. - Code quality requirements. - File-specific guidelines. |
- GitLab UI |
| Create Agent Skills to provide skills. | - GitLab Duo Chat - Flows, excluding Code Review Flow |
- Provide shareable skills - Add custom slash commands |
- GitLab UI - Editor extensions - GitLab Duo CLI - Non-GitLab AI coding tools |
| Create workspace subagents to define specialized agents. | - Developer Flow | - Delegate focused tasks, like reviews or research, to specialized agents. | - GitLab UI - GitLab Duo CLI |
Best practices
When you customize the Agent Platform, apply the following best practices:
-
Start with minimal, clear, and simple instructions, and add more as needed. Keep the instruction file as short as possible.
-
Make sure the instructions are specific and actionable. Provide examples as needed.
-
Choose the method that matches your use case.
-
Combine multiple methods to tailor and control how GitLab Duo behaves.
-
If you use multiple methods, consider the following file structure for your project:
Project root directory |─ AGENTS.md # Applies to multiple Duo features |- skills/<skill-name>/ |─ SKILL.md # Applies to multiple Duo features |─ .agents/agents/ |─ <subagent-name>.md # Workspace subagents for the Developer Flow |─ .gitlab/duo/ |─ chat-rules.md # Custom Chat-specific rules |─ mr-review-instructions.yaml # Custom code review standards |─ ... # Other configuration as neededYou can include other configuration files in the
.gitlab/duo/folder, such as custom flow definitions, or an MCP server configuration file. -
Document your choices in comments to explain why certain instructions exist.
-
Protect customization files with Code Owners to manage changes.
Related topics
-
Support varies by where you use these features. For more information, see the documentation for each customization method. ↩︎