a2aproject / a2aproject/a2a-dotnet
[Feat]: gRPC support — client and server
- Lingua principale
- C#
- Stelle
- 262
- Fork
- 64
- Merge medio
- 5g 2h
- PR unite (30g)
- 31
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Review the existing A2AClientFactory, ProtocolBindingNames.Grpc, MapA2A, and MapHttpA2A extensions to understand the current client and server patterns. Examine the IA2ARequestHandler pipeline and the spec for gRPC binding details. Determine the source for .proto definitions and design the gRPC service mapping and error handling. Integration tests will be needed to validate the implementation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, grpc
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100