Repository navigation
fix(adk): Python agents HITL resume and align memory API - #2751
Merged
Merged
Conversation
Signed-off-by: Jet Chiang <[email protected]>
Signed-off-by: Jet Chiang <[email protected]>
supreme-gg-gg
force-pushed
the
fix/hitl-v0.10
branch
from
September 8, 2026 19:04
37a9530 to
173e35f
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The executor pause/resume fix is covered by a focused regression test and the memory interface updates are validated with unit tests and limited call-site surface area.
Pull request overview
This PR fixes Human-in-the-Loop (HITL) pause/resume for Python agents on release/v0.10.x by ensuring the ADK confirmation lifecycle is persisted correctly before pausing, and updates Kagent’s memory integration to match the current Google ADK memory service interface.
Changes:
- Adjust
A2aAgentExecutorrun-loop to stop after the ADK confirmation tool response is persisted, preventing resume-time validation failures in ADK 1.38. - Update
KagentMemoryService.add_memoryandSaveMemoryToolto use ADKMemoryEntryobjects and sharedcustom_metadata. - Add unit tests covering both the HITL pause/resume flow (via real ADK runner + serialized session reload) and the updated memory tool/service interface.
File summaries
| File | Description |
|---|---|
| python/packages/kagent-adk/src/kagent/adk/_agent_executor.py | Ensures confirmation tool responses are persisted before pausing so HITL resume works with ADK 1.38 validation. |
| python/packages/kagent-adk/src/kagent/adk/_memory_service.py | Aligns memory service API to accept ADK MemoryEntry sequences and shared metadata, generating embeddings in batch. |
| python/packages/kagent-adk/src/kagent/adk/tools/memory_tools.py | Updates SaveMemoryTool to call the new add_memory(..., memories=[MemoryEntry(...)]) interface. |
| python/packages/kagent-adk/src/kagent/adk/models/_bedrock.py | Import ordering cleanup. |
| python/packages/kagent-adk/tests/unittests/test_hitl_resume.py | New regression test that exercises HITL pause/resume across session serialization boundaries. |
| python/packages/kagent-adk/tests/unittests/test_memory_tools.py | New tests validating metadata merge semantics and error propagation for the updated memory interface. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
EItanya
approved these changes
Sep 8, 2026
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
kagent 0.10.1 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre><!-- Release notes generated using configuration in .github/release.yml at v0.10.1 --> ## What's Changed ### Features * feat(adk): support responses API for Python ADK agents by @onematchfox in kagent-dev/kagent#2679 ### Bug Fixes * fix(adk): preserve A2A user identity before task resolution by @erauner12 in kagent-dev/kagent#2483 * fix(adk): Python agents HITL resume and align memory API by @supreme-gg-gg in kagent-dev/kagent#2751 ### Other Changes * ci: run workflows on Blacksmith runners (backport to release/v0.10.x) by @Charlesthebird in kagent-dev/kagent#2712 **Full Changelog**: https://github.com/kagent-dev/kagent/compare/v0.10.0...v0.10.1</pre> <p>View the full release notes at <a href="https://github.com/kagent-dev/kagent/releases/tag/v0.10.1">https://github.com/kagent-dev/kagent/releases/tag/v0.10.1</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!18719
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2731
Google ADK 1.38 (bumped in #2558) validates that dynamically confirmed tools recorded their confirmation request in session history. The Python executor stopped before that event was persisted, causing every
ask_userresponse and tool approval to fail on resume.This change preserves the confirmation response before pausing, and also updates the memory service to the current Google ADK interface.
This change is only applicable to
release/v0.10.xbranch.mainalready uses upstream executor which handles HITL pause properly. This also does not affect Go agents, since go-adk does not have the above validation