-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bot triaged[Bot] This issue is triaged by ADK bot[Bot] This issue is triaged by ADK botcore[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation
Description
When a remote agent invokes a tool that returns an Artifact, ADK fails while converting the response into A2A events.
2025-07-10 06:40:55,867 ERROR event_converter.py:600 Failed to convert event to A2A events: Artifact conversion failed: 'coroutine' object has no attribute 'text'
2025-07-10 06:40:55,867 ERROR a2a_agent_executor.py:149 Error handling A2A request: Artifact conversion failed: 'coroutine' object has no attribute 'text'
Traceback (most recent call last):
File ".../google/adk/a2a/converters/event_converter.py", line 186, in _convert_artifact_to_a2a_events
converted_part = convert_genai_part_to_a2a_part(part=artifact_part)
File ".../google/adk/utils/feature_decorator.py", line 111, in wrapper
return obj(*args, **kwargs)
File ".../google/adk/a2a/converters/part_converter.py", line 149, in convert_genai_part_to_a2a_part
if part.text: # <-- crashes here
AttributeError: 'coroutine' object has no attribute 'text'
The issue is in the A2A converter where it's trying to access .text on a coroutine object instead of awaiting it first.
Steps to Reproduce
Invoke a remote agent that calls a tool creating an Artifact (e.g., a file or image).
Invoke the agent through ADK’s new RemoteA2AAgent class.
Observe the conversion failure in logs; no response is returned to the caller.
Expected Behavior
The Artifact should be converted into one or more valid A2A Part objects (e.g., file, image, or blob), and the agent response should propagate without error.
Actual Behavior
The conversion code receives a coroutine, attempts to read part.text, and raises AttributeError, causing the entire A2A request to fail.
Metadata
Metadata
Assignees
Labels
bot triaged[Bot] This issue is triaged by ADK bot[Bot] This issue is triaged by ADK botcore[Component] This issue is related to the core interface and implementation[Component] This issue is related to the core interface and implementation