a2a-net.Server.Infrastructure.Abstractions
                                
                            
                                0.10.0
                            
                        
                            
                                
                                
                                    Prefix Reserved
                                
                            
                    dotnet add package a2a-net.Server.Infrastructure.Abstractions --version 0.10.0
NuGet\Install-Package a2a-net.Server.Infrastructure.Abstractions -Version 0.10.0
<PackageReference Include="a2a-net.Server.Infrastructure.Abstractions" Version="0.10.0" />
<PackageVersion Include="a2a-net.Server.Infrastructure.Abstractions" Version="0.10.0" />
<PackageReference Include="a2a-net.Server.Infrastructure.Abstractions" />
paket add a2a-net.Server.Infrastructure.Abstractions --version 0.10.0
#r "nuget: a2a-net.Server.Infrastructure.Abstractions, 0.10.0"
#:package a2a-net.Server.Infrastructure.Abstractions@0.10.0
#addin nuget:?package=a2a-net.Server.Infrastructure.Abstractions&version=0.10.0
#tool nuget:?package=a2a-net.Server.Infrastructure.Abstractions&version=0.10.0
A2A-NET
Agent-to-Agent (A2A) is a lightweight, extensible protocol and framework for orchestrating tasks and exchanging structured content between autonomous agents using JSON-RPC 2.0.
🧩 Projects
🧠 Core
- a2a-net.Core
 Contains the core abstractions, models, contracts, and data types shared across both clients and servers.
 This package is dependency-free and safe to use in any environment.
📡 Client
- a2a-net.Client.Abstractions
 Contains core interfaces and contracts for implementing A2A clients.
- a2a-net.Client
 Includes client-side functionality for A2A agent discovery and metadata resolution.
- a2a-net.Client.Http
 Implements the HTTP transport for- IA2AProtocolClientAllows establishing persistent agent-to-agent communication over HTTP connections.
- a2a-net.Client.WebSocket
 Implements the WebSocket transport for- IA2AProtocolClientAllows establishing persistent agent-to-agent communication over WebSocket connections.
🛠️ Server
- a2a-net.Server
 Core components for building A2A-compatible agents.
 Includes task execution, state management, event streaming, and runtime integration.
- a2a-net.Server.AspNetCore
 ASP.NET Core integration layer that allows hosting A2A endpoints over WebSocket using JSON-RPC.
 Provides middleware, routing, and server bootstrap extensions.
🧱 Server Infrastructure
- a2a-net.Server.Infrastructure.Abstractions
 Defines abstractions for task persistence, event streaming, and other infrastructure concerns.
 Enables support for custom and pluggable storage/event backends.
- a2a-net.Server.Infrastructure.DistributedCache
 Distributed cache–based implementation of A2A task storage using- IDistributedCache.
 Useful for scenarios that require scalable, lightweight task state persistence.
🚀 Getting Started
Install the packages
dotnet add package a2a-net.Client
dotnet add package a2a-net.Client.Http
dotnet add package a2a-net.Client.WebSocket
dotnet add package a2a-net.Server.Infrastructure.DistributedCache
dotnet add package a2a-net.Server.AspNetCore
Discover a remote agent
 var discoveryDocument = await httpClient.GetA2ADiscoveryDocumentAsync(new Uri("http://localhost"));
Configure and use a client
services.AddA2ProtocolHttpClient(options => 
{
    options.Endpoint = new("http://localhost/a2a");
});
services.AddA2ProtocolWebSocketClient(options => 
{
    options.Endpoint = new("ws://localhost/a2a");
});
var request = new SendTaskRequest()
{
    Params = new()
    {
        Message = new()
        {
            Role = MessageRole.User,
            Parts =
            [
                new TextPart("tell me a joke")
            ]
        }
    }
};
var response = await Client.SendTaskAsync(request);
Host an agent
Configure services
services.AddDistributedMemoryCache();
services.AddA2AProtocolServer(builder =>
{
    builder
        .SupportsStreaming()
        .SupportsPushNotifications()
        .SupportsStateTransitionHistory()
        .UseAgentRuntime<MockAgentRuntime>()
        .UseDistributedCacheTaskRepository();
});
Map A2A Endpoints
app.MapA2AAgentHttpEndpoint("/a2a");
app.MapA2AAgentWebSocketEndpoint("/a2a/ws")
📚 Documentation
For a full overview of the A2A protocol, see google.github.io/A2A
🧪 Samples
Explore sample projects demonstrating how to use the a2a-net solution:
- Semantic Kernel: Demonstrates how to build and host an A2A-compatible agent using Microsoft's Semantic Kernel and OpenAI. Includes both a server that exposes the agent and a client that interacts with it over HTTP using the JSON-RPC protocol.
🛡 License
This project is licensed under the Apache-2.0 License.
🤝 Contributing
Contributions are welcome! Please open issues and PRs to help improve the ecosystem.
See contribution guidelines for more information on how to contribute.
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. | 
- 
                                                    net8.0- a2a-net.Core (>= 0.10.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.6)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.12.1)
- System.Linq.Async (>= 6.0.3)
- System.Reactive (>= 6.0.1)
 
- 
                                                    net9.0- a2a-net.Core (>= 0.10.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.6)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.12.1)
- System.Linq.Async (>= 6.0.3)
- System.Reactive (>= 6.0.1)
 
NuGet packages (2)
Showing the top 2 NuGet packages that depend on a2a-net.Server.Infrastructure.Abstractions:
| Package | Downloads | 
|---|---|
| a2a-net.Server Contains the A2A Protocol server | |
| a2a-net.Server.Infrastructure.DistributedCache Contains a distributed cache implementation of the task repository | 
GitHub repositories
This package is not used by any popular GitHub repositories.