跳到正文
Hacker News · AI· vrajpal-jhala·· 3 小时前AI 评分63

Langgraph-harness:面向 GitLab 合并请求的自托管 AI 智能体开源发布

Show HN: Langgraph-harness - self-hosted AI agent for GitLab merge requests

AI 导读

作者发布开源项目 langgraph-harness,一个基于 LangGraph 构建、面向 GitLab 的自托管 AI 编码智能体平台,可自动审查合并请求、处理工作项与任务,并提供具备完整项目上下文的对话能力。

正文

langgraph-harness logo

Self-hosted AI coding agent platform for GitLab, built with LangGraph

Reviews merge requests, resolves work items and tasks autonomously, and chats with full project context — remembering what matters so every run builds on the last.

Battle-tested in production since mid-2026 — 133 releases, 1k+ reviews, 67% comment acceptance rate (Sept 29 2026, see snapshot). Development history → every failure and fix, documented.

License: MIT Node Docs

Docs · Getting Started · Features · Screenshots · Screencasts

readme-demo.mp4

Not affiliated with LangChain. See DISCLAIMER.md.


What it does

Four harnesses, one shared foundation:

  • 🔍 MR Review — fires on webhook events, reads the diff, drafts comments, publishes them. No polling, no manual trigger.
  • 🛠️ Work Item Resolve — assign a GitLab issue or task and get an agent that runs inside its own Kata Containers VM (a dedicated guest kernel per sandbox, not just syscall interception), opens a draft MR, and keeps responding to follow-up comments on the same branch.
  • 📋 Task Resolve — the same sandboxed loop, started from a free-text instruction instead of a GitLab issue — on demand or on a recurring schedule.
  • 💬 Chat — an interactive, GitLab-aware assistant with real tool access: GitLab data, a headless browser, its own review/chat history; sensitive tool calls pause for explicit human approval before running.

Shared foundation: every drafted comment is screened before it posts; a run that misbehaves (repeats a call, loops, ends on a question, skips a check) gets caught and corrected mid-run — backed by persistent checkpoints, so a run resumes instead of restarting from scratch.

Full breakdown: Features · Architecture

Screenshots

Real production analytics, Sept 29 2026 snapshot: 1k+ reviews, 67% comment acceptance rate Real production analytics detail, Sept 29 2026 snapshot: reliability, efficiency, and guardrail health

More in the screenshots gallery.

Roadmap

  • Automatic MR reviews, issue-to-draft-MR, on-demand tasks, and a GitLab-aware chat
  • Isolated sandbox for code-changing runs, with human approval before Chat takes sensitive actions
  • Project memory that carries across reviews, and crashed runs that resume instead of restarting
  • Recurring scheduled tasks
  • GitHub support: assign an issue to the bot, get a draft PR (#35)
  • Project memory that keeps itself up to date, with visibility into what it learned (#2)
  • A self-hosted memory engine that links related facts and retrieves them by relevance (#1)
  • Web search, so agents can look things up instead of only fetching a known page (#24)

Everything else is tracked in open issues.

Stack

  • Frontend — React admin UI (Dashboard, Threads, Chat, Workflows) for monitoring runs and chatting directly with the agent
  • Backend — Elysia API server running a LangGraph agent with persistent checkpoints
  • Agent — Multi-provider LLM (OpenRouter, Gemini, Groq, Ollama, or sglang) with GitLab MCP tools and skill-based workflows
  • Queue — BullMQ; debounced re-reviews, capped concurrency, live queue state in the UI
  • Memory — context engineering for GitLab: durable, project-scoped facts learned across reviews; personal memory in Chat

Quick Start

Prerequisites: Node.js 22+, Docker, a GitLab PAT (api scope), a GitLab OAuth app, and an OpenRouter/Gemini/Groq key or a local Ollama/sglang instance.

npm install
cp backend/.env.example backend/.env
# fill in GITLAB_PAT, GITLAB_OAUTH_CLIENT_ID/SECRET, SESSION_SECRET, SECRETS_ENCRYPTION_KEY,
# ADMIN_GITLAB_USERNAMES, and one of OPENROUTER_API_KEY / GEMINI_API_KEY / GROQ_API_KEY / OLLAMA_BASE_URL / SGLANG_BASE_URL
npm run dev

Frontend at http://localhost:5173, API at http://localhost:3698.

Full walkthrough — GitLab OAuth app setup, webhook config, per-repo .harness.yml: Getting Started.

Deployment & CI/CD

Self-hosted via Docker Compose; production deploys are automated through GitLab CI on push. See Deployment for server setup, and sglang Deployment if self-hosting the LLM backend.

The Story

Curious how this got built? The Story So Far.


"LangGraph" is a trademark of LangChain, Inc., used here under nominative fair use to describe the framework this project is built on. This project is independent and not affiliated with LangChain, Inc. — see DISCLAIMER.md. Licensed under the MIT License.

来源:Hacker News · AI · github.com