Skip to content

[Feat]: A2A-compliant user confirmation form #412

@NicklasChristiansen

Description

@NicklasChristiansen

Is your feature request related to a problem? Please describe.

A remote agent might require confirmation from a user before executing specific tasks. What is the appropriate way to send a confirmation form/button, so the host/client can show the button in the UI and pass the result back to the remote agent?

Describe the solution you'd like

Ideally some A2A compliant form structure all hosts/clients expect. Example if a remote agent can delete an employee from a system:

employee_name = "John Doe"
employee_id = "E12345"
sub_task_id = "sub_task_abc"

# Create the simple confirmation form
Part(
    root=DataPart(
        kind="data",
        data={
            "type": "form",
            "title": f"Are you sure you want to delete employee {employee_name}?",
            "description": f"By confirming, employee {employee_name} will be deleted permanently.",
            "schema": {
                "type": "object",
                "properties": {
                    "confirmation": {
                        "type": "boolean",
                        "title": "I confirm the permanent deletion of this employee."
                    }
                },
                "required": ["confirmation"]
            },
        },
        metadata={
            "form_id": f"delete_confirmation_{sub_task_id}",
            "employee_id": employee_id,
            "subtask_id": sub_task_id,
        }
    )
)

Describe alternatives you've considered

A remote agent could ask for confirmation via text → the user responds via text → the remote agent handles this, but I see errors happening here down the line.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions