Skip to content

Conversation

emmanuelallen
Copy link
Contributor

Please specify parts of this PR update:

  • Specification
  • Schema
  • Examples
  • Extensions
  • Use Cases
  • Community
  • CTK
  • Other

Discussion or Issue link:

#1102

What this PR does:

Adds A2A call task to the specification and schema

Additional information:

Push Notifications
A2A push notification currently only support webhooks as a way to send task update notifications. That said external services can convert those webhook invocations into cloud events that the workflow can listen for. Hopefully at some point A2A can support natively or through an extension sending out push notifications as cloud events directly.

Streaming
I am suggesting streaming be handled by collecting up all the objects until the stream is complete and returning them as an ordered array. In the future we can add a foreach argument similar to AsyncAPI that when set will run a set of tasks for each object received.

@yzhao244
Copy link
Contributor

@ricardozanini @cdavernas Our first PR which covers some of our discussions about A2A lol , please review and if necessary, we can even discuss further on our Thursday meeting :)

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks!! Just a few comments so we can start the conversation.

dsl-reference.md Outdated
> The `security` and `securitySchemes` fields of the AgentCard contain authentication requirements and schemes for when communicating with the agent.

> [!NOTE]
> On success the output is the JSON-RPC result. On failure runtimes must raise an error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have error definitions. I believe we should indicate which errors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricardozanini Totally agree. I think a runtime error should be used, and should carry/document the A2A error code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdavernas So you think that it should be an error of type https://serverlessworkflow.io/spec/1.0.0/errors/runtime. Where do you think the A2A error code should go because I don't think it should be the status code since they are in the range -32700 to -32000?

An example error conversion for a task not found a2a error could be:

type: https://serverlessworkflow.io/spec/1.0.0/errors/runtime
status: 500
title: Task not found, A2A Code: -32001
description: The specified task id does not correspond to an existing or active task. It might be invalid, expired, or already completed and purged.
instance: /do/0/callA2A

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emmanuelallen we could put it as status code, because even if it is logically related to http status codes, it is not restricted to them.
I however think your proposal is cleaner. The title could be the code and or a high level description like you proposed, that decision is purely esthetic and should therefore be up to runtimes.

dsl-reference.md Outdated
> The `security` and `securitySchemes` fields of the AgentCard contain authentication requirements and schemes for when communicating with the agent.

> [!NOTE]
> On success the output is the JSON-RPC result. On failure runtimes must raise an error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricardozanini Totally agree. I think a runtime error should be used, and should carry/document the A2A error code.

@ricardozanini
Copy link
Member

@emmanuelallen can you take a look on the red CI?

@emmanuelallen
Copy link
Contributor Author

emmanuelallen commented Aug 27, 2025

@emmanuelallen can you take a look on the red CI?

@ricardozanini

The failing CI check is because the a2a example I added to dsl-reference.md doesn't match the 1.0.0 schema (it's checking against https://serverlessworkflow.io/schemas/1.0.0/workflow.yaml). Possible solutions to fix this are:

  • Remove the example
  • Target a different branch with this PR (it currently targets main but maybe we should create a new branch for 1.1.0)
  • Modify the CI check in some way

Do you have a suggestion for how I should resolve it?

@ricardozanini
Copy link
Member

@emmanuelallen I think the CI must be fixed to match the schema accordingly to the current branch.

@ricardozanini
Copy link
Member

I'll take a look later.

Signed-off-by: Emmanuel Allen <[email protected]>
@emmanuelallen
Copy link
Contributor Author

emmanuelallen commented Aug 28, 2025

@ricardozanini

I was wrong yesterday the ci validation is working as it should. The problem was the with the example, I have now fixed it.
I thought it was pulling the schema from https://serverlessworkflow.io/schemas/1.0.0/workflow.yaml but it's actually just the id that is used.

If you approve the workflow it should succeed, I have run it locally and all the tests pass.

@yzhao244
Copy link
Contributor

Speak of examples, lol — it would definitely be super helpful to include solid DSL examples later on to showcase A2A using our Serverless Workflow. This could highlight multi-agent use cases like:

Multi-agent customer service system:
User → Chat Agent → (A2A) → Billing Agent → (A2A) → Payment System → Response
Decision-making chain (e.g., fraud detection):
Payment Agent → (A2A) → Risk Agent → (A2A) → Compliance Agent → Approve/Reject
And so on lol

@emmanuelallen something you'd be up for helping with in a separate PR 😄? :)

New A2A examples:
https://github.com/serverlessworkflow/specification/tree/main/examples

@ricardozanini
Copy link
Member

I'd say we can push these examples in a separate PR with a follow up issue linked to this one. Can you do it @emmanuelallen ?

@emmanuelallen
Copy link
Contributor Author

emmanuelallen commented Aug 28, 2025

@yzhao244 @ricardozanini

Yeah, I'm happy to add a few a2a examples as a separate PR tomorrow.

Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Cheers ❤️

@cdavernas cdavernas merged commit e8e16c9 into serverlessworkflow:main Aug 28, 2025
3 checks passed
@yzhao244
Copy link
Contributor

@ricardozanini @cdavernas @emmanuelallen Thanks guys for the review and valuable comments. Now we have A2A in our spec 👍

@ricardozanini
Copy link
Member

Let's finish MCP and wrap up to release 1.1.0.

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.

4 participants