Skip to content

feat(cli): add --no-default-agents flag to kagent install#1603

Open
Raghavendiran-2002 wants to merge 1 commit intokagent-dev:mainfrom
Raghavendiran-2002:feat/no-default-agents-flag
Open

feat(cli): add --no-default-agents flag to kagent install#1603
Raghavendiran-2002 wants to merge 1 commit intokagent-dev:mainfrom
Raghavendiran-2002:feat/no-default-agents-flag

Conversation

@Raghavendiran-2002
Copy link
Copy Markdown
Contributor

Summary

Closes #766

Adds a --no-default-agents flag to kagent install that disables all default agents, enabling a minimal
installation without editing the helm values file or passing multiple --set flags.

kagent install --no-default-agents

- Disables all 10 default agents (k8s-agent, kgateway-agent, istio-agent, promql-agent, observability-agent,
argo-rollouts-agent, helm-agent, cilium-policy-agent, cilium-manager-agent, cilium-debug-agent)
- Uses helm --set flags so it takes precedence over any --profile value
- Can be combined with --profile (e.g. --profile demo --no-default-agents)

Files changed

- go/core/cli/internal/cli/agent/install.go — NoDefaultAgents field on InstallCfg, defaultAgents list, flag handling
- go/core/cli/cmd/kagent/main.go — register --no-default-agents cobra flag

Test plan

- All Go unit tests pass (make -C go test)
- kagent install --no-default-agents installs kagent with no agents deployed
- kagent install --profile demo --no-default-agents installs with demo profile settings but agents disabled
- kagent install (no flag) still installs default agents as before

Copilot AI review requested due to automatic review settings March 31, 2026 08:48
Signed-off-by: Raghavendiran-Github <raghavendiran46461@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 adds a --no-default-agents flag to the kagent install command that disables all 10 default agents via helm --set flags, enabling users to perform a minimal installation without editing values files or passing multiple individual set flags.

Changes:

  • Added NoDefaultAgents boolean field to InstallCfg struct to track the flag state
  • Created defaultAgents package-level slice containing all 10 agent names with supporting documentation
  • Implemented logic to append helm --set flags disabling each agent when the flag is enabled, ensuring precedence over profile values
  • Registered the CLI flag in the main kagent command

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
go/core/cli/internal/cli/agent/install.go Added struct field, agent list, and flag handling logic with proper helm precedence
go/core/cli/cmd/kagent/main.go Registered the --no-default-agents boolean flag with cobra

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add flag '--no-default-agents' on kagent install for a minimal kagent installation

2 participants