725b62810aec614fc2d31243c9669c6140d4b61b
README.md
LangGraph Code Review Agent
Description
This repository contains a LangGraph implementation that performs automated code reviews for a given Python function. The agent:
- Generates an initial draft review.
- Critiques the draft using four criteria (PEP8, type hints, edge cases, naming).
- If the review is not satisfactory, rewrites the weak part up to a maximum number of rounds.
The demo function sort_numbers is used in the CLI example.
How to run
# Install dependencies
pip install -r requirements.txt
# Run the demo
python main.py
The script will print the final state of the review process.
Requirements
- Python 3.10+
- LangGraph
- LangChain OpenAI
- python-dotenv (for optional API key handling)
License
MIT
Description
Languages
Python
100%