canonical: https://jentic.com/apis/amazonaws.com/codeguru-reviewer

# AWS Amazon CodeGuru Reviewer

Jentic publishes the only available OpenAPI specification for Amazon CodeGuru Reviewer, keeping it validated and agent-ready. CodeGuru Reviewer runs automated code reviews against repositories hosted in CodeCommit, GitHub, GitHub Enterprise, Bitbucket, and S3. The API associates repositories with the service, triggers full or PR-scoped code reviews, lists recommendations, and captures developer feedback to improve future suggestions.

## For AI agents

Associate repositories with Amazon CodeGuru Reviewer, trigger code reviews, list machine-generated recommendations, and capture feedback. Backed by 14 endpoints covering repository associations, code reviews, and recommendation feedback.

## Scope

Does not handle runtime profiling (use CodeGuru Profiler), source-code hosting, or pipeline orchestration - use for repository associations and automated code review recommendations only.

## Capabilities

- Associate repositories from CodeCommit, GitHub, Bitbucket, or S3 with CodeGuru Reviewer
- Trigger code reviews for full repositories or specific pull request branches
- List recommendations with severity, file location, and suggested remediation text
- Capture thumbs-up or thumbs-down developer feedback on individual recommendations
- Tag repository associations and code review resources for ownership
- Disassociate repositories when the service is no longer needed

## Use cases

### Automated Pre-Merge Code Review

When a pull request is opened, CodeGuru Reviewer runs an automated review that surfaces concurrency issues, AWS best-practice violations, resource leaks, and security smells. Engineering teams call CreateCodeReview with a RepositoryAnalysis or PullRequest type, then poll DescribeCodeReview until State is Completed before fetching results with ListRecommendations. This adds an automated reviewer alongside human reviewers without operating any analysis infrastructure.

Example prompt: Trigger a code review of type RepositoryAnalysis on association arn:aws:codeguru-reviewer:..:assoc/abc and the main branch, then list the resulting recommendations

### Recommendation Feedback Loop

Developers signal whether each CodeGuru recommendation was useful through PutRecommendationFeedback. The feedback (Reactions: ThumbsUp or ThumbsDown) tunes future reviews and is visible across the team. ListRecommendationFeedback exposes aggregate sentiment per recommendation, so an agent can detect patterns where the model consistently produces low-quality output and surface them for review.

Example prompt: Submit ThumbsUp feedback on recommendation ID rec-abc inside code review arn:aws:codeguru-reviewer:..:review/xyz

### Repository Onboarding for Continuous Review

Platform teams onboarding a new repository call AssociateRepository with the source provider details (CodeCommit name, or GitHub/Bitbucket connection ARN). DescribeRepositoryAssociation polls until State is Associated, after which every PR opened on the repository can have a CodeGuru review triggered automatically. ListRepositoryAssociations gives a fleet-wide view of which repos are covered.

Example prompt: Associate a CodeCommit repository named payments-service with CodeGuru Reviewer and wait for the association State to reach Associated

### AI Agent Integration via Jentic

Through Jentic, an AI agent uses CodeGuru Reviewer by searching for an intent like 'run a CodeGuru code review', loading the CreateCodeReview schema, and executing it with a repository association ARN and branch name. Jentic signs the SigV4 request server-side using IAM credentials in your Jentic One instance.

Example prompt: Search Jentic for 'run a CodeGuru code review', load the CreateCodeReview schema, and execute it for the supplied association ARN and a feature branch

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /associations | Associate a repository with CodeGuru Reviewer |
| GET | /associations | List repository associations |
| GET | /associations/{AssociationArn} | Describe a repository association |
| POST | /codereviews | Trigger a code review |
| GET | /codereviews/{CodeReviewArn} | Describe a code review |
| GET | /codereviews/{CodeReviewArn}/Recommendations | List recommendations from a code review |
| PUT | /feedback | Submit feedback on a recommendation |

## Key resources

- **Repository Association** — Associate, describe, list, and disassociate repositories from CodeCommit, GitHub, Bitbucket, or S3
- **Code Review** — Create, describe, and list code reviews on associated repositories
- **Recommendation** — List recommendations from a completed code review
- **Recommendation Feedback** — Submit, describe, and list developer feedback on individual recommendations
- **Tag** — Tag repository associations and code reviews for inventory and access control

## Why Jentic

- **Setup:** Wiring Amazon CodeGuru Reviewer by hand means signing every request with AWS Signature v4 HMAC and targeting the right regional host like codeguru-reviewer.{region}.amazonaws.com before you can associate a repository or start a review. Through Jentic you install once, import Amazon CodeGuru Reviewer from the API Directory, store the AWS access key and secret once, and your agent calls it.
- **Permission scoping:** CodeGuru Reviewer puts the association and review ARN in the URL path (/associations/{AssociationArn}, /codereviews/{CodeReviewArn}), but those ARNs are minted by AWS at creation time rather than chosen by you, so the honest control is by operation. You limit the agent to the operations it needs, such as CreateCodeReview or ListRecommendations, so DisassociateRepository is not included unless you add it.
- **Credential handling:** Your AWS access key and secret are stored once, encrypted, by your own Jentic One instance and injected at execution time when the request is signed. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'run a CodeGuru code review' or 'list recommendations from a code review', and Jentic returns the matching CodeGuru Reviewer operation with its input schema, so the agent calls CreateCodeReview or ListRecommendations directly.

## Related APIs

- **AWS CodeCommit** — CodeCommit hosts repositories that CodeGuru Reviewer associates with for automated reviews
- **GitHub** — GitHub repositories can be associated with CodeGuru Reviewer for cross-platform code review
- **AWS CodePipeline** — CodePipeline can gate stages on CodeGuru-derived quality signals

## FAQ

### Why is there no official OpenAPI spec for Amazon CodeGuru Reviewer?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Amazon CodeGuru Reviewer via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Amazon CodeGuru Reviewer API use?

CodeGuru Reviewer uses AWS Signature Version 4 (HMAC) signed requests with an IAM access key and secret. Through Jentic, those credentials live encrypted in your Jentic One instance and the SigV4 signature is computed server-side, so the agent context never holds the raw secret.

### Can I trigger a code review on a specific pull request through the API?

Yes. CreateCodeReview accepts a Type with a RepositoryAnalysis sub-object that takes a RepositoryHead containing a BranchName. Once created, poll DescribeCodeReview until State equals Completed, then call ListRecommendations on the CodeReviewArn to fetch results.

### How do I submit feedback on a CodeGuru recommendation?

Call PutRecommendationFeedback with the CodeReviewArn, RecommendationId, and a Reactions array containing ThumbsUp or ThumbsDown. ListRecommendationFeedback returns aggregate feedback so an agent can review sentiment across recommendations.

### What are the rate limits for the Amazon CodeGuru Reviewer API?

AWS enforces per-account, per-region throttling on CodeGuru Reviewer; throttled requests return ThrottlingException. Code review creation is also rate-limited per repository. Use exponential backoff via the AWS SDKs that Jentic wraps.

### How do I run a CodeGuru review through Jentic with an AI agent?

Run pip install jentic, then have the agent search for 'run a CodeGuru code review', load the CreateCodeReview schema, and execute it with the AssociationArn and branch. Poll DescribeCodeReview for completion, then ListRecommendations to fetch findings the agent can post back as PR comments.

### Can I limit what my agent is allowed to do with the CodeGuru Reviewer API?

Yes. Because you run Jentic One yourself, your own rules decide which CodeGuru Reviewer operations and AWS credentials the agent may use. Since the association and review ARNs are minted by AWS at creation time rather than chosen by you, the honest control is by operation: you allow only the calls the agent needs, such as CreateCodeReview and ListRecommendations, so a destructive operation like DisassociateRepository is not available unless you add it. The AWS access key and secret are injected at signing time and never enter the agent's prompt or context.
