Orbit + DAP Integration Epic
## Goal
Get Orbit's two tools, called `get_graph_schema` and `query_graph`, into the Duo Agent Platform so agents can query structured graph data. In early testing, this cuts tool-call volume and gives agents better answers by providing relational data in one shot.
Related design doc: [ADR 006 (MR !709)](https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/merge_requests/709)
Related notes: [Orbit + DAP Agents meeting notes](https://docs.google.com/document/d/1-3WSWop_jOULvrmcm9O-NyfjS1D_mfqY-yGNrjz0a8M/edit)
| Channel | Path | Auth Mechanism | Billing Model | Status |
|---------|------|----------------|---------------|--------|
| **DAP (DWS)** | User -> Rails -> DWS -> Rails -> GKG | User OAuth token (`ai_workflows` scope) | Zero-rated / bundled with Duo seat | **This epic** |
| **Frontend (Dashboard)** | User -> Rails -> GKG (gRPC) | User JWT (HS256, existing) | N/A (included in license) | Implemented |
| **Core Feature** | Internal Rails service -> GKG | System JWT (HS256, existing) | N/A (infrastructure) | Implemented |
| **External Agents (MCP, glab cli)** | Agent -> Rails OAuth -> GKG | OAuth + User JWT (existing) | Metered / paid add-on | Implemented |
---
## How Orbit tools work
Two tools, dynamically fetched so agents always get the latest schema:
- **`get_graph_schema`**: returns the ontology (domains, node types, edges). Supports progressive disclosure: first call returns a compact listing, second call with \`expand_nodes\` returns full property details for only the types you need.
- **`query_graph`**: executes a graph query using a condensed DSL (~3k tokens). The agent constructs the query itself. Supports traversal (multi-hop), aggregation, search, pathfinding, and neighbor queries.
Both tools are served by GKG and proxied through Rails. DWS calls them via the existing Orbit REST API (`/api/v4/orbit/*`) using the user's OAuth token. Fallback to `GitLabApiGet` (full REST API) for entities not yet in the graph.
---
## Product plan
### Step 1: add Orbit Agent (custom agent with Orbit tools) and Integrate Duo Developer Agent
Create a new "Orbit Agent" with:
- Orbit's two tools (`get_graph_schema`, `query_graph`)
- The existing \`get_tool\` (GitLabApiGet) for REST API fallback
- Mutation tools (create MR, update issue, etc.) as needed
- A system prompt tailored for Orbit tool selection, replication lag handling, and progressive disclosure
Users can also create custom agents in the catalog using Orbit tools.
### Step 2: compare against baseline
Run Duo Evals comparing the Orbit Agent vs. the base chat agent:
- Measure tool call reduction (target: 30%+)
- Measure response accuracy (target: no regression)
- Measure latency impact
- Validate fallback behavior on replication lag
### Step 3: Integrate into all Duo Agents
When eval results are satisfactory, make Orbit tools part of the default Duo agent. The existing toggle/feature flag controls rollout. Foundational agents (Planner, Security, etc.) can adopt Orbit tools based on per-agent eval results.
https://gitlab.com/gitlab-org/gitlab/-/work_items/597644
---
## Rollout
| Phase | Target | What |
|-------|--------|------|
| Phase 1 | Early April 2026 | MCP proof of concept on staging, Orbit Agent in catalog, initial Duo Evals |
| Phase 2 | End of April 2026 | Native DWS tools, production feature flag |
| Phase 3 | May 2026 | All Agents, admin toggle, GA, billing event tracking |
---
## Open questions
| Question | Status |
|----------|--------|
| Subagent paradigm impact? | Build standalone tools first; subagent wiring is additive (18.11 target) |
<!-- AI-Sessions
dir: ~/.claude/projects/-Users-angelo-rivera-gitlab-gitlab-work/
072589bb-ec19-47d5-9650-45f11aad45c6.jsonl (2026-03-26)
-->
epic