27060a455e5627e7775ff51b38654e4727f741ce
README.md
LangGraph Code Review Agent
This repository implements a LangGraph agent that takes a Python function as input and produces a code review. The review is evaluated by a critic node that scores it on four criteria:
- PEP8 compliance
- Type hints
- Edge case handling
- Naming conventions
If the critic returns needs_revision the rewrite node improves the weakest part of the review. The process repeats up to max_rounds times.
The implementation uses only the technologies specified in the assignment: langgraph and langchain-ollama (or langchain-openai if you prefer). No vector database is used.
Installation
pip install -r requirements.txt
Demo
Run the demo with:
python main.py
It will review the example function sort_numbers and print the draft review, scores, and verdict.
Description
Languages
Python
100%