Skip to main content

RabbitAI Banner

RabbitAI — AI Code Reviewer

Open-source AI code reviewer that auto-reviews GitHub PRs with zero cost and full self-hosting.

PyPI MIT License Python 3.11 LangGraph Gemini GitHub Stars

---

What is RabbitAI?

RabbitAI is an open-source AI code reviewer. Drop one workflow file into any repo and it reviews every PR automatically catching bugs, security issues, and performance problems — and posts a structured comment directly on the PR.

Unlike other code reviewers, RabbitAI:

  • Builds a knowledge graph of your codebase to detect blast radius of changes
  • Uses mem0 persistent memory to get smarter with every PR it reviews
  • Supports Gemini and OpenAI for both LLM and embeddings fully config-driven
  • Supports ChromaDB, Pinecone, and Qdrant as vector stores
  • Runs as a GitHub Action, MCP server inside Claude/Cursor, or local CLI
  • Runs completely free using Gemini free tier + local ChromaDB

Demo

RabbitAI Demo — real PR review comment

How It Works

PR opened
→ Fetch diff + metadata via GitHub API
→ Build NetworkX file dependency graph (blast radius detection)
→ Classify change type (bug fix / feature / refactor / security)
→ Chunk diff → embed → store in vector DB
→ Load repo memory from mem0 (past learnings)
→ Retrieve relevant chunks via semantic search
→ LLM reviews with full context + memory + graph insights
→ Post structured comment on PR
→ Save new learnings to mem0

Quick Start

Option 1 — GitHub Action (recommended)

Add .github/workflows/review.yml to your repo:

name: RabbitAI Code Review

on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  review:
    runs-on: ubuntu-latest

    permissions:
      pull-requests: write
      contents: read

    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install RabbitAI
        run: pip install rabbitai-reviewer

      - name: Run RabbitAI
        env:
          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          GITHUB_REPOSITORY: ${{ github.repository }}
          PR_NUMBER: ${{ github.event.pull_request.number }}
          VECTOR_STORE_PROVIDER: ${{ vars.VECTOR_STORE_PROVIDER }}
          EMBEDDING_PROVIDER: ${{ vars.EMBEDDING_PROVIDER }}
          EMBEDDING_MODEL: ${{ vars.EMBEDDING_MODEL }}
          LLM_PROVIDER: ${{ vars.LLM_PROVIDER }}
          LLM_MODEL: ${{ vars.LLM_MODEL }}
          REVIEW_LANGUAGE: ${{ vars.REVIEW_LANGUAGE }}
        run: |
          python -c "
          import os
          from rabbitai.agent import run
          result = run(os.environ['GITHUB_REPOSITORY'], int(os.environ['PR_NUMBER']))
          print(result.comment_url if result.posted else result.reason)
          "

Add GEMINI_API_KEY to your repo secrets get one free at aistudio.google.com.

GITHUB_TOKEN is injected automatically. Open a PR done.


Option 2 — Local CLI

git clone https://github.com/nikhilsaiankilla/rabbitai
cd rabbitai
pip install rabbitai-reviewer
cp config.example.yaml config.yaml
# fill in your config.yaml
# test.py
from rabbitai.agent import run

result = run(repo_name="your-username/your-repo", pr_number=1)
print(result)
python test.py

Stack

Layer Default Alternatives
LLM Gemini 2.0 Flash (free) GPT-4.1-mini
Embeddings Gemini embedding-001 (free) text-embedding-3-small
Vector store ChromaDB (local, free) Pinecone, Qdrant
Memory mem0 (local, free) —
Dependency graph NetworkX (free) —
Workflow LangGraph (free) —
Total $0/month

Configuration

Copy config.example.yaml to config.yaml and fill in your values.

github_token: "" # local dev only Actions injects GITHUB_TOKEN automatically
gemini_api_key: "" # free at aistudio.google.com

embedding:
  provider: "gemini" # gemini | openai
  model: "" # leave empty for provider default
  api_key: "" # openai only

llm:
  provider: "gemini" # gemini | openai
  model: "" # leave empty for provider default
  api_key: "" # openai only

vector_store:
  provider: "chromadb" # chromadb | pinecone | qdrant
  path: "./chroma_db" # for chromadb only
  collection: "pr-chunks"

memory:
  enabled: true
  repo_context: |
    Describe your repo so RabbitAI understands it from day one.

review:
  language: "typescript"
  focus:
    - bugs
    - security
    - performance
  min_risk_score: 0 # 0 = always post
  post_score: true

All values can be overridden with environment variables. See the full docs for provider setup, dimension reference, and all config options.


Project Structure

rabbitai/
├── .github/
│   └── workflows/
│       ├── review.yml        ← self-review on every PR
│       └── publish.yml       ← auto publish to PyPI on merge to main
├── rabbitai/
│   ├── nodes/
│   │   ├── fetcher.py        ← fetch PR diff + metadata
│   │   ├── graph_builder.py  ← NetworkX dependency graph + blast radius
│   │   ├── classifier.py     ← change type detection
│   │   ├── embedder.py       ← embeddings + vector DB storage
│   │   ├── retriever.py      ← semantic search over stored chunks
│   │   ├── reviewer.py       ← LLM review generation
│   │   └── poster.py         ← GitHub PR comment poster
│   ├── memory/
│   │   └── repo_memory.py    ← mem0 persistent memory
│   ├── mcp/
│   │   └── server.py         ← MCP server for Claude/Cursor
│   ├── utils/
│   │   ├── config.py         ← config loader + env var overrides
│   │   └── prompts.py        ← review prompt templates
│   └── agent.py              ← LangGraph 9-node workflow entry point
├── config.example.yaml
├── pyproject.toml
└── requirements.txt

Roadmap

  • 9-node LangGraph workflow
  • NetworkX knowledge graph + blast radius detection
  • ChromaDB, Pinecone, and Qdrant support
  • Gemini and OpenAI for LLM and embeddings
  • mem0 persistent memory
  • MCP server for Claude/Cursor
  • Published to PyPI — pip install rabbitai-reviewer
  • Auto publish to PyPI on merge to main
  • GitLab and Bitbucket support
  • Web dashboard for review history
  • Slack and Discord notifications
  • Fine-tuned prompts per language

Contributing

PRs welcome. RabbitAI reviews its own PRs.

  1. Fork the repo
  2. Create your branch git checkout -b feat/your-feature
  3. Commit git commit -m 'feat: your feature'
  4. Push and open a PR

License

MIT use it, fork it, self-host it, build on it.


Built by Nikhil Sai · @itzznikhilsai

If this helped you, star the repo ⭐ and share it on X.

Metadata

Release files for rabbitai-reviewer 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rabbitai-reviewer 0.1.6
File Size Uploaded Provenance
rabbitai_reviewer-0.1.6.tar.gz 2.1 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rabbitai-reviewer 0.1.6
File Interpreter ABI Platform
rabbitai_reviewer-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / rabbitai_reviewer-0.1.6.tar.gz

Download URL rabbitai_reviewer-0.1.6.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
4e64bb265279c634084046592bf14de4595807cd9f61a1b07eb2c31f53ae5339
BLAKE2b-256 checksum
How to use checksums
778e256232eb21d75fc73cf5132e5ea17331ce98e3429b21e2a4d8786b3d1dd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / rabbitai_reviewer-0.1.6-py3-none-any.whl

Download URL rabbitai_reviewer-0.1.6-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9b39f48bbdc4f7345ec4cbbbf98cfb88c7a65578026f7640cfe2692e4ea8992
BLAKE2b-256 checksum
How to use checksums
bf140c2416e789093946802ac5522a5e7c50feae9db0c410254e6b3e3050d35e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for rabbitai-reviewer 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page