Self-Hosted LangGraph Agent Brings AI Code Review to GitLab
Overview
A new open-source platform called langgraph-harness is bringing autonomous, self-hosted AI code review to the GitLab ecosystem. Developed by developer vrajpal-jhala, the project leverages LangGraph to create an agent that can independently review merge requests, resolve work items, and maintain contextual memory across sessions.
Unlike many AI coding assistants that operate as standalone black boxes, this tool integrates deeply with GitLab’s workflow. It utilizes webhooks to trigger reviews automatically, runs code-changing tasks in isolated Kata Containers, and employs a persistent checkpoint system to resume failed runs rather than restarting them from scratch.
The project has moved through 133 releases since its mid-2026 debut, reporting over 1,000 reviews completed with a 67 percent comment acceptance rate. This trajectory suggests a growing demand for self-hosted, context-aware AI agents that respect data privacy while integrating into existing DevOps pipelines.
Core Functionality
The platform is built around four distinct "harnesses," all sharing a common backend foundation designed to screen outputs and prevent agent hallucination.
Automated MR Reviews
The first harness triggers automatically upon receiving a GitLab webhook event. It reads the code diff, drafts inline comments, and publishes them without requiring manual intervention or continuous polling. This ensures that every merge request receives immediate, consistent feedback based on established project norms.
Isolated Work Item Resolution
For more complex tasks, the Work Item Resolve harness assigns an AI agent to a specific GitLab issue or task. The agent operates within a dedicated sandbox environment—using Kata Containers to provide a guest kernel for each run, rather than relying solely on syscall interception. The agent opens a draft merge request and remains interactive, capable of responding to follow-up comments on that branch until the task is resolved.
On-Demand Task Execution
The Task Resolve feature offers similar sandboxed capabilities but is initiated via free-text instructions rather than a formal GitLab issue. This allows teams to spawn recurring scheduled tasks or ad-hoc coding jobs on demand, extending the agent’s utility beyond standard issue workflows.
Interactive Chat with Guardrails
The fourth component is a Chat interface that provides a GitLab-aware assistant with access to real-time tools. These tools include GitLab data retrieval, a headless browser for research, and access to the agent’s own review history. Crucially, sensitive tool calls require explicit human approval before execution, adding a layer of safety for production environments.
Technical Architecture and Safety
Underpinning these features is a shared foundation focused on reliability and context continuity. Every drafted comment is screened before publication, and any run that exhibits misbehavior—such as repetitive calls, infinite loops, or skipped checks—is caught and corrected in real time.
The system relies on persistent checkpoints, which allow a crashed run to resume from its last valid state rather than discarding all progress. This is supported by a memory engine that learns durable, project-scoped facts across reviews, ensuring the agent “remembers” what matters from one session to the next.
The stack combines a React-based admin frontend with an Elysia API server running the LangGraph agent. Queue management is handled by BullMQ, which supports debounced re-reviews and capped concurrency, while the LLM layer supports multiple providers including OpenRouter, Gemini, Groq, Ollama, and sglang.
"The project employs a persistent checkpoint system to resume failed runs rather than restarting them from scratch, significantly reducing waste in long-running code generation tasks."
Deployment and Accessibility
The platform is designed for self-hosting, primarily through Docker Compose, with production deployments automated via GitLab CI/CD. This approach aligns with the needs of enterprises that require code and commit history to remain within their own infrastructure, avoiding the data leakage risks associated with third-party SaaS AI tools.
Prerequisites for local development include Node.js 22, Docker, a GitLab Personal Access Token with API scope, and an OAuth app configuration. Users must also provide credentials for at least one LLM provider or point the system to a local instance such as Ollama or sglang.
While currently focused on GitLab, the developer’s roadmap indicates future support for GitHub. Planned features include the ability to assign issues to the bot and receive draft pull requests, as well as enhanced project memory systems that can link related facts and retrieve them by relevance.
The project is licensed under the MIT License and is not affiliated with LangChain, though it uses LangGraph under nominative fair use. With its emphasis on isolated sandboxes, human-in-the-loop approvals, and persistent context, langgraph-harness represents a maturing segment of the agentic AI market—one that prioritizes control and auditability alongside automation.
Sources
- 1
Self-Hosted LangGraph Agent Brings AI Code Review to GitLab
https://github.com/vrajpal-jhala/langgraph-harness
Tools mentioned
GEO Radar
https://geodetect.io
Gromore
https://gromore.io
BrandMagnet
https://brandmagnet.ai
Claude Citation Tracker
https://citation.tracker
Gemini Brand Scanner
https://gemini-brand.scanner
Ahrefs
https://ahrefs.com
SEMrush
https://semrush.com
Moz Pro
https://moz.com
SpyFu
https://spyfu.com
SERPstat
https://serpstat.com