Self-hosted multi-repo AI code review: org service tree

Kramlipi code-agent now maps your GitHub organization to logical services and repos, keeps that context on your infrastructure, and uses it to enrich AI code review and CI fix runs across a multi-repo setup.

You run one binary on your laptop, CI runner, or team console VM. Kramlipi does not host your code tree in our cloud.


The problem

Most AI code review tools work on one repo at a time. Platform teams ship many repos under one GitHub org — API, web, shared libraries, infra.

Without org context, reviews miss:

  • Contract breaks between sibling repos in the same service
  • Blast radius when a shared library changes
  • Which team owns a failing integration

Tools like CodeRabbit (default SaaS) clone your repo into their cloud, build an index, and store learnings on their servers.

Kramlipi keeps your service tree on infrastructure you control — your laptop, CI runner, or team VM.


What is the org service tree?

A structured map from your GitHub org to services and repos:

acme (GitHub org)
├── Core API        → api, shared-lib
├── Web & clients   → web, mobile-bff
└── Platform & CI   → infra, workflows

When you review or fix code in one repo, the agent knows:

  • Which service owns the active repo
  • Which sibling repos might be affected
  • When to flag cross-repo contract risk in the review

Where data is stored

DataLocation
Service tree~/.code-agent/org/<org>/context.json
Managed clones~/.code-agent/repos/<org>--<repo>/
Review learnings<repo>/.code-agent/review-memory.json
Flaky test memory<repo>/.code-agent/memory.sqlite or your Postgres

Kramlipi does not run a central code index. Your tree and clones stay on disks you control.

What the agent sees

Each code review and fix run includes org context in the prompt — organization, active repo, owning service, and sibling repos — so the reviewer can call out cross-repo blast radius.

Current limit: the agent edits the active workspace only. The tree guides scope and cross-repo warnings; it does not write to multiple repos in one run.


Console setup (5 steps)

  1. Start the UI (see deployment options below)
  2. Open Org → Service tree in the left rail
  3. Enter your GitHub org → Load
  4. Assign repos to each service → Save tree
  5. Onboard all repos — bulk clone into the managed workspace

Admin actions (save, onboard) work on localhost by default, or set CODE_AGENT_ALLOW_UI_ADMIN=1 on a trusted private network.


Two ways to run it

Kramlipi ships as one binary: ghcr.io/kramlipi/code-agent. There is no Kramlipi SaaS that stores your code.

Option 1 — Agent on your infra

Best for: every PR in CI, red-build repair, CLI users.

ShapeHow to start
Laptop./code-agent experts run code-review --pr 42 -w .
GitHub Actionsdocker run ghcr.io/kramlipi/code-agent:latest …
Local UIbash scripts/docker-ui.shhttp://127.0.0.1:8080

Org tree lives at ~/.code-agent/org/. Flaky memory defaults to SQLite per repo.

Option 2 — Team console on your infra

Best for: eng managers, multi-repo onboarding, shared flake admin.

export GEMINI_API_KEY=your-key
bash scripts/docker-console.sh

Opens http://127.0.0.1:8080 with:

  • Browser console (chat, org tree, flake admin)
  • Postgres for shared test memory across repos
  • Docker volumes for org tree and managed repo clones

Deployment path: dev laptop → team VM → k8s + managed Postgres → air-gapped + local LLM.


Kramlipi vs CodeRabbit — where your code lives

CodeRabbit (SaaS)CodeRabbit (self-hosted)Kramlipi Option 1Kramlipi Option 2
Repo clone / indexTheir cloudYour VPCYour runner / diskYour console VM
Org / service contextTheir platformYour deployment~/.code-agent/org/Same + UI onboard
InstallGitHub AppEnterprise containerBinary / Actiondocker-console.sh
Fix red CI to greenComments-focusedVariesYes (verify-cmd)Yes (verify-cmd)

CodeRabbit builds deep context in their cloud by default. Kramlipi keeps your org service tree on your infra and proves fixes when your tests pass.


Quick start

Prerequisites: GEMINI_API_KEY (or OpenAI / Anthropic), Docker for UI paths, gh auth login or GH_TOKEN for org repo pull.

Fastest demo (~5 min):

export GEMINI_API_KEY=your-key
bash scripts/docker-ui.sh

Open http://127.0.0.1:8080Org → Service tree.

Team console with Postgres:

export GEMINI_API_KEY=your-key
bash scripts/docker-console.sh

CI only (no UI): see Get started.


API

MethodPathDescription
GET/api/org/context?org=acmeLoad tree + prompt preview
PUT/api/org/contextSave service tree (admin)
POST/api/org/onboardBulk clone mapped repos (admin)

Example:

curl -X PUT http://127.0.0.1:8080/api/org/context \
  -H 'Content-Type: application/json' \
  -d '{
    "org": "acme",
    "services": [
      {"id": "service-1", "name": "Core API", "repos": [{"name": "api"}]},
      {"id": "service-2", "name": "Web", "repos": [{"name": "web"}]},
      {"id": "service-3", "name": "Platform", "repos": []}
    ]
  }'

FAQ

Does Kramlipi host my code or org service tree?
No. The service tree, cloned repos, and test memory live on your laptop, CI runner, or team console VM.

How is this different from CodeRabbit?
Kramlipi keeps context on your infrastructure and adds verify-gated CI repair — success means your test command exits 0, not just PR comments.

Can I use this without the browser UI?
Yes. Edit ~/.code-agent/org/<org>/context.json directly or use the HTTP API above.

Does the agent edit multiple repos at once?
Not in v1. The tree enriches review and fix prompts. Edits happen in the active workspace only.

What GitHub permissions are needed?
Read access for PR review and org repo listing. Write access only if you publish verified draft PRs.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top