StackA2A
enterprisecsharp

Coffeeshop Agent

31

by thangchung

.NET Agents technologies (Microsoft Agent Framework, MCP, A2A, AG-UI)

26 starsUpdated 2025-11-28MIT
Quality Score31/100
Community
32
Freshness
52
Official
30
Skills
10
Protocol
30
🔒 Security
20

Getting Started

1Clone the repository
$ git clone https://github.com/thangchung/coffeeshop-agent
2Navigate to the project
$ cd coffeeshop-agent
3Install dependencies
$ dotnet restore
4Run the agent
$ dotnet run

README

coffeeshop-agent

.NET Agents technologies

This is a demonstration application. Certain scenarios presented may be unrealistic or not suitable for real-world use. Please do not replicate or deploy this in a production environment.

High level architecture

graph TD
    subgraph "Identity Provider"
        EntraID[Microsoft Entra ID]
    end

    subgraph "User Interaction"
        WebApp[ChatApp <br> - A2A Client]
    end

    subgraph "Orchestration"
        AppHost
    end

    subgraph "Backend Services"
        Counter[CounterService <br> - A2A Server/Client, MCP Client]
        Barista[BaristaService <br> - A2A Server]
        Kitchen[KitchenService <br> - A2A Server]
        ProductCatalog[ProductCatalogService <br> - MCP Server]
    end

    subgraph "Shared Infrastructure"
        ServiceDefaults
    end

    %% Core Interactions
    WebApp -- "A2A Protocol" --> Counter
    Counter -- "A2A Protocol" --> Barista
    Counter -- "A2A Protocol" --> Kitchen
    Counter -- "MCP Protocol" --> ProductCatalog

    %% Authentication & Authorization
    EntraID -- "Secures" --> WebApp
    EntraID -- "Secures" --> Counter
    EntraID -- "Secures" --> Barista
    EntraID -- "Secures" --> Kitchen
    EntraID -- "Secures" --> ProductCatalog

    %% Development-time Orchestration
    AppHost -.-> WebApp
    AppHost -.-> Counter
    AppHost -.-> Barista
    AppHost -.-> Kitchen
    AppHost -.-> ProductCatalog
    
    %% Shared Dependencies
    WebApp -- "Uses" --> ServiceDefaults
    Counter -- "Uses" --> ServiceDefaults
    Barista -- "Uses" --> ServiceDefaults
    Kitchen -- "Uses" --> ServiceDefaults
    ProductCatalog -- "Uses" --> ServiceDefaults

    class WebApp user;
    class Counter,Barista,Kitchen,ProductCatalog backend;
    class AppHost orchestrator;
    class ServiceDefaults shared;
    class EntraID identity;

Get starting

dotnet run

Access to .NET Aspire dashboard, then open the web, and from the chat box type:

a black coffee pls
I want a black coffee, cappuccino, latte, 2 chicken meat balls and 2 cake pops.

MCP

npx @modelcontextprotocol/inspector
http://localhost:5001/mcp/sse
http://localhost:5001/.well-known/oauth-protected-resource

A2A

$Env:GEMINI_API_KEY = '<key>'; agentgateway -f .\agentgateway\config.yaml
http://localhost:5000/.well-known/agent.json

MAF - Workflow

flowchart TD
  ValidatorExecutor["ValidatorExecutor (Start)"];
  SplitExecutor["SplitExecutor"];
  HandleUncertainExecutor["HandleUncertainExecutor"];
  BaristaExecuter["BaristaExecuter"];
  KitchenExecuter["KitchenExecuter"];
  AggregationExecutor["AggregationExecutor"];

  fan_in::AggregationExecutor::76F793D9((fan-in))
  BaristaExecuter --> fan_in::AggregationExecutor::76F793D9;
  KitchenExecuter --> fan_in::AggregationExecutor::76F793D9;
  fan_in::AggregationExecutor::76F793D9 --> AggregationExecutor;
  ValidatorExecutor --> SplitExecutor;
  ValidatorExecutor --> HandleUncertainExecutor;
  SplitExecutor --> BaristaExecuter;
  SplitExecutor --> KitchenExecuter;

References

Capabilities

StreamingPush NotificationsMulti-TurnAuth: none
ag-ui-protocolagent-frameworkagentic-aiagentsaidotnetmcpmicrosoftmicrosoft-agent-frameworkmultiagent
View on GitHub