Skip to content

Add new a2a call task to the specification and schema - #1114

Merged
cdavernas merged 7 commits into
open-workflow-specification:mainfrom
emmanuelallen:feat-a2a-task
Aug 28, 2025
Merged

Add new a2a call task to the specification and schema#1114
cdavernas merged 7 commits into
open-workflow-specification:mainfrom
emmanuelallen:feat-a2a-task

Conversation

@emmanuelallen

Copy link
Copy Markdown
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.

Signed-off-by: Emmanuel Allen <emmanuelallensoftware@gmail.com>
@yzhao244

Copy link
Copy Markdown
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 :)

@ricardozanini ricardozanini left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread dsl-reference.md Outdated
Comment thread dsl-reference.md Outdated
Comment thread dsl-reference.md
Comment thread dsl-reference.md
Comment thread 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
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
Collaborator

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.

Comment thread schema/workflow.yaml
Comment thread schema/workflow.yaml
Comment thread dsl-reference.md Outdated
Comment thread schema/workflow.yaml
Comment thread schema/workflow.yaml
Comment thread 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
Copy Markdown
Collaborator

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.

Comment thread dsl-reference.md
Signed-off-by: Emmanuel Allen <emmanuelallensoftware@gmail.com>
Signed-off-by: Emmanuel Allen <emmanuelallensoftware@gmail.com>
Signed-off-by: Emmanuel Allen <emmanuelallensoftware@gmail.com>
Signed-off-by: Emmanuel Allen <emmanuelallensoftware@gmail.com>
@ricardozanini

Copy link
Copy Markdown
Collaborator

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

@emmanuelallen

emmanuelallen commented Aug 27, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Collaborator

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

@ricardozanini

Copy link
Copy Markdown
Collaborator

I'll take a look later.

Signed-off-by: Emmanuel Allen <emmanuelallensoftware@gmail.com>
@emmanuelallen

emmanuelallen commented Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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
Copy Markdown
Collaborator

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

emmanuelallen commented Aug 28, 2025

Copy link
Copy Markdown
Contributor Author

@yzhao244 @ricardozanini

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

@cdavernas cdavernas left a comment

Copy link
Copy Markdown
Collaborator

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 open-workflow-specification:main Aug 28, 2025
3 checks passed
@yzhao244

Copy link
Copy Markdown
Contributor

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

@ricardozanini

Copy link
Copy Markdown
Collaborator

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

@yzhao244

Copy link
Copy Markdown
Contributor

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

Yes, lets do it. 😄

Btw, quick question. Any tentative date for 1.1.0 release date lol

@ricardozanini

Copy link
Copy Markdown
Collaborator

@yzhao244 it depends if we can do MCP one. I believe we can set a date after merging MCP. @cdavernas wdyt?

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