# bingbing-gui/dotnet-agent-playbook architecture

> Architecture diagram of the GitHub repository bingbing-gui/dotnet-agent-playbook, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bingbing-gui/dotnet-agent-playbook
- Repository: https://github.com/bingbing-gui/dotnet-agent-playbook

## Overview

dotnet-agent-playbook is a collection of .NET learning materials and runnable examples, with AI agents as its active focus and older ASP.NET Core material archived. There is no single application workflow: in the sampled agent examples, an HTTP request reaches a controller, which invokes a Semantic Kernel or MCP-backed tool flow and streams a response; the Agent Framework samples demonstrate separate agent patterns. README documents these as topic-aligned examples, but most individual sample internals were not inspected, so links between unsampled components are omitted.

Main entry points: [`src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs`](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs) (Book Controller), [`src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs`](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs) (Chat2Bug Controller), [`src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs`](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs) (GitHub HTTP Demo), [`src/aspnet-core-samples/QuartzTimerMonitor/Program.cs`](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Program.cs) (Timer Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent Framework"]
  node_agent_examples["Agent Patterns"]
  node_middleware_program["Agent Middleware<br/>[Program.cs]"]
  node_writer_critic["Writer Critic<br/>[Program.cs]"]
  node_flow_examples["Agent Flows"]
end

subgraph group_sk["Semantic Kernel"]
  node_book_controller["Book Controller<br/>[BookController.cs]"]
  node_order_plugin["Order Book Plugin<br/>[OrderBookPlugin.cs]"]
  node_book_model["Book Model<br/>[Book.cs]"]
  node_mcp_controller["Chat2Bug Controller"]
  node_mcp_service["MCP Tool Service<br/>[Services]"]
  node_prompt_examples["Prompt Examples<br/>[SK.RunPrompts]"]
  node_embedding_examples["Embedding Examples"]
  node_vector_examples[("Vector Store Examples<br/>[SK.VectorStores]")]
end

subgraph group_providers["Model Providers"]
  node_foundry_chat["Foundry Chat<br/>[ChatController.cs]"]
end

subgraph group_archive["Archived .NET"]
  node_foundation_archive["Foundation Topics"]
  node_github_controller["GitHub HTTP Demo<br/>[HomeController.cs]"]
  node_github_service["GitHub Service<br/>[GitHubService.cs]"]
  node_github_models["GitHub Data Models<br/>[GitHubBranch.cs]"]
  node_identity_admin["Identity Admin<br/>[AdminController.cs]"]
  node_identity_user["Identity User<br/>[AppUser.cs]"]
end

subgraph group_samples["ASP.NET Samples"]
  node_timer_api["Timer API"]
  node_timer_job["Scheduled Timer Job<br/>[NamedTimerJob.cs]"]
  node_timer_hub["Timer Hub<br/>[TimerHub.cs]"]
  node_timer_status["Timer Status<br/>[TimerStatusDto.cs]"]
  node_timer_setup["Timer Setup<br/>[Program.cs]"]
end

node_reader(("Learner"))

node_reader -->|"studies examples"| node_agent_examples
node_reader -->|"runs examples"| node_book_controller
node_book_controller -->|"loads menu"| node_order_plugin
node_book_controller -->|"passes books"| node_book_model
node_mcp_controller -->|"lists tools"| node_mcp_service
node_mcp_controller -->|"streams tool reply"| node_mcp_service
node_github_controller -->|"requests issues"| node_github_service
node_github_controller -->|"deserializes branches"| node_github_models
node_identity_admin -->|"creates users"| node_identity_user
node_timer_setup -->|"registers job"| node_timer_job
node_timer_setup -->|"maps hub"| node_timer_hub
node_timer_api -->|"returns status"| node_timer_status
node_timer_job -->|"publishes updates"| node_timer_hub

click node_agent_examples "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Agent-Framework"
click node_middleware_program "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Agent-Framework/14-Agent-Middleware/Program.cs"
click node_writer_critic "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Agent-Framework/39-WriterCritic-Pattern/39-WriterCritic-Pattern/Program.cs"
click node_flow_examples "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Agent-Framework"
click node_book_controller "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs"
click node_order_plugin "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Plugins/OrderBookPlugin.cs"
click node_book_model "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Models/Book.cs"
click node_mcp_controller "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs"
click node_mcp_service "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Services"
click node_prompt_examples "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.RunPrompts"
click node_embedding_examples "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.TextEmbeddingGeneration"
click node_vector_examples "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.VectorStores"
click node_foundry_chat "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Azure-AI-Foundry-SDK/ChatApp/Controllers/ChatController.cs"
click node_foundation_archive "https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/_archive/foundation"
click node_github_controller "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs"
click node_github_service "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Service/GitHubService.cs"
click node_github_models "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Models/GitHubBranch.cs"
click node_identity_admin "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/Identity/Controllers/AdminController.cs"
click node_identity_user "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/Identity/Models/AppUser.cs"
click node_timer_api "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Controllers/TimersController.cs"
click node_timer_job "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Jobs/NamedTimerJob.cs"
click node_timer_hub "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/TimerHub.cs"
click node_timer_status "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Models/TimerStatusDto.cs"
click node_timer_setup "https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Program.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agent_examples,node_middleware_program,node_writer_critic,node_flow_examples toneBlue
class node_book_controller,node_order_plugin,node_book_model,node_mcp_controller,node_mcp_service,node_prompt_examples,node_embedding_examples,node_vector_examples toneAmber
class node_foundry_chat toneMint
class node_foundation_archive,node_github_controller,node_github_service,node_github_models,node_identity_admin,node_identity_user toneRose
class node_timer_api,node_timer_job,node_timer_hub,node_timer_status,node_timer_setup,node_reader toneIndigo
```

## Components

### Agent Framework

- [Agent Patterns](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Agent-Framework): `src/ai-agent/Agent-Framework`
- [Agent Middleware](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Agent-Framework/14-Agent-Middleware/Program.cs): `src/ai-agent/Agent-Framework/14-Agent-Middleware/Program.cs`
- [Writer Critic](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Agent-Framework/39-WriterCritic-Pattern/39-WriterCritic-Pattern/Program.cs): `src/ai-agent/Agent-Framework/39-WriterCritic-Pattern/39-WriterCritic-Pattern/Program.cs`
- [Agent Flows](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Agent-Framework): `src/ai-agent/Agent-Framework`

### Semantic Kernel

- [Book Controller](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs): `src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs`
- [Order Book Plugin](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Plugins/OrderBookPlugin.cs): `src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Plugins/OrderBookPlugin.cs`
- [Book Model](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Models/Book.cs): `src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Models/Book.cs`
- [Chat2Bug Controller](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs): `src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs`
- [MCP Tool Service](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Services): `src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Services`
- [Prompt Examples](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.RunPrompts): `src/ai-agent/Semantic-Kernel/SK.RunPrompts`
- [Embedding Examples](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.TextEmbeddingGeneration): `src/ai-agent/Semantic-Kernel/SK.TextEmbeddingGeneration`
- [Vector Store Examples](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/ai-agent/Semantic-Kernel/SK.VectorStores): `src/ai-agent/Semantic-Kernel/SK.VectorStores`

### Model Providers

- [Foundry Chat](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/ai-agent/Azure-AI-Foundry-SDK/ChatApp/Controllers/ChatController.cs): `src/ai-agent/Azure-AI-Foundry-SDK/ChatApp/Controllers/ChatController.cs`

### Archived .NET

- [Foundation Topics](https://github.com/bingbing-gui/dotnet-agent-playbook/tree/master/src/_archive/foundation): `src/_archive/foundation`
- [GitHub HTTP Demo](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs): `src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs`
- [GitHub Service](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Service/GitHubService.cs): `src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Service/GitHubService.cs`
- [GitHub Data Models](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Models/GitHubBranch.cs): `src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Models/GitHubBranch.cs`
- [Identity Admin](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/Identity/Controllers/AdminController.cs): `src/_archive/foundation/01-Basics/Identity/Controllers/AdminController.cs`
- [Identity User](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/_archive/foundation/01-Basics/Identity/Models/AppUser.cs): `src/_archive/foundation/01-Basics/Identity/Models/AppUser.cs`

### ASP.NET Samples

- [Timer API](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Controllers/TimersController.cs): `src/aspnet-core-samples/QuartzTimerMonitor/Controllers/TimersController.cs`
- [Scheduled Timer Job](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Jobs/NamedTimerJob.cs): `src/aspnet-core-samples/QuartzTimerMonitor/Jobs/NamedTimerJob.cs`
- [Timer Hub](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/TimerHub.cs): `src/aspnet-core-samples/QuartzTimerMonitor/TimerHub.cs`
- [Timer Status](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Models/TimerStatusDto.cs): `src/aspnet-core-samples/QuartzTimerMonitor/Models/TimerStatusDto.cs`
- [Timer Setup](https://github.com/bingbing-gui/dotnet-agent-playbook/blob/master/src/aspnet-core-samples/QuartzTimerMonitor/Program.cs): `src/aspnet-core-samples/QuartzTimerMonitor/Program.cs`

### Other components

- **Learner**

## Connections

- Learner → Agent Patterns: studies examples (evidence: `README.md`)
- Learner → Book Controller: runs examples (evidence: `README.md`)
- Book Controller → Order Book Plugin: loads menu (evidence: `src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs`)
- Book Controller → Book Model: passes books (evidence: `src/ai-agent/Semantic-Kernel/SK.FunctionCalling/Controllers/BookController.cs`)
- Chat2Bug Controller → MCP Tool Service: lists tools (evidence: `src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs`)
- Chat2Bug Controller → MCP Tool Service: streams tool reply (evidence: `src/ai-agent/Semantic-Kernel/SK.MCP.Plugins/Controllers/Chat2BugController.cs`)
- GitHub HTTP Demo → GitHub Service: requests issues (evidence: `src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs`)
- GitHub HTTP Demo → GitHub Data Models: deserializes branches (evidence: `src/_archive/foundation/01-Basics/HttpClient/HttpClient-01/Controllers/HomeController.cs`)
- Identity Admin → Identity User: creates users (evidence: `src/_archive/foundation/01-Basics/Identity/Controllers/AdminController.cs`)
- Timer Setup → Scheduled Timer Job: registers job (evidence: `src/aspnet-core-samples/QuartzTimerMonitor/Program.cs`)
- Timer Setup → Timer Hub: maps hub (evidence: `src/aspnet-core-samples/QuartzTimerMonitor/Program.cs`)
- Timer API → Timer Status: returns status (evidence: `src/aspnet-core-samples/QuartzTimerMonitor/Controllers/TimersController.cs`)
- Scheduled Timer Job → Timer Hub: publishes updates (evidence: `src/aspnet-core-samples/QuartzTimerMonitor/Jobs/NamedTimerJob.cs`)
