Skip to content

A2A: Standardize Kagent's human in the loop with A2A Extension - #2396

Merged
EItanya merged 18 commits into
mainfrom
jetc/feat/a2a-hitl-extension
Aug 7, 2026
Merged

EItanya merged 18 commits into
mainfrom
jetc/feat/a2a-hitl-extension

Conversation

@supreme-gg-gg

@supreme-gg-gg supreme-gg-gg commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Close #2304

  • Move Kagent's human in the loop (HITL) to an A2A Extension that is framework-neutral and standardized. Previously, we relied on ADK-specific parts from its request confirmation flow and a lot of custom metadata.
  • Redesigned the HITL payload following the Extension migration since it's framework neutral now. This redesign means UI and extension becomes simpler, and defers more processing logic to the upstream executor and each framework
  • Upgrade Python ADK to 2.0 so that we can reuse upstream A2A agent executor to handle request confirmation flow internally and remove duplicated code introduced in the last HITL PR when upstream does not support it back then
  • Added e2e test for HITL (ask user tool)

Core changes are documented in docs/architecture/human-in-the-loop.md, see the diff for the design changes.

This is breaking so old clients without the A2A extension negotiation capability will stop receiving HITL events properly. To upgrade your custom client / agents, please refer to changes in the above doc.

As before, only ADK and Langgraph (BYO) supports HITL. However, this redesign enables users to easily develop their own adapter for other BYO frameworks / harness since HITL over A2A itself is framework-neutral.

@supreme-gg-gg supreme-gg-gg changed the title [WIP] A2A: Standardize Kagent's human in the loop with A2A Extension A2A: Standardize Kagent's human in the loop with A2A Extension Aug 5, 2026
@supreme-gg-gg
supreme-gg-gg force-pushed the jetc/feat/a2a-hitl-extension branch from e5e1bfc to 00203f0 Compare August 6, 2026 01:20
@chromatic-com

chromatic-com Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Testing paused

Monthly snapshot limit reached. Update your plan for additional snapshots and to resume testing.

@supreme-gg-gg supreme-gg-gg Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewer: Also added UI option to set and show toggle for isolating subagent sessions added in #2153 (SelectToolsDialog.tsx, ToolsSection.tsx, AgentDetailsSidebar.tsx)

Image

@supreme-gg-gg
supreme-gg-gg force-pushed the jetc/feat/a2a-hitl-extension branch 2 times, most recently from 7726578 to 8dfdc4e Compare August 6, 2026 02:45
@supreme-gg-gg
supreme-gg-gg requested a lite review from Copilot August 6, 2026 02:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@supreme-gg-gg
supreme-gg-gg force-pushed the jetc/feat/a2a-hitl-extension branch from dce2b6b to 5e9d177 Compare August 6, 2026 15:28
a2a_part.metadata.update({get_kagent_metadata_key(A2A_DATA_PART_METADATA_IS_LONG_RUNNING_KEY): True})


def _process_subagent_session_id(a2a_part: A2APart, subagent_session_ids: Dict[str, str]) -> None:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewer: cleaning up these unnecessary event converters and utils for stamping subagent session ID as #2153 removed it for Go

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewer: removed sandbox code executor no longer in use

@supreme-gg-gg
supreme-gg-gg marked this pull request as ready for review August 6, 2026 15:36
@supreme-gg-gg
supreme-gg-gg requested review from a team, Charlesthebird and peterj as code owners August 6, 2026 15:36
@supreme-gg-gg
supreme-gg-gg force-pushed the jetc/feat/a2a-hitl-extension branch from 1894a93 to f06e3ec Compare August 6, 2026 15:52
@EItanya
EItanya force-pushed the jetc/feat/a2a-hitl-extension branch from f06e3ec to 911bea9 Compare August 6, 2026 20:38
EItanya
EItanya previously approved these changes Aug 6, 2026
@supreme-gg-gg
supreme-gg-gg dismissed EItanya’s stale review August 7, 2026 14:20

The merge-base changed after approval.

@supreme-gg-gg
supreme-gg-gg force-pushed the jetc/feat/a2a-hitl-extension branch from 911bea9 to d8c6e91 Compare August 7, 2026 14:20
Base automatically changed from jetc/feat/a2a-cleanup to main August 7, 2026 15:01
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
…l to a2a extension

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
…r changes

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
…ted UI code refactor

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
…sions for subagents

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@EItanya
EItanya force-pushed the jetc/feat/a2a-hitl-extension branch from 5f924c6 to 1f9538e Compare August 7, 2026 15:01
@EItanya
EItanya merged commit b58666b into main Aug 7, 2026
32 checks passed
@EItanya
EItanya deleted the jetc/feat/a2a-hitl-extension branch August 7, 2026 16:38
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.

Declare the HITL confirmation payload as an A2A AgentExtension with one stable prefix

4 participants