Skip to main content
logo
CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by providing AI feedbacks and suggestions

GitHub license Static Badge Discord Twitter GitHub

Documentation

  • See the Installation Guide for instructions on installing PR-Agent on different platforms.

  • See the Usage Guide for instructions on running PR-Agent tools via different interfaces, such as CLI, PR Comments, or by automatically triggering them when a new PR is opened.

  • See the Tools Guide for a detailed description of the different tools, and the available configurations for each tool.

Table of Contents

News and Updates

May 19, 2024

GPT-4o is now the default fast model ("Turbo"). This model will be used for all commands except review and improve, which will still use "GPT-4-2024-04-09", since they are harder and would still benefit from the larger model.

May 12, 2024

Inspired by AlphaCodium flow engineering scheme, PR-Agent now performs self-reflection on the code suggestions it provides, enabling to remove invalid suggestions, and score the valid ones. The suggestions will be presented sorted by their score, enabling to focus on the most important ones first.

You can also choose to automatically remove suggestions below a certain importance score threshold, by setting the pr_code_suggestions.suggestions_score_threshold configuration.

May 2, 2024

Check out the new PR-Agent Chrome Extension 🚀🚀🚀

This toolbar integrates seamlessly with your GitHub environment, allowing you to access PR-Agent tools directly from the GitHub interface. You can also easily export your chosen configuration, and use it for the automatic commands.

Overview

Supported commands per platform:

GitHub Gitlab Bitbucket Azure DevOps
TOOLS Review
⮑ Incremental
SOC2 Compliance 💎
Describe
Inline File Summary 💎
Improve
⮑ Extended
Ask
Ask on code lines
Custom Prompt 💎
Test 💎
Reflect and Review
Update CHANGELOG.md
Find Similar Issue
Add PR Documentation 💎
Custom Labels 💎
Analyze 💎
CI Feedback 💎
Similar Code 💎
USAGE CLI
App / webhook
Tagging bot
Actions
CORE PR compression
Repo language prioritization
Adaptive and token-aware file patch fitting
Multiple models support
Static code analysis 💎
Global and wiki configurations 💎
PR interactive actions 💎

Auto Description (/describe): Automatically generating PR description - title, type, summary, code walkthrough and labels.
Auto Review (/review): Adjustable feedback about the PR, possible issues, security concerns, review effort and more.
Code Suggestions (/improve): Code suggestions for improving the PR.
Question Answering (/ask ...): Answering free-text questions about the PR.
Update Changelog (/update_changelog): Automatically updating the CHANGELOG.md file with the PR changes.
Find Similar Issue (/similar_issue): Automatically retrieves and presents similar issues.
Add Documentation 💎 (/add_docs): Generates documentation to methods/functions/classes that changed in the PR.
Generate Custom Labels 💎 (/generate_labels): Generates custom labels for the PR, based on specific guidelines defined by the user.
Analyze 💎 (/analyze): Identify code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component.
Custom Prompt 💎 (/custom_prompt): Automatically generates custom suggestions for improving the PR code, based on specific guidelines defined by the user.
Generate Tests 💎 (/test component_name): Generates unit tests for a selected component, based on the PR code changes.
CI Feedback 💎 (/checks ci_job): Automatically generates feedback and analysis for a failed CI job.
Similar Code 💎 (/find_similar_component): Retrieves the most similar code components from inside the organization's codebase, or from open-source code.


Example results

/describe


/review


/improve


/generate_labels


Try it now

Try the GPT-4 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

Review generation process

To set up your own PR-Agent, see the Installation section below. Note that when you set your own PR-Agent or use CodiumAI hosted PR-Agent, there is no need to mention @CodiumAI-Agent .... Instead, directly start with the command, e.g., /ask ....


PR-Agent Pro 💎

PR-Agent Pro is a hosted version of PR-Agent, provided by CodiumAI. It is available for a monthly fee, and provides the following benefits:

  1. Fully managed - We take care of everything for you - hosting, models, regular updates, and more. Installation is as simple as signing up and adding the PR-Agent app to your GitHub\GitLab\BitBucket repo.
  2. Improved privacy - No data will be stored or used to train models. PR-Agent Pro will employ zero data retention, and will use an OpenAI account with zero data retention.
  3. Improved support - PR-Agent Pro users will receive priority support, and will be able to request new features and capabilities.
  4. Extra features -In addition to the benefits listed above, PR-Agent Pro will emphasize more customization, and the usage of static code analysis, in addition to LLM logic, to improve results. See here for a list of features available in PR-Agent Pro.

How it works

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

PR-Agent Tools

Check out the PR Compression strategy page for more details on how we convert a code diff to a manageable LLM prompt

Why use PR-Agent?

A reasonable question that can be asked is: "Why use PR-Agent? What makes it stand out from existing tools?"

Here are some advantages of PR-Agent:

  • We emphasize real-life practical usage. Each tool (review, improve, ask, ...) has a single GPT-4 call, no more. We feel that this is critical for realistic team usage - obtaining an answer quickly (~30 seconds) and affordably.
  • Our PR Compression strategy is a core ability that enables to effectively tackle both short and long PRs.
  • Our JSON prompting strategy enables to have modular, customizable tools. For example, the '/review' tool categories can be controlled via the configuration file. Adding additional categories is easy and accessible.
  • We support multiple git providers (GitHub, Gitlab, Bitbucket), multiple ways to use the tool (CLI, GitHub Action, GitHub App, Docker, ...), and multiple models (GPT-4, GPT-3.5, Anthropic, Cohere, Llama2).

Data privacy

Self-hosted PR-Agent

CodiumAI-hosted PR-Agent Pro 💎

  • When using PR-Agent Pro 💎, hosted by CodiumAI, we will not store any of your data, nor will we use it for training. You will also benefit from an OpenAI account with zero data retention.

  • For certain clients, CodiumAI-hosted PR-Agent Pro will use CodiumAI’s proprietary models — if this is the case, you will be notified.

  • No passive collection of Code and Pull Requests’ data — PR-Agent will be active only when you invoke it, and it will then extract and analyze only data relevant to the executed command and queried pull request.

PR-Agent Chrome extension

  • The PR-Agent Chrome extension serves solely to modify the visual appearance of a GitHub PR screen. It does not transmit any user's repo or pull request code. Code is only sent for processing when a user submits a GitHub comment that activates a PR-Agent tool, in accordance with the standard privacy policy of PR-Agent.

Links

Join our Discord community

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pr_agent-0.2.2.tar.gz (140.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pr_agent-0.2.2-py3-none-any.whl (177.2 kB view details)

Uploaded Python 3

File details

Details for the file pr_agent-0.2.2.tar.gz.

File metadata

  • Download URL: pr_agent-0.2.2.tar.gz
  • Upload date:
  • Size: 140.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.9

File hashes

Hashes for pr_agent-0.2.2.tar.gz
Algorithm Hash digest
SHA256 29bbd4ced10e0960e8b21f1e589ba70f4b5759621bf9eef46cf417b1ff5bb866
MD5 1f0f04751b3ebe8fcec3f1ba48a5a43b
BLAKE2b-256 0d2c4236049e66f5ba5e1076a57b7cd023b846b8d6776501ed5bcb5abe4d6e92

See more details on using hashes here.

File details

Details for the file pr_agent-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pr_agent-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 177.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.9

File hashes

Hashes for pr_agent-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 14a56d370e335ee12b2341364ba0945a8caef4b5d0af6d89df29939d38ccb7fc
MD5 fbf166a7ed124b3ff1e065134d3b1024
BLAKE2b-256 88888c1e6e12fc89d8c562be24c6669451cc5bb2797db7580e30c47504687037

See more details on using hashes here.

Release history Release notifications | RSS feed

0.44.0

2 files

0.43.0

2 files

0.42.0

2 files

0.41.0

2 files

0.40.0

2 files

0.39.0

2 files

0.38.0

2 files

0.37.0

2 files

0.36.1

2 files

0.36.0

2 files

0.35.0

2 files

0.34.3

2 files

0.34.2

2 files

0.34.1

2 files

0.3.0

2 files

0.2.7

2 files

0.2.4

2 files

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

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