Kai (/kaɪ/, rhymes with pie) - An AI-enabled tool that simplifies the process of modernizing application source code to a new platform. It uses Large Language Models (LLMs) guided by static code analysis, along with data from Konveyor. This data provides insights into how the organization solved similar problems in the past, helping streamline and automate the code modernization process.
Kai is an AI-enabled tool that assists with modernizing applications. Kai is designed to help developers write code more efficiently by providing suggestions and solutions to common problems. It does this by performing Retrieval Augmented Generation (RAG), working with LLMs by using Konveyor analysis reports about the codebase and generating solutions based on previously solved examples.
Now, you may be thinking: How is Kai different than other generative AI tools?
Konveyor generates analysis reports via Kantra throughout a migration. This history of reports tells you what’s wrong with your codebase, where the issues are, and when they happened. This functionality exists today, and developers are already using this data to make decisions. And because of our RAG approach, this is all possible without additional fine-tuning.
As you migrate more pieces of your codebase with Kai, it can learn from the data available, and get better recommendations for the next application, and the next, and so on. This shapes the code suggestions to be similar to how your organization has solved problems in the past.
LLMs are very powerful tools, but without explicit guidance, they can generate a lot of garbage. Using Konveyor’s analysis reports allows us to focus Kai’s generative power on the specific problems that need to be solved. This pointed, specific data is the key to unlocking the full potential of large language models.
[!NOTE]
Kai is in early development. We are actively working on improving the tool and adding new features. If you are interested in contributing to the project, please see our Contributor Guide.
Check out our 15 minute guided demo video to see Kai in action!
There are two elements to Kai that is necessary for it to function: the backend and the IDE extension. The backend is responsible for connecting to your LLM service, ingesting static analysis reports, and generating solutions. The IDE extension is where you can interact with Kai, see suggestions, and apply them to your codebase.
[!IMPORTANT]
Kai is in early development and is not yet ready for production use. We currently recommend checking out the git tag
stable
for the most stable user experience.
The quickest way to get running is to leverage sample data committed into the
Kai repo along with the podman compose up
workflow
git clone https://github.com/konveyor/kai.git
cd kai
git checkout stable
systemctl --user start podman
logs
directory accessible to the podman container with
podman unshare chown -R 1001:0 logs
logs
directory outside
the container.sudo chown -R <your_user>:<your_user> logs
to change the ownership
of the logs
directory back to your user when done.podman compose up
.
podman compose down && podman volume rm kai_kai_db_data
.KAI__DEMO_MODE=true
. To run without demo
mode execute KAI__DEMO_MODE=false podman compose up
. See
docs/contrib/configuration.md for more
information on demo mode.The Kai backend is now running and ready to serve requests!
After you have the kai backend running via podman compose up
you can run
through a guided scenario we have to show Kai in action at
docs/scenarios/demo.md. This document walks through a
guided scenario of using Kai to complete a migration of a Java EE app to
Quarkus.
The above information is a quick path to enable running Kai quickly to see how it works. If you'd like to take a deeper dive into running Kai against data in Konveyor or your own custom data, please see docs/getting_started.md
logs
directory. You can
adjust the level via the environment variables. For example:
KAI__FILE_LOG_LEVEL="debug"
.Our project welcomes contributions from any member of our community. To get started contributing, please see our Contributor Guide.
Refer to Konveyor's Code of Conduct here.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.