https://github.com/thangchung/coffeeshop-agent
.NET Agents technologies (Microsoft Agent Framework, MCP, A2A, AG-UI)
https://github.com/thangchung/coffeeshop-agent
a2a-protocol ag-ui-protocol agent-framework agentic-ai agents ai dotnet mcp microsoft microsoft-agent-framework multiagent multiagent-systems workflows
Last synced: 24 days ago
JSON representation
.NET Agents technologies (Microsoft Agent Framework, MCP, A2A, AG-UI)
- Host: GitHub
- URL: https://github.com/thangchung/coffeeshop-agent
- Owner: thangchung
- License: mit
- Created: 2025-08-24T13:45:39.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-11-28T11:52:20.000Z (3 months ago)
- Last Synced: 2025-11-30T19:08:20.436Z (2 months ago)
- Topics: a2a-protocol, ag-ui-protocol, agent-framework, agentic-ai, agents, ai, dotnet, mcp, microsoft, microsoft-agent-framework, multiagent, multiagent-systems, workflows
- Language: C#
- Homepage:
- Size: 450 KB
- Stars: 21
- Watchers: 0
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```mermaid
graph TD
subgraph "Identity Provider"
EntraID[Microsoft Entra ID]
end
subgraph "User Interaction"
WebApp[ChatApp
- A2A Client]
end
subgraph "Orchestration"
AppHost
end
subgraph "Backend Services"
Counter[CounterService
- A2A Server/Client, MCP Client]
Barista[BaristaService
- A2A Server]
Kitchen[KitchenService
- A2A Server]
ProductCatalog[ProductCatalogService
- 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
```sh
$Env:GEMINI_API_KEY = ''; agentgateway -f .\agentgateway\config.yaml
```
```
http://localhost:5000/.well-known/agent.json
```
## MAF - Workflow
```mermaid
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
- https://github.com/thangchung/practical-dotnet-aspire
- https://github.com/thangchung/mcp-labs/blob/feat/a2a_mcp_auth/a2a_mcp_auth_dotnet
- https://devblogs.microsoft.com/foundry/building-ai-agents-a2a-dotnet-sdk/
- https://devblogs.microsoft.com/dotnet/build-a-model-context-protocol-mcp-server-in-csharp/
- https://devblogs.microsoft.com/dotnet/announcing-dotnet-ai-template-preview1/