Skip to content

feat(python-adk): honor isolateSessions for remote agent tools - #2504

Merged
EItanya merged 1 commit into
kagent-dev:mainfrom
Whxuan0701:feat/python-adk-isolate-sessions
Aug 20, 2026
Merged

feat(python-adk): honor isolateSessions for remote agent tools#2504
EItanya merged 1 commit into
kagent-dev:mainfrom
Whxuan0701:feat/python-adk-isolate-sessions

Conversation

@Whxuan0701

Copy link
Copy Markdown
Contributor

Summary

  • honor the existing isolate_sessions configuration in the Python remote A2A tool runtime
  • mint a fresh sub-agent context for each isolated invocation while preserving shared-session defaults
  • return the actual invocation context in completed and HITL-pending responses

This is a Python runtime follow-up to the accepted Go implementation in #2153. It does not change the CRD, UI, lineage headers, concurrency limits, or HITL resume routing.

Testing

  • cd python && uv run pytest -q packages/kagent-adk/tests/unittests/test_remote_a2a_tool.py packages/kagent-adk/tests/unittests/test_proxy_integration.py (40 passed)
  • cd python && uv run ruff check packages/kagent-adk/src/kagent/adk/_remote_a2a_tool.py packages/kagent-adk/src/kagent/adk/types.py packages/kagent-adk/tests/unittests/test_remote_a2a_tool.py packages/kagent-adk/tests/unittests/test_proxy_integration.py
  • git diff --check

Risk / Notes

  • isolate_sessions=false remains the default and reuses one context ID for stateful sub-agents.
  • Isolated calls use a local per-call ID, so concurrent fan-out does not share mutable session state.
  • Existing upstream/dependency warnings remain in the test output; no new failures were introduced.

Follow-up to #2153.

Signed-off-by: Whxuan0701 <102815982+Whxuan0701@users.noreply.github.com>
@Whxuan0701
Whxuan0701 requested a review from a team as a code owner August 20, 2026 03:52
@github-actions github-actions Bot added the enhancement New feature or request label Aug 20, 2026

@supreme-gg-gg supreme-gg-gg 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.

lgtm, thanks! Can you also backport this to release/0.10.x branch

@EItanya
EItanya merged commit c9d6f88 into kagent-dev:main Aug 20, 2026
29 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants