-
Notifications
You must be signed in to change notification settings - Fork 353
KAgent Install Profile Feature #808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAgent Install Profile Feature #808
Conversation
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an install profile feature for KAgent that allows users to select predefined configurations during installation. The feature provides two profiles: "minimal" (default, no agents) and "demo" (all agents enabled), simplifying the setup process for different use cases.
- Adds installation profile system with minimal and demo configurations
- Enhances CLI install command with profile selection support
- Implements interactive profile selection in shell mode
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| helm/README.md | Removes outdated kmcp-crds installation instructions |
| go/cli/internal/profiles/ | Adds new profiles package with embedded YAML configurations and profile management |
| go/cli/internal/cli/install.go | Refactors installation logic to support profiles and adds interactive installation |
| go/cli/cmd/kagent/main.go | Updates CLI to include profile flag and interactive profile selection |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| parts := strings.Split(value, "=") | ||
| redactedValues = append(redactedValues, parts[0]+"=********") | ||
| } else { | ||
| redactedValues = append(redactedValues, value) |
Copilot
AI
Aug 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API key redaction logic assumes all values containing 'apiKey' have exactly one '=' separator. If a value has multiple '=' characters or no '=' character, this could cause index out of bounds or incorrect redaction.
b608f1b to
fcbe33e
Compare
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
go/cli/cmd/kagent/main.go
Outdated
| rootCmd.PersistentFlags().StringVarP(&cfg.Namespace, "namespace", "n", "kagent", "Namespace") | ||
| rootCmd.PersistentFlags().StringVarP(&cfg.OutputFormat, "output-format", "o", "table", "Output format") | ||
| rootCmd.PersistentFlags().BoolVarP(&cfg.Verbose, "verbose", "v", false, "Verbose output") | ||
| var profile string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about profile not being a config option in something like InstallConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:donezo:
Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
original pr (which got in a terrible state due to merge conflicts + rebasing, so better to start fresh): kagent-dev#796 --- Originally, when listing the agents, if a single agent failed (i.e. `modelConfig` is invalid), no Agents were shown. # Changes With these changes, we: 1. Add a new AgentResponse field `Accepted` (i.e. `Reconciled`, but front-end friendly name) - This is based on the `Accepted` state of the Agent. 2. **Don't** return an error response _to the frontend_ when an Agent (or multiple) had failures. - We now continue listing agents, making the UI usable for valid agents, and adding a `Not Accepted` (could also be `Not Reconciled`, or `Error` for simplest terms) status on broken agents -- similar to how we do `Not Ready` while they are being deployed. 3. No longer display unready/un-accepted Agents in the agent sidebar from chats. ## Alternative Approaches Another approach would be to avoid returning the not-reconciled agent altogether. This would avoid needing to set up the new response field and UI changes. I was originally leaning towards that one, but figured it may be useful/quicker for users to notice any broken agents if they appear in the UI with their failed status. Another idea I had, but would probably be overkill and could constitute as a new feature, is to have a "notification system", where we would _not_ display failed agents in the agents list, but instead have the reconciliation as a notification. # Testing ## Dashboard Build & run ```sh make create-kind-cluster helm-install build-cli-local KAGENT_HELM_REPO=./helm/ ./go/bin/kagent-local dashboard ``` Update an Agent to have an invalid `modelConfig` ```sh kubectl patch agents.kagent.dev/k8s-agent -n kagent --type='json' -p='[{"op": "replace", "path": "/spec/declarative/modelConfig", "value": "default-model-config-2"}]' ``` Reload page. View listing UI to see the failed state (Not Accepted). Fix the agent. ```sh kubectl patch agents.kagent.dev/k8s-agent -n kagent --type='json' -p='[{"op": "replace", "path": "/spec/declarative/modelConfig", "value": "default-model-config"}]' ``` Reload page. It’s all good again! ## CLI This would ideally also get tested through the CLI to test the behavior of `KAGENT_HELM_REPO=./helm/ ./go/bin/kagent-local get agent`, _but_ I’m hitting “userID is required” issues. My `$HOME/.kagent/config.yaml` file has it defined, so I'm not sure of the exact issue yet. --- Resolves: kagent-dev#797 --------- Signed-off-by: Fabian Gonzalez <fabian.gonzalez@solo.io>
original pr (which got in a terrible state due to merge conflicts + rebasing, so better to start fresh): #796
Originally, when listing the agents, if a single agent failed (i.e.
modelConfigis invalid), no Agents were shown.Changes
With these changes, we:
Accepted(i.e.Reconciled, but front-end friendly name)Acceptedstate of the Agent.Not Accepted(could also beNot Reconciled, orErrorfor simplest terms) status on broken agents -- similar to how we doNot Readywhile they are being deployed.Alternative Approaches
Another approach would be to avoid returning the not-reconciled agent altogether. This would avoid needing to set up the new response field and UI changes. I was originally leaning towards that one, but figured it may be useful/quicker for users to notice any broken agents if they appear in the UI with their failed status.
Another idea I had, but would probably be overkill and could constitute as a new feature, is to have a "notification system", where we would not display failed agents in the agents list, but instead have the reconciliation as a notification.
Testing
Dashboard
Build & run
Update an Agent to have an invalid
modelConfigReload page.
View listing UI to see the failed state (Not Accepted).
Fix the agent.
Reload page.
It’s all good again!
CLI
This would ideally also get tested through the CLI to test the behavior of
KAGENT_HELM_REPO=./helm/ ./go/bin/kagent-local get agent, but I’m hitting “userID is required” issues. My$HOME/.kagent/config.yamlfile has it defined, so I'm not sure of the exact issue yet.Resolves: #797