How naresh1401/ai-code-review-agent works
AI Code Review Agent reviews pull-request diffs with an LLM, produces line-level findings and a score/verdict, and can publish the review back to GitHub. The principal workflow is GitHub webhook → FastAPI background processing → diff retrieval → review → GitHub comments; a separate manual-review API and Streamlit interface support pasted diffs. The README documents the product capabilities, while source excerpts confirm the orchestration and integrations shown. The reviewer’s internal prompt generation and response parsing are not fully shown, so they are represented within the reviewer component.
Main entry points: main.py FastAPI API · github_handler.py GitHub Handler · code_reviewer.py Review Engine · app.py Review UI
Components 9
Entry Points
- Review UI
ui/app.py
Review Orchestration
- FastAPI API
src/api/main.py
Review Analysis
- Review Engine
src/analyzer/code_reviewer.py - Review Result
src/analyzer/code_reviewer.py
GitHub Integration
- Signature Check
src/github/github_handler.py - GitHub Handler
src/github/github_handler.py
Other components
- GitHub PR
- Reviewer
- LLM Provider
Connections 13
- Reviewer → Review UI: enters diff
ui/app.py - Review UI → FastAPI API: posts review
ui/app.py - Reviewer → FastAPI API: submits diff
README.md - GitHub PR → FastAPI API: sends webhook
README.md - FastAPI API → Signature Check: verifies signature
src/api/main.py - FastAPI API → GitHub Handler: fetches diffs
src/api/main.py - FastAPI API → Review Engine: requests review
src/api/main.py - FastAPI API → GitHub Handler: posts review
src/api/main.py - Review Engine → Review Result: builds result
README.md - GitHub Handler → GitHub PR: reads diffs
src/github/github_handler.py - GitHub Handler → GitHub PR: posts comments
src/github/github_handler.py - FastAPI API → LLM Provider: configures provider
src/api/main.py - Review Engine → LLM Provider: requests analysis