How we used AI agents to migrate GitLab rate limiting

· Source: GitLab · Field: Technology & Digital — Software Development & Engineering, Artificial Intelligence & Machine Learning, Robotics & Autonomous Systems · Depth: Intermediate, medium

Summary

GitLab successfully used AI agents to migrate 121 application-level rate-limiting keys from a legacy system to a unified labkit-ruby implementation. This experiment, involving a small team and GitLab Duo Agent Platform, aimed to consolidate Gitlab::ApplicationRateLimiter and a separate Rack-level system. The project shipped 14 specs and over 30 merge requests, rolling out in six cohorts, with Cohort 1 (including pipelines_create, notes_create, user_sign_in) reaching 100% on May 5, 2026. While agents excelled at mechanical tasks like fanning out 95 call sites, human judgment was critical for scope, architecture, rollout, and final review. Challenges included an observability gap that missed a structural collision in shadow mode and a Redis maxclients bottleneck, which halted at 75,000 connections. The experiment demonstrated that AI agents shift bottlenecks from code generation to human review capacity and rollout judgment.

Key takeaway

For MLOps Engineers or AI Engineers migrating legacy systems, integrating AI agents like GitLab Duo Agent Platform can significantly accelerate code implementation. However, you must prioritize robust human-led processes, including adversarial review and meticulous rollout judgment. Ensure your observability distinguishes critical failure modes, and actively audit agent outputs against full inventories. Your "Bob" and "Max" — those who deliberately test and audit — are more crucial than the agents themselves for safe, complete migrations.

Key insights

AI agents accelerate code generation, but human judgment, robust observability, and a strict review loop remain paramount.

Principles

Method

Implement a strict loop: spec, adversarial review, implement, verify, adversarial MR review, human review, merge.

In practice

Topics

Best for: AI Engineer, MLOps Engineer, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by GitLab.