The Problem
Every software team shares the same quiet fear: what happens when the person who really understands the codebase leaves?
The code stays. The why walks out the door. Why was this service split from the monolith? Why does this function have three special cases that look redundant but are absolutely critical? That knowledge lives in one or two people's heads — and when they leave, the team is left guessing.
New developers spend weeks getting up to speed. Technical debt accumulates silently. Senior engineers become bottlenecks. This is one of the most universal and expensive problems in software engineering — and it is finally solvable.
The Solution
AI Engineering Teammate is an Orbit-native multi-agent system built on the GitLab Duo Agent Platform. It acts as a virtual senior engineer that has read every file, traced every MR, and understood every architectural decision in your project.
Four specialized agents work together:
🔍 Health Inspector — Scores codebase health out of 100. Identifies risks with severity levels (HIGH / MEDIUM / LOW) and produces a prioritized action plan naming specific files and functions.
📜 Project Historian — Traces the evolution of the codebase through MR history and commit patterns. Answers the question every new developer asks: "Why was this built this way?"
🎓 Developer Mentor — Produces a personalized onboarding guide with an ordered reading path, complexity warnings, and a concrete first-week checklist for new developers.
🏛️ Engineering Manager — The LangGraph orchestrator. Coordinates all three agents and synthesizes their outputs into one unified executive report with an overall health score and master action plan.
Mention @engineering-teammate in any MR and the system automatically analyzes the
codebase and posts a structured engineering review as a comment.
Why Orbit Makes This Different
This is not a RAG system. We do not chunk files into a vector database — that approach destroys the relationships between code entities and produces generic outputs.
GitLab Orbit provides a queryable knowledge graph of the entire codebase and its SDLC
history. One glab orbit local index command indexed our project into 36 files,
67 definitions, 33 imported symbols, and 365 relationships.
Every agent queries Orbit directly — no custom scrapers, no regex parsing. The Health Inspector runs SQL against the local DuckDB graph. The Historian pulls MR history from the GitLab REST API. The Mentor uses the symbol graph to identify entry points and complexity hotspots.
This is why the outputs name actual files and specific functions rather than vague platitudes. Structured context produces structured insight.
How We Built It
| Layer | Technology |
|---|---|
| Knowledge Graph | GitLab Orbit (Local DuckDB + REST API) |
| Agent Platform | GitLab Duo Agent Platform |
| Orchestration | Lang Graph |
| AI Reasoning | Google Gemini 2.5 Flash |
| Backend | Fast API + Python 3.11 |
| Dashboard | Streamlit |
The OrbitContextBridge is the most important architectural decision — a single
Python adapter wrapping all three Orbit access modes. Every agent calls this bridge.
None of them touch Orbit directly. One place to fix if anything changes.
The Engineering Manager uses Lang Graph's stateful graph model to coordinate agents
sequentially, with shared Engineering State flowing through each node and the
synthesizer receiving all three reports to produce the final executive report.
Real Challenges, Real Solutions
Orbit schema discovery — Column names differed from documentation. We queried the schema directly to find the actual structure and rewrote all queries accordingly.
Remote Orbit API access — The /api/v4/orbit/query endpoint requires a paid tier.
We pivoted to the standard GitLab REST API which provides equivalent SDLC data on all tiers.
Windows PATH inheritance — Python subprocess does not inherit terminal PATH on Windows.
Fixed by using the full absolute path to glab.exe in the bridge.
Gemini rate limits — Built automatic retry logic with 30-second backoff into
Base Agent. Every agent retries up to 3 times — resilience in the foundation,
not bolted on afterward.
Real Results
We ran the full system against our own codebase and got genuine results:
- Health Score: 72/100 — correctly identified missing tests for
local_repo_map.pyas HIGH risk and monolithic 600-line scripts as MEDIUM risk - Historian — correctly traced the Bridge pattern in
orbit_bridge.pyand flagged solo-developer bus factor risk - Mentor — produced a 7-section onboarding guide with the right reading order:
README.md→orbit_bridge.py→base_agent.py - Engineering Manager — synthesized all three into a 65/100 overall score with knowledge transfer as Priority 1
Potential Impact
There are over 30 million developers on GitLab. Every one works in a codebase accumulating history and institutional knowledge at risk of being lost.
AI Engineering Teammate does not ask developers to write more documentation — that never works. It automatically extracts and preserves knowledge from artifacts that already exist: the code, the MRs, the issues, the commits — all structured by Orbit.
Future extensions: Security Agent, Release Manager Agent, Bug Investigator Agent, multi-repository group analysis, and production-grade inference with Claude API.
Built With
- fastapi
- gitlabduoagent
- gitlaborbit
- glabcli
- httpx
- langgraph
- python3.11
- streamlit
Log in or sign up for Devpost to join the conversation.