Skip to content

Add askUser config, disable askUser by default#1726

Open
dobesv wants to merge 5 commits intokagent-dev:mainfrom
dobesv:ask-user-setting
Open

Add askUser config, disable askUser by default#1726
dobesv wants to merge 5 commits intokagent-dev:mainfrom
dobesv:ask-user-setting

Conversation

@dobesv
Copy link
Copy Markdown
Contributor

@dobesv dobesv commented Apr 22, 2026

Adds builtinTools settings block to the declarative agent spec. Currently it just has one sub-field askUser which enables the "ask user" tool. If this is not set and enabled, the "ask user" tool is disabled. The tool is disabled by default because although it looks cool, it causes a lot of problems if you're not expecting it to be there, for example:

  • it's only compatible with the kagent UI, not other A2A clients
  • sub-agents will use this if provided instead of asking their parent agent for answers instead
  • unattended agents will try to use this when they could have carried on

Fixes #1554

Copilot AI review requested due to automatic review settings April 22, 2026 02:27
Signed-off-by: Dobes Vandermeer <dobes.vandermeer@newsela.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

Adds an askUser configuration block to the agent spec so the built-in ask_user tool can be explicitly enabled, and is disabled by default when not configured (addressing #1554).

Changes:

  • Introduces AskUser/ask_user config types in Go + Python and wires them through agent translation/config.
  • Updates Python agent construction to only add AskUserTool when explicitly enabled.
  • Adds unit tests in both Python and Go covering enabled/disabled/unspecified cases.

Reviewed changes

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

Show a summary per file
File Description
python/packages/kagent-adk/tests/unittests/test_types.py Adds tests asserting AskUserTool presence/absence based on ask_user.enabled.
python/packages/kagent-adk/src/kagent/adk/types.py Adds AskUserConfig and gates adding AskUserTool on ask_user.enabled.
go/core/internal/controller/translator/agent/compiler.go Translates spec.askUser into ADK agent config (AskUser).
go/core/internal/controller/translator/agent/adk_api_translator_test.go Adds translator tests for AskUser propagation.
go/core/internal/controller/reconciler/reconciler.go Warns when askUser.enabled is set for Go runtime (unsupported).
go/api/v1alpha2/agent_types.go Extends the Agent CRD API (AgentSpec) with askUser.
go/api/adk/types.go Extends ADK agent config JSON schema with ask_user.

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

Comment thread python/packages/kagent-adk/tests/unittests/test_types.py
Comment thread go/api/v1alpha2/agent_types.go Outdated
dobesv added 3 commits April 21, 2026 19:44
Signed-off-by: Dobes Vandermeer <dobes.vandermeer@newsela.com>
Signed-off-by: Dobes Vandermeer <dobes.vandermeer@newsela.com>
Signed-off-by: Dobes Vandermeer <dobes.vandermeer@newsela.com>
Copy link
Copy Markdown
Contributor

@EItanya EItanya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here was my proposed design from the previous PR, can we go with this?

type DeclarativeAgentSpec struct {
    // ...existing fields...
    BuiltinTools *BuiltinToolsConfig `json:"builtinTools,omitempty"`
}

type BuiltinToolsConfig struct {
    AskUser *bool `json:"askUser,omitempty"`
    // future built-in tools get their own fields here
}
spec:
  declarative:
    builtinTools:
      askUser: true

AskUser can have its own struct if you think there will be more config nested inside later, up to you

Signed-off-by: Dobes Vandermeer <dobes.vandermeer@newsela.com>
@dobesv
Copy link
Copy Markdown
Contributor Author

dobesv commented Apr 23, 2026

I updated it

@EItanya
Copy link
Copy Markdown
Contributor

EItanya commented Apr 29, 2026

Thanks for fixing up the API. The only thing is that I'd like this tool on by default for ease of use. Advanced users/use-cases can always turn it off.

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] Ability to disable/enable built-in tools like "ask question"

3 participants