Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 1.64 KB

File metadata and controls

70 lines (44 loc) · 1.64 KB

Development

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.

How to run everything locally

Running outside Kubernetes:

  1. Run the backend from the python folder:
uv sync --all-extras

# Run the autogen backend
uv run kagent-engine serve

If 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.

  1. Run the frontend from the ui folder:
npm install

npm run dev

How to run everything in Kubernetes

  1. Create a cluster:
make create-kind-cluster
  1. Set your providers API_KEY:
export OPENAI_API_KEY=your-openai-api-key
#or
export ANTHROPIC_API_KEY=your-anthropic-api-key
  1. Build images, load them into kind cluster and deploy everything using Helm:
make helm-install

To access the UI, port-forward to the app service:

kubectl port-forward svc/app 8001:80

Then open your browser and go to http://localhost:8001.