To understand how to develop for kagent, It's important to understand the architecture of the project. Please refer to the README.md file for an overview of the project.
When making changes to kagent, the most important thing is to figure out which piece of the project is affected by the change, and then make the change in the appropriate folder. Each piece of the project has its own README with more information about how to setup the development environment and run that piece of the project.
- python: Contains the code for the autogen engine.
- go: Contains the code for the kubernetes controller, and the CLI.
- ui: Contains the code for the web UI.
Running outside Kubernetes:
- Run the backend from the
pythonfolder:
uv sync --all-extras
# Run the autogen backend
uv run kagent-engine serveIf you get an error that looks like this:
Smudge error: Error downloading...
Set the GIT_LFS_SKIP_SMUDGE=1 variable and then run sync command.
- Run the frontend from the
uifolder:
npm install
npm run dev- Create a cluster:
make create-kind-cluster- Set your providers API_KEY:
export OPENAI_API_KEY=your-openai-api-key
#or
export ANTHROPIC_API_KEY=your-anthropic-api-key- Build images, load them into kind cluster and deploy everything using Helm:
make helm-installTo access the UI, port-forward to the app service:
kubectl port-forward svc/app 8001:80Then open your browser and go to http://localhost:8001.