From f5681155ffbda8a77edf14dcf5fc7ae08618d7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B8=D0=BD=D0=B0=D1=80=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=B8=D1=82=D0=BE=D0=B2?= Date: Thu, 18 Jun 2026 13:05:39 +0000 Subject: [PATCH] Solution published with README: add README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..15cbaa2 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# 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: + +1. **PEP8 compliance** +2. **Type hints** +3. **Edge case handling** +4. **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 + +```bash +pip install -r requirements.txt +``` + +## Demo + +Run the demo with: + +```bash +python main.py +``` + +It will review the example function ``sort_numbers`` and print the draft review, scores, and verdict.