a2aproject / a2aproject/a2a-dotnet

[Feat]: gRPC support — client and server

Open
#397 1 comment 1 reaction 1 assignee Claimed by @janosSarusiKis View on GitHub
Dominant language
C#
Stars
262
Forks
64
Avg merge
5d 2h
Merged PRs (30d)
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.