You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workflow output_schema is dropped when exposed via to_a2a(); artifact contains only the last agent node's text output #6762
a2a[Component] This issue is related a2a support inside ADK.request clarification[Status] The maintainer need clarification or more information from the author
Describe the Bug:
A Workflow with a declared output_schema returns the correct typed object when executed with InMemoryRunner, but when the same workflow is exposed via to_a2a() the resulting A2A artifact contains only the text output of the last LlmAgent node that ran. The workflow's actual return value is discarded.
Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:
Define a dynamic workflow whose node returns a Pydantic model with several fields. The first 2 agent's node returned pydantic BaseModel, while the last node returned a str. The final output is built by taking the outputs of different agents via RemoteA2aAgent (2 classes, 1 str)
Set output_schema on the Workflow.
Run it via InMemoryRunner / Expose it through FastAPI → the emitted event contains the full model.
Expose the same workflow with to_a2a() and call it via JSON-RPC message/send → result.artifacts contains only the last agent's text (str). The other fields appear as separate text fragments in result.history, but not in the artifact key itself.
Expected Behavior:
The artifact should contain the workflow's return value, validated against output_schema.
Observed Behavior:
The artifact only contained the output of the last Agent that was invoked by using ctx.run_node. No matter what the output returned by means of Event(output=...)
Environment Details:
ADK Library Version (google-adk[extensions]) 2.6.3
Root cause: A2A converters only looked at event.content.parts, while Workflow output_schema finals are emitted as Event(output=...) with empty content — so to_a2a() kept the last agent text as the artifact. The PR serializes Event.output into DataParts when content is absent.
@Jausk if you can try the PR branch against your setup that would be helpful. @surajksharma07 for triage visibility.
@Jausk Dug into this and it lines up with what a2105z found in #6777. The A2A converters only ever read event.content so a Workflow's output_schema result (which comes through as Event.output with no content) just gets skipped. Patched it the same way locally (map Event.output to a DataPart when content's empty) and it holds up in our tests.
Could you pull that branch and run it against your actual node setup to confirm?
If it checks out please put it through a solid test pass before raising a separate PR since #6777 already covers this fix.
a2a[Component] This issue is related a2a support inside ADK.request clarification[Status] The maintainer need clarification or more information from the author
Activity
a2105z commentedon Aug 17, 2026
Let me try to take a stab at this - going to reproduce the error and open a PR - nobody else take this.
a2105z commentedon Aug 17, 2026
Opened a fix — see the linked PR.
Root cause: A2A converters only looked at
event.content.parts, while Workflowoutput_schemafinals are emitted asEvent(output=...)with empty content — soto_a2a()kept the last agent text as the artifact. The PR serializesEvent.outputinto DataParts when content is absent.@Jausk if you can try the PR branch against your setup that would be helpful. @surajksharma07 for triage visibility.
a2105z commentedon Aug 17, 2026
PR: #6777
fix(a2a): map Event.output into to_a2a artifacts
fix(a2a): map Event.output into to_a2a artifacts
fix(a2a): map Event.output into to_a2a artifacts
surajksharma07 commentedon Aug 19, 2026
@Jausk Dug into this and it lines up with what a2105z found in #6777. The A2A converters only ever read event.content so a Workflow's output_schema result (which comes through as Event.output with no content) just gets skipped. Patched it the same way locally (map Event.output to a DataPart when content's empty) and it holds up in our tests.
Could you pull that branch and run it against your actual node setup to confirm?
If it checks out please put it through a solid test pass before raising a separate PR since #6777 already covers this fix.
Jausk commentedon Aug 19, 2026
I can confirm that, after cloning the PR branch, the issue is fixed. Artifact now returns the entire data structure. Thank you all for your efforts!