Skip to content

qodo-ai/pr-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
image GitHub

๐Ÿš€ The first AI Code Reviewer

PR-Agent is an open-source, AI-powered code review agent. It is a legacy project of Qodo that is now maintained by the community.

NOTE: It is not related to the main product offering of Qodo's code review product.

Qodo now offers a free tier for AI code review to easily integrate with GitHub, GitLab, Bitbucket, and Azure DevOps, with feature-rich capabilities for high-quality context-aware code reviews.

Table of Contents

Getting Started

๐Ÿš€ Quick Start for PR-Agent

1. Try it Instantly (No Setup)

Test PR-Agent on any public GitHub repository by commenting @CodiumAI-Agent /improve

2. GitHub Action (Recommended)

Add automated PR reviews to your repository with a simple workflow file:

# .github/workflows/pr-agent.yml
name: PR Agent
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  pr_agent_job:
    runs-on: ubuntu-latest
    steps:
    - name: PR Agent action step
      uses: Codium-ai/pr-agent@main
      env:
        OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Full GitHub Action setup guide

3. CLI Usage (Local Development)

Run PR-Agent locally on your repository:

pip install pr-agent
export OPENAI_KEY=your_key_here
pr-agent --pr_url https://github.com/owner/repo/pull/123 review

Complete CLI setup guide

4. Other Platforms

Why Use PR-Agent?

๐ŸŽฏ Built for Real Development Teams

Fast & Affordable: Each tool (/review, /improve, /ask) uses a single LLM call (~30 seconds, low cost)

Handles Any PR Size: Our PR Compression strategy effectively processes both small and large PRs

Highly Customizable: JSON-based prompting allows easy customization of review categories and behavior via configuration files

Platform Agnostic:

  • Git Providers: GitHub, GitLab, BitBucket, Azure DevOps, Gitea
  • Deployment: CLI, GitHub Actions, Docker, self-hosted, webhooks
  • AI Models: OpenAI GPT, Claude, Deepseek, and more

Open Source Benefits:

  • Full control over your data and infrastructure
  • Customize prompts and behavior for your team's needs
  • No vendor lock-in
  • Community-driven development

Features

PR-Agent offers comprehensive pull request functionalities integrated with various git providers:

GitHub GitLab Bitbucket Azure DevOps Gitea
TOOLS Describe โœ… โœ… โœ… โœ… โœ…
Review โœ… โœ… โœ… โœ… โœ…
Improve โœ… โœ… โœ… โœ… โœ…
Ask โœ… โœ… โœ… โœ…
โฎ‘ Ask on code lines โœ… โœ…
Help Docs โœ… โœ… โœ…
Update CHANGELOG โœ… โœ… โœ… โœ…
USAGE CLI โœ… โœ… โœ… โœ… โœ…
App / webhook โœ… โœ… โœ… โœ… โœ…
Tagging bot โœ…
Actions โœ… โœ… โœ… โœ…
CORE Adaptive and token-aware file patch fitting โœ… โœ… โœ… โœ…
Chat on code suggestions โœ… โœ…
Dynamic context โœ… โœ… โœ… โœ…
Fetching ticket context โœ… โœ… โœ…
Incremental Update โœ…
Interactivity โœ… โœ…
Local and global metadata โœ… โœ… โœ… โœ…
Multiple models support โœ… โœ… โœ… โœ…
PR compression โœ… โœ… โœ… โœ…
RAG context enrichment โœ… โœ…
Self reflection โœ… โœ… โœ… โœ…

See It in Action




Try It Now

Try the GPT-5 powered PR-Agent instantly on your public GitHub repository. Just mention @CodiumAI-Agent and add the desired command in any PR comment. The agent will generate a response based on your command. For example, add a comment to any pull request with the following text:

@CodiumAI-Agent /review

and the agent will respond with a review of your PR.

Note that this is a promotional bot, suitable only for initial experimentation. It does not have 'edit' access to your repo, for example, so it cannot update the PR description or add labels (@CodiumAI-Agent /describe will publish PR description as a comment). In addition, the bot cannot be used on private repositories, as it does not have access to the files there.

How It Works

The following diagram illustrates PR-Agent tools and their flow:

PR-Agent Tools

Data Privacy

Self-hosted PR-Agent

Contributing

To contribute to the project, get started by reading our Contributing Guide.

โค๏ธ Community

This open-source release remains here as a community contribution from Qodo โ€” the origin of modern AI-powered code collaboration. Weโ€™re proud to share it and inspire developers worldwide.

The project now has its first external maintainer, Naor (@naorpeled), and is currently in the process of being donated to an open-source foundation.