Skip to content

fix(a2a): advertise streaming on agent_registry agent cards - #6781

Open
lllakshit wants to merge 1 commit into
google:mainfrom
lllakshit:fix/6778-agent-registry-streaming-default
Open

fix(a2a): advertise streaming on agent_registry agent cards#6781
lllakshit wants to merge 1 commit into
google:mainfrom
lllakshit:fix/6778-agent-registry-streaming-default

Conversation

@lllakshit

Copy link
Copy Markdown

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

Problem:
AgentRegistry.get_remote_a2a_agent() builds a card through _compat.build_agent_card() with neither capabilities nor streaming. The helper then falls through to default_capabilities where streaming defaults to False, so registry-constructed cards advertise streaming: false.

The issue also asked which public-API shape to use for the streaming= parameter. This PR takes the non-breaking option: keep streaming= as the no-capabilities convenience path only. It does not drop streaming= (that would remove public surface) and does not compose streaming= onto a passed capabilities object (that would change the meaning of an existing parameter; current tests already lock in "capabilities wins").

AgentCardBuilder still defaults AgentCapabilities() without streaming=True on GitHub main (#6673 closed without landing here). That is #6672 and is left out of this PR so this stays one concern.

Solution:
Pass streaming=True at the agent_registry call site, which is the convenience path build_agent_card already implements. Document that streaming= is ignored when capabilities is provided.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Commands:

pytest tests/unittests/a2a/test_compat.py tests/unittests/integrations/agent_registry/test_agent_registry.py

Summary (Python 3.12.10, a2a-sdk 1.1.2, matching the issue repro):

71 passed, 24 skipped in 4.98s

Skipped tests are the existing 0.3-only @v03_only cases; this environment is a2a-sdk 1.x. New coverage that runs on 1.x:

  • helper without capabilities still defaults streaming to False
  • streaming=True is honoured when capabilities is omitted
  • a passed capabilities object still wins (no composition)
  • get_remote_a2a_agent() constructed cards advertise streaming is True

Manual End-to-End (E2E) Tests:

Reproduced the issue snippet against GitHub main vs this branch (a2a-sdk 1.1.2):

main agent_registry shape (omit streaming=):  False
this PR (streaming=True, no capabilities):    True
capabilities=AgentCapabilities(streaming=True), streaming=False: True

git show upstream/main:.../agent_registry.py still has no streaming= on that call. After this change the same call passes streaming=True.

No adk web UI change; this is card construction only.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

I will complete the Google CLA if it is not already on file.

Assisted by an AI coding tool; I reviewed the diff, ran the tests above, and confirmed the issue still reproduces on main.

agent_registry called build_agent_card without capabilities or streaming,
so constructed cards advertised streaming:false. Pass streaming=True on
that convenience path and document that streaming= is ignored when
capabilities is provided.

Fixes google#6778
@google-cla

google-cla Bot commented Aug 18, 2026

Copy link
Copy Markdown

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.

@lllakshit

Copy link
Copy Markdown
Author

@googlebot rescan

I have already signed the Google Individual CLA (Lakshit Mathur / lllakshit / llakshitmathur239@gmail.com). Please re-check this pull request.

@lllakshit

Copy link
Copy Markdown
Author

@DeanChensj Could you please review this PR and let me know if any changes are required? I’d appreciate your feedback so I can address any remaining concerns and move it toward merging into main.

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.

build_agent_card(): agent_registry cards stay streaming:false after #6673, and the streaming= parameter becomes unreachable

2 participants