a2aproject / a2aproject/a2a-dotnet

[Feat]: gRPC support — client and server

Ouverte
#397 1 commentaire 1 réaction 1 personne assignée Réclamée par @janosSarusiKis Voir sur GitHub
Langage dominant
C#
Étoiles
262
Forks
64
Merge moyen
5 j 2 h
PR mergées (30 j)
31

Description

### Summary
Add built-in A2A support for the GRPC binding: a gRPC client implementing IA2AClient and an ASP.NET Core gRPC host that serves the same operations as today’s JSON-RPC / HTTP+JSON endpoints, backed by the existing IA2ARequestHandler pipeline.

### Background
The spec allows GRPC alongside JSON-RPC and HTTP+JSON. This repo already defines ProtocolBindingNames.Grpc and allows A2AClientFactory.Register(...), but there is no first-party gRPC implementation; README documents JSON-RPC + HTTP+JSON only. v1 JSON follows ProtoJSON conventions, which should align with a protobuf/gRPC contract if the protocol provides (or will provide) canonical .proto files.

### Goals
Client: IA2AClient over gRPC with parity for unary and streaming operations (e.g. SendStreamingMessage, SubscribeToTask), including sensible error mapping to A2AException / A2AErrorCode.
Server: Extension similar in spirit to MapA2A / MapHttpA2A that maps gRPC services to IA2ARequestHandler (reuse task/message/push-config behavior; do not fork business logic).
Packaging: Prefer a dedicated package (e.g. A2A.Grpc) so core users are not forced to reference Grpc.Net.* unless they need gRPC.
Quality: Integration tests; CI builds/tests on net8.0 / net10.0; validate Native AOT compatibility where required by this repo.
Open questions / dependencies
Source of truth for .proto (official A2A artifacts vs. maintained in-repo).
Exact streaming and error semantics per spec for gRPC vs. current SSE/JSON-RPC behavior.
### References
A2AClientFactory, ProtocolBindingNames.Grpc, MapA2A / MapHttpA2A, IA2ARequestHandler, README.md (protocol compatibility).

**Contributor note:** I am willing to implement and maintain this if the project wants to move forward with it.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.