36 lines
776 B
Markdown
36 lines
776 B
Markdown
# 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:
|
|
|
|
1. Generates an initial draft review.
|
|
2. Critiques the draft using four criteria (PEP8, type hints, edge cases, naming).
|
|
3. 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
|
|
|
|
```bash
|
|
# 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
|