Development of GitLab Duo Agent Platform
How to set up the local development environment to run GitLab Duo Agent Platform.
Prerequisites
- GitLab Ultimate license
- Vertex access: You need access to the
ai-enablement-dev-69497ba7
project in GCP because GDK by default uses Anthropic hosted on Vertex. Access to this project should be available to all engineers at GitLab.- If you do not have Vertex access for any reason, you should unset
DUO_WORKFLOW__VERTEX_PROJECT_ID
in the Duo Agent Platform Service and setANTHROPIC_API_KEY
to a regular Anthropic API key
- If you do not have Vertex access for any reason, you should unset
- Various settings and feature flags, which are enabled for you by the GDK setup script
Set up local development for Agent Platform
Agent Platform consists of four separate services:
- GitLab instance
- GitLab Duo Agent Platform Service, which is part of GitLab AI Gateway
- GitLab Duo Agent Platform Executor
- GitLab Duo Agent Platform Webview
Development Setup for Backend Components
You should set up GitLab Duo Agent Platform with the GitLab Development Kit (GDK) to run local versions of GitLab, Duo Agent Platform Service, and Executor.
This setup can be used as-is with the publicly available version of the VS Code Extension.
Development Setup for Frontend Components
There is no need to set up the backend components of the Agent Platform to test changes for the Agent Platform UI in the IDE.
A local build of the UI is required if you are making Duo Agent Platform UI changes that you need to view locally. A local build is also required if you want to use a version of the UI that has not been released yet.
Refer to the GitLab Duo Agent Platform README file in the Language Server project to get started with local development of GitLab Duo Agent Platform UI in the IDE.
Development settings
Each of these settings can be turned on in your user settings in VS Code.
Change view type
Enable the Duo Agent Platform as a sidepanel instead of fullview. This is going to be the default for public beta.
"gitlab.featureFlags.duoWorkflowPanel": true,
Tool approval
Allow users to get access to tools that require approval such as running terminal commands.
"gitlab.duo.workflow.toolApproval": true
Evaluate flow
Running evals
To evaluate your local setup, please refer to Duo Agent Platform Tests repo.
Comparing results
Once you finish a evaluation and have a experiment ID from LangSmith, compare results using this notebook from the Duo Agent Platform Notebooks repo.