feat(a2a): wire artifact delivery interceptor in fast_api A2A setup#5380
feat(a2a): wire artifact delivery interceptor in fast_api A2A setup#5380Venseven wants to merge 1 commit intogoogle:mainfrom
Conversation
Pass include_artifacts_in_a2a_event_interceptor as default interceptor when constructing A2aAgentExecutor in fast_api.py. Previously the interceptor existed (added in e63d991) but was never wired — A2aAgentExecutor was created with no config so execute_interceptors defaulted to None and artifact_delta was silently dropped on the A2A path. Non-breaking: interceptor is no-op when artifact_delta is empty or artifact_service is None. Fixes google#5379 Relates to google#3630
|
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. |
|
Response from ADK Triaging Agent Hello @Venseven, thank you for your contribution! Before we can merge this PR, you need to sign the Contributor License Agreement (CLA). You can do so by following the instructions in the comment from Also, could you please provide the console output or logs from your end-to-end testing? This will help the reviewers to verify the fix more efficiently. Thanks! |
Summary
include_artifacts_in_a2a_event_interceptorwas added in commit e63d991 to allow artifact delivery on the A2A path. However it was never wired —fast_api.pyconstructsA2aAgentExecutorwith no config, soexecute_interceptorsdefaults toNoneandartifact_deltais silently dropped.This PR passes
include_artifacts_in_a2a_event_interceptoras the default interceptor when setting up A2A agents infast_api.py.Changes
fast_api.py: passA2aAgentExecutorConfig(execute_interceptors=[include_artifacts_in_a2a_event_interceptor])when constructingA2aAgentExecutorBehaviour
artifact_service.save_artifact()emit noTaskArtifactUpdateEventon the A2A path —artifact_deltais droppedTaskArtifactUpdateEventon bothmessage/sendandmessage/streampathsNon-breaking
The interceptor is a no-op when
artifact_deltais empty orartifact_serviceisNone. Users who want to opt out can passexecute_interceptors=[]explicitly.Testing
Verified end-to-end with a LangGraph-based agent using
google-adk==1.31.0: artifacts saved during an agent run now appear asTaskArtifactUpdateEventin A2Amessage/sendresponses after this change.Fixes #5379
Relates to #3630