Konveyor AI (kai) is Konveyor's approach to easing modernization of application source code to a new target by leveraging LLMs with guidance from static code analysis.
Pronounciation of 'kai': https://www.howtopronounce.com/kai
Our approach is to use static code analysis to find the areas in source code that need to be transformed. 'kai' will iterate through analysis information and work with LLMs to generate code changes to resolve incidents identified from analysis.
This approach does not require fine-tuning of LLMs, we augment a LLMs knowledge via the prompt, similar to approaches with RAG by leveraging external data from inside of Konveyor and from Analysis Rules to aid the LLM in constructing better results.
For example, analyzer-lsp Rules such as these (Java EE to Quarkus rulesets) are leveraged to aid guiding a LLM to update a legacy Java EE application to Quarkus.
python3 -m venv env
source env/bin/activate
pip install -r ./requirements.txt
- Install podman so you can run Kantra for static code analysis
cd samples
./fetch_sample_apps.sh
# this will git clone example source code appscd macos
./restart_podman_machine.sh
# setups the podman VM on MacOS so it will mount the host filesystem into the VM./get_latest_kantra_cli.sh
# fetches 'kantra' our analyzer tool and stores it in ../bincd ..
./analyze_coolstore.sh
# Analyzes 'eap-coolstore-monolith' directory and writes an analysis output to analysis_reports/eap-coolstore-monolith/output.yaml- There are a few other scripts in this directory to analyze other samples
We plan to keep latest versions of static code analyis committed to this repo in samples/analysis_reports
- Install trunk via: https://docs.trunk.io/check#install-the-cli
- Run the linters:
trunk check
- Format code:
trunk fmt
- Install the prereqs in Setup and activate the python virtual environment
- Ensure you've checked out the source code for sample applications: Run: ./samples/fetch_sample_apps.sh
- Run: ./run_tests.sh
This repository represents a prototype implementation as the team explores the solution space. The intent is for this work to remain in the konveyor-ecosystem as the team builds knowledge in the domain and experiments with solutions. As the approach matures we will integrate this properly into Konveyor and seek to promote to github.com/konveyor organization.
Refer to Konveyor's Code of Conduct here.