← Blog

Engineering note

GitLab Orbit In-Depth: Building a Software Development Lifecycle Knowledge Graph for the AI Era

GitLab Orbit In-Depth: Building a Software Development Lifecycle Knowledge Graph for the AI Era AI Agent Practice Bloss0m Note 036

In modern software development, development teams generate massive amounts of data every day: from code commits, merge requests, and CI/CD pipelines to issue tracking (Work Items) and security scan results.

Connecting this scattered information is not only a challenge for developers but also a fatal flaw for AI Coding Agents eager to deeply understand the project’s context. Traditional AI Agents can only guess code relationships based on string retrieval (RAG), often lacking real DevOps context.

To solve this problem of “context fragmentation,” GitLab introduced GitLab Orbit.

What is GitLab Orbit? Underlying Schema Analysis

GitLab Orbit is a Context Property Graph purpose-built for the Software Development Lifecycle (SDLC).

Using an asynchronous, event-driven architecture, it scans and indexes your GitLab instance in real-time, mapping all entities into nodes and edges within a graph database.

Orbit’s Standardized Graph Schema

Underneath Orbit, all DevOps artifacts are standardized into the following core entities:

  • CodeNode: Represents functions, classes, and files.
  • ActionNode: Represents Commits, MRs, and Pipeline Runs.
  • IdentityNode: Represents developers, teams, and reviewers.
  • SecurityNode: Represents vulnerability reports from SAST/DAST scans.

Through this structured data association, Orbit can use standard SQL or graph query languages (like Cypher) to answer multi-hop relationship questions that traditional RAG systems cannot solve. For example:

“Find the code snippets in this microservice that caused CI/CD failures in the past 30 days, and tell me which engineers submitted them.”

Two Enterprise-Grade Deployment Architectures: Remote and Local

To meet the needs of large-scale analysis for multinational enterprises and lightning-fast queries for local developers, Orbit adopts a dual-storage-engine architecture:

1. Orbit Remote (Cloud Managed: ClickHouse Engine)

This is the central brain hosted by GitLab (or deployed on-premises). It relies on the incredibly powerful ClickHouse columnar database to store massive graph relationships.

  • Use Cases: Large-scale queries across projects and organizational levels, and traceability analysis of security vulnerabilities.
  • Data Synchronization: Real-time streaming writes via GitLab Webhooks and Kafka.

2. Orbit Local (Local Execution: DuckDB Engine)

For developers who prefer local development or prioritize privacy, Orbit provides a lightweight single-binary CLI. It can quickly convert the current Git repository into a “Code-only graph” on the developer’s local machine using DuckDB.

  • Use Cases: Enabling AI Agents to query code dependencies at lightning speed within a local IDE, with zero network latency.

Integrating the MCP Protocol: “First-Party Context” for the AI Era

The greatest potential of GitLab Orbit lies in its ability to provide absolutely precise first-party context to AI tools (such as GitLab Duo or third-party Agents like Cursor).

When facing massive projects, traditional AI needs to consume a large amount of API Tokens to “blindly read” irrelevant code, sometimes even hallucinating. GitLab Orbit, however, natively supports the industry-standard MCP (Model Context Protocol).

Practical Example: Integrating Orbit into Cursor

By simply adding the Orbit Server configuration to an MCP-supported editor, your AI assistant instantly gains a God’s-eye view. Below is an example configuration for .cursor/mcp.json:

{
  "mcpServers": {
    "gitlab-orbit": {
      "command": "orbit-cli",
      "args": ["mcp-server", "--repo-path", "./", "--remote-url", "https://gitlab.com/api/orbit"],
      "env": {
        "GITLAB_TOKEN": "<YOUR_ACCESS_TOKEN>"
      }
    }
  }
}

Once configured, when you ask the AI in your editor: “Why is this API returning a 500 error?” The AI Agent will first send a query to Orbit via MCP, and Orbit will immediately return:

  1. The latest Commit related to this API (3 hours ago).
  2. The corresponding Merge Request (ID #1234).
  3. The CI test records from that MR (showing that database connection tests were unstable).

Based on this irrefutable real-world DevOps data, the AI can then give you the most accurate answer.

Conclusion

As Agentic AI matures, development competition is no longer just about “whose model is smarter,” but rather “who can provide the AI with more precise, lower-noise project knowledge.” GitLab Orbit perfectly integrates code with the software development lifecycle, laying a solid data foundation for future automated development. If you are a GitLab user, it is highly recommended to start exploring the seamless AI development experience that Orbit brings!

For speaking invitations, internal engineering sessions, or architecture exchange, see the topics and public work I can bring into the conversation.

Speaking & contact