fix(a2a): warn when output_key cannot reach remote session - #6862
Open
iarjunganesh wants to merge 1 commit into
Open
fix(a2a): warn when output_key cannot reach remote session#6862iarjunganesh wants to merge 1 commit into
iarjunganesh wants to merge 1 commit into
Conversation
A SequentialAgent can hand an LlmAgent output to a RemoteA2aAgent while the associated output_key remains only in the caller session. Warn for that adjacent hand-off without loading the optional A2A dependency. Related to google#6854
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
8 tasks
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.
Link to Issue or Description of Change
Problem:
When an
LlmAgentwithoutput_keyimmediately precedes aRemoteA2aAgentin aSequentialAgent, the generated content crosses A2A butthe associated session-state key does not. Because the event also has content,
the state-only outbound warning proposed in #6859 does not cover this hand-off.
Solution:
Warn at
SequentialAgentconstruction for that specific adjacent ordering.The check detects an already-loaded
RemoteA2aAgentwithout importing it, soordinary
SequentialAgentusers do not acquire a dependency on the optionalA2A SDK.
Testing Plan
Unit Tests:
LlmAgent(output_key)immediately followedby
RemoteA2aAgent.output_key, and an entirely local hand-off.pytest tests/unittests/agents/test_sequential_agent.py -q(
10 passedon Python 3.12).sequential_agent.py.pyink,isort,ruff, ADK compliance checks, andcodespellpassedfor both changed files.
a2a-sdkthatimporting and constructing a local
SequentialAgentstill works.Manual End-to-End (E2E) Tests:
Not run. This change is a deterministic construction-time warning and does not
alter execution or transport behavior.
Checklist
CONTRIBUTING.mddocument.Additional context
This is intentionally separate from #6859: that PR covers state-only outbound
events and state deltas received from a remote peer. This PR covers a
caller-side
output_keyevent that also contains content, so it is neither aduplicate nor dependent on #6859.