Automate deployment processes with GitLab Duo Agent Platform (opens in new tab)
GitLab Duo Agent Platform can automate the complex, repetitive work of onboarding a microservice into an established GitOps workflow. By analyzing an application’s repositories and configuration, a custom agent can generate manifests, update pipelines, configure image automation, and follow organization-specific conventions. The approach combines AI-driven speed with GitLab-managed versioning, governance, and enterprise security.
TanukiBank’s GitOps Use Case
- The fictional TanukiBank application needs a new
intra-account-transfersmicroservice for its Quick Transfer feature. - Its deployment architecture includes:
- Individual service projects with container registries and build pipelines.
- Tanuki Bank - Delivery, which stores deployment manifests and delivery pipelines.
- Flux Config, which contains Flux manifests for Kubernetes.
- Flux Image Automation watches service registries and updates corresponding delivery manifests.
- A delivery pipeline then builds and signs the image, while Flux CD synchronizes it to the Kubernetes cluster.
- Adding a service manually requires coordinated changes across all these components.
Generating the Custom Agent’s System Prompt
- GitLab Duo Agentic Chat examines the TanukiBank group, subgroups, source files, Dockerfiles, manifests, configuration, and dependencies.
- It generates a detailed system prompt describing:
- The existing GitOps workflow.
- Required operating rules.
- Reporting instructions.
- Recommended tools.
- The prompt is specific to the workflow at the time it is generated.
- If the application’s GitOps process changes, the prompt should be regenerated.
Creating and Configuring the Agent
- A new
application-agentsproject manages custom agents, their administrators, and where they can run. - A managed agent named TanukiBank Microservice Onboarder is created with:
- A description.
- The generated system prompt.
- Tools recommended by GitLab Duo.
- The agent is enabled in both Tanuki Bank - Delivery and Flux Config.
- Its presence in each project’s Agentic Chat agent selector confirms that it is available.
Creating the Microservice
- A new
services/intra-account-transfersproject is created. - GitLab Duo’s Developer foundational flow implements the service from an issue specification.
- The flow:
- Reads the requirements.
- Writes the implementation.
- Creates a branch and merge request.
- Links the merge request to the issue.
- After local verification with
curl, the merge request is merged and the project pipeline publishes container images. - At this stage, the service exists, but the GitOps system has not been updated:
manifests/devhas no service manifests.- The delivery pipeline does not reference the service.
Flux Configlacks animage-update-automation.yamlentry.
Using the Custom Onboarding Agent
- The custom agent is enabled in the new service project.
- From Tanuki Bank - Delivery, the user selects TanukiBank Microservice Onboarder in Agentic Chat and provides the service name and hostname.
- The agent begins onboarding by:
- Finding and reading the service’s Dockerfile.
- Determining the application port.
- Generating the required Kubernetes manifests.
- Updating the relevant delivery pipelines.
- This automates the coordinated repository changes normally required for a new microservice.
Practical Takeaway
A custom GitLab Duo agent is most valuable when it is grounded in an organization’s real repositories and deployment conventions. Generate its prompt from the current system, keep the agent centrally governed, and regenerate the prompt whenever the GitOps workflow changes.