Skip to content

Advanced Tool Confirmation UI cannot collect editable payload input #463

Description

@ammaarsaiyed

Summary

When using Advanced Tool Confirmation through ToolContext.request_confirmation(hint=..., payload=...), the current ADK Web interface displays:

  • the confirmation hint;
  • a read-only JSON payload viewer;
  • a Confirmed checkbox;
  • a Submit button.

It does not provide an editable text field, JSON editor, or generated form that allows the human user to enter or modify the requested confirmation payload.

As a result, the standard ADK Web interface appears unable to collect the structured human input described in the Advanced Tool Confirmation
documentation.

Environment

  • google-adk: 1.34.x (also observed in 2.x)
  • Exact version: [paste output from pip show google-adk]
  • Python: 3.10
  • Operating system: macOS
  • UI: bundled adk web
  • Installation method: uv or pip

Minimal reproduction

from typing import Any

from google.adk.agents import Agent
from google.adk.tools.tool_context import ToolContext


def collect_user_name(
    tool_context: ToolContext,
) -> dict[str, Any]:
    confirmation = tool_context.tool_confirmation

    if confirmation is None:
        tool_context.request_confirmation(
            hint="Please enter your name.",
            payload={
                "user_name": "",
            },
        )

        return {
            "status": "waiting_for_user_input",
        }

    if not confirmation.confirmed:
        return {
            "status": "cancelled",
        }

    payload = confirmation.payload or {}

    return {
        "status": "success",
        "user_name": payload.get("user_name"),
    }


root_agent = Agent(
    name="advanced_confirmation_reproduction",
    model="gemini-2.5-flash",
    instruction="""
When asked to collect the user's name, call collect_user_name.
Do not ask for the name directly through an ordinary chat response.
After confirmation resumes, report the user_name returned by the tool.
""",
    tools=[collect_user_name],
)

Run the agent using:

adk web

Then send:

Please collect my name.

Actual behaviour

ADK Web displays the confirmation hint and a Payload section, but the payload is shown through a read-only JSON viewer.

The only editable control in the isConfirmationRequest template branch is:

<input
  type="checkbox"
  [(ngModel)]="confirmationModel.confirmed"
/>

There is no editable control bound to:

confirmationModel.payload

The relevant template structure is effectively:

if isConfirmationRequest:
    display confirmation hint
    display read-only JSON viewer
    display Confirmed checkbox
    display Submit button

else if formFields.length > 0:
    display editable schema-generated fields

else:
    display generic editable response input

Because adk_request_confirmation makes isConfirmationRequest true, the schema-generated and generic editable-input branches are skipped.

The relevant source file is:

src/app/components/long-running-response/long-running-response.html

The dedicated confirmation branch was introduced in:

dd9e8f493eae11035dfb40b4ec2280a01cfd04d8

Source:

https://github.com/google/adk-web/blob/dd9e8f493eae11035dfb40b4ec2280a01cfd04d8/src/app/components/long-running-response/long-running-response.html

Confirmation event

The agent emits an advanced confirmation request containing a payload similar
to:

{
  "name": "adk_request_confirmation",
  "args": {
    "toolConfirmation": {
      "hint": "Please enter your name.",
      "payload": {
        "user_name": ""
      }
    }
  }
}

Despite the presence of toolConfirmation.payload, ADK Web only allows the user to change the Boolean confirmed value.

Expected behaviour

When an Advanced Tool Confirmation request includes:

{
  "user_name": ""
}

ADK Web should allow the human user to enter or modify the payload before submitting.

Acceptable implementations could include:

  1. a generated form field for each payload property;
  2. an editable JSON textarea initialized from toolConfirmation.payload;
  3. an editable response field compatible with the older pending-event dialog.

Submitting should produce a response such as:

{
  "confirmed": true,
  "payload": {
    "user_name": "Ashwin"
  }
}

Documentation mismatch

The Action Confirmations documentation states that Advanced Confirmation can pause tool execution, request specific information, and resume with the
provided data.

It describes payload as the structure of the data expected in return and shows an advanced confirmation dialog with an editable Response field.

Documentation:

https://adk.dev/tools-custom/confirmation/

The UI bundled with google-adk==1.34.x instead exposes only Boolean user
interaction for adk_request_confirmation.

If editable structured confirmation input is not intended to be supported by ADK Web, the documentation should explicitly state that a custom UI, REST client, or another response channel is required.

Historical behaviour / possible regression

Older ADK Web versions used a generic pending-event response dialog containing an editable Response textarea.

For example, google/adk-python#3645, reported with
google-adk==1.19.0, shows a user manually entering:

{
  "confirmed": true,
  "payload": {
    "user_name": "ashwin"
  }
}

Related report:

google/adk-python#3645

The old dialog was later removed and replaced with an inline response component:

a2a337d

A subsequent change introduced the dedicated adk_request_confirmation checkbox branch:

dd9e8f4

The newer branch appears to bypass the existing editable response paths.

Relationship to #439 and PR #440

This issue is related to, but distinct from:

Issue #439 reports that confirmationModel.payload is initialized from:

originalFunctionCall.args

instead of:

toolConfirmation.payload

PR #440 proposes correcting the source used to initialize the automatically submitted payload.

However, even after that proposed change, there is still no editable control bound to confirmationModel.payload. The UI would submit the initial payload without allowing the human user to supply or modify the requested values.

This issue specifically concerns the absence of an editable payload input for Advanced Tool Confirmation.

Impact

This blocks developers who:

  • use the standard ADK Web interface;
  • define agents and tools but do not own the runner or frontend;
  • need arbitrary or structured human input rather than Boolean approval;
  • operate in managed or enterprise environments where custom frontend changes
    are not available.

In these environments, Advanced Tool Confirmation cannot be used for its documented structured-input purpose from the agent definition alone.

Suggested resolution

Please consider one of the following:

  1. Render editable fields generated from toolConfirmation.payload.
  2. Add an editable JSON textarea bound to confirmationModel.payload.
  3. Allow the generic response-schema form branch to handle advanced
    confirmation payloads.
  4. Document clearly that ADK Web supports Boolean confirmation only and that
    structured payload input requires a custom client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions