GitLab
Follow
How GitLab reduced code-per-agentic-flow ratio by 45%
GitLab Duo Agent Platform utilizes agentic flows to automate complex tasks, powered by the Flow Registry. This framework, built on reusable components, transforms declarative YAML configurations into functional LangGraph flows. Flow Registry simplifies agent development by abstracting repetitive Python code and custom state management into reusable primitives and components. This has led to a significant reduction in code per agentic flow, improving iteration speed and reliability. Platform-wide improvements benefit all agents due to centralized component maintenance, and an abstraction layer ensures backward compatibility. GitLab chose LangGraph as the foundation for its agent platform due to its robust features and engineering autonomy. Initially, engineers quickly built four agentic flows using LangGraph. However, the platform's rapid growth revealed a lack of structure for consistent, large-scale development. The ad-hoc graph implementations became complex, hindering feature development and maintenance. To address this complexity, GitLab introduced a new layer of abstraction, separating AI engineering from platform development. This led to the creation of the Flow Registry, designed to be collaborative and efficient for AI development. Flow Registry is built on three pillars: Components, Routers, and a Shared State Structure. Components abstract common AI primitives like agents and checkpoints, allowing developers to declare them in YAML rather than writing complex Python. Routers orchestrate multiple agents into flows, enabling the modeling of complex processes and offering benefits like cost reduction and improved security through role separation. The shared state structure acts as a communication protocol, ensuring reliable data exchange between components and enabling the Routers to function effectively.