Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add an optional "extensions" property to AgentCard for listing custom API extensions.
Motivation
It is understandable that the A2A protocol specification attempts to be as generic as possible to accommodate many agent interaction use cases. However, by not defining a way of calling custom RPC methods that developers may decide to implement on their A2A servers (to address cases not covered by the specification), the A2A protocol puts some limitations on the agentic app developers.
Of course, if necessary, additional APIs can always be deployed on separate endpoints (and it makes sense for scalability). However, some developers may like the simplicity of single-endpoint deployments for their smaller agentic apps.
While anyone can take an A2A server library and manually add their custom methods, the lack of guiding definitions in the A2A spec means that extensions developed on such forked libraries are not easily shareable with the community. Furthermore, it would add the effort overhead required for maintaining a forked version of the server library.
Description
This PR adds an optional property to
AgentCard
to allow listing of custom API extensions.Use Cases
Here are some use case examples:
Details
An extension entry only needs to specify the "what" (unique
id
,methods
) and "where" (prefix
), leaving other details up to the extension developers (also allowing them to add more details as metadata).So, the schema for an extension entry is defined as follows:
Example: Custom Task History Management API
For example, an extension that adds history management methods can be listed as follows:
With such an extension installed, the client, after running some mock tasks (e.g., comparing different travel plans given by the travel agent), can clean up these tasks with:
Next Steps
Since the added "extensions" property is optional, this is a non-breaking change to the current A2A protocol. The official SDK can be updated to support his feature at a later time.
Other A2A server libraries that wish to support this option can implement a way of registering additional RPC methods (e.g., similar to how routes are registered in WSGI and ASGI apps). For convenience, the default option for registering an extension can be set to append it to AgentCard(s) automatically. This would help with the deployment consistency for such agentic apps as well.
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTING
Guide.nox -s format
from the repository root to format)Fixes #585 🦕