Skip to content

Repository files navigation

SMART Reflexion Agent for code-refactoring

Repository for a SMART Reflexion Agent for code-refactoring, using tool calling for Retrieved Augmented Generation (RAG). Built using LangGraph and LangChain Expression Language (LCEL).

1. Create the project directory

1.1. Create the root folder

Create a folder named <project_name>, at some path <prefix_path>

Command:

mkdir "~/<prefix_path>/<project_name>"

Result:

<prefix_path>/
        └── <project_name>/

1.2. Clone the GitHub repository

Clone this repository inside the root folder

Command:

git clone "https://github.com/estebanhramirez/SMART-Reflexion-Agent-for-code-refactoring.git" "~/<prefix_path>/<project_name>/Repo"

Result:

<prefix_path>/
        └── <project_name>/
                    └── Repo/
                          ├── README.md
                          └── ...

2. Set-up the virtual environment

2.1. Create the virtual environment

Create a new folder name venv inside the root folder, <project_name>, with the isolated and self-contained virtual environment

Command:

python3.12 -m venv "~/<prefix_path>/<project_name>/venv"

2.2. Activate the virtual environment

Command:

source "~/<prefix_path>/<project_name>/venv/bin/activate"

or (in Windows)

~\<prefix_path>\<project_name>\venv\Scripts\activate.bat

We can deactivate the virtual environment using deactivate.bat.

3. Install the required libraries

Command:

pip install -r "~/<prefix_path>/<project_name>/Repo/requirements.txt"

About

This repository contains the code of a SMART Reflexion Agent with read and writting capabilities to modify a local repository, for achieving code-refactoring. This implements a self-improving agent that can resolve conflicts between multiple files, by critically analizing the changes made and detecting potential conflicts.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages