About the Project: Guru — The Autonomous GitLab Duo Agent

Inspiration

The inspiration for Guru was born from a frustration shared by many developers: the "isolated AI" problem. While AI coding assistants are powerful, they often live in sidebars or separate chat windows, requiring manual copy-pasting, committing, and testing.

We wanted to build a proactive digital teammate that lives directly within the GitLab ecosystem. Inspired by the concept of "Level 4" autonomous agents, Guru doesn't just suggest code; it listens to your GitLab Issues, plans the implementation, and submits a verified Merge Request automatically—leaving you to just click "Approve."

How It Was Built

Guru is architected around a Waterfall Orchestrator, written in TypeScript using Node.js. It features a decentralized system where a central orchestrator delegates work to specialized agents:

  • The Brain (Reasoner): Uses the DeepSeek-R1 model for deep problem deconstruction.
  • The Planner (Documentator): Generates architectural blueprints.
  • The Hand (Coder): Interacts with the GitLab REST v4 API to create branches and commits.
  • The Critic (Verifier): Monitors CI/CD pipelines and runs tests.

Mathematics of Autonomy

To ensure reliability, we modeled the success rate of an autonomous fix, \( R_{fix} \), as a chain of probabilities based on the four stages of the Waterfall:

$$ R_{fix} = P(\text{Analysis}) \cdot P(\text{Planning}) \cdot P(\text{Code}) \cdot P(\text{Test}) $$

By implementing Deep Reasoning at the Analysis step, we maximize the first term, ensuring every subsequent step follows a logical and verified plan.

Key Logic Example

Here is how Guru identifies its target from an issue webhook:

export function getJobKey(event) {
  const kind = event.object_kind;
  // Handle both issue events and their associated comments (notes)
  if (kind === 'note') {
    const iid = event.issue?.iid || event.merge_request?.iid;
    return `note-${iid}`;
  }
  return `${kind}-${event.object_attributes?.iid}`;
}

Built With

Share this project:

Updates