All Code Modules Covered in This Guide Series
Core/LLM
ClaudeService.cs ILlmService.cs LlmOptions.cs
Core/Agents
ReactAgent.cs ParallelReactAgent.cs PlanningAgent.cs
McpServer/Tools
InventoryTools.cs SupplierTools.cs CalculatorTools.cs ErpTools.cs + 5 more
Web/Services
RealMcpClientService.cs McpServerOptions.cs IMcpServerService.cs
Core/RAG
RagPipeline.cs IVectorStore.cs IEmbeddingService.cs
Core/Memory
IMemoryStore.cs IConversationStore.cs WorkflowEngine.cs
Web
Program.cs appsettings.json

Welcome — What This Project Is

NexaFlowDemo is an ASP.NET Core 9 web application that shows how to add AI intelligence to a supply chain system. It is not a toy — it uses a real AI model (Anthropic's Claude) and covers the main patterns used in production AI systems.

This is the MCP Version: tools are hosted in a separate NexaFlowDemo.McpServer console app and invoked via the official ModelContextProtocol v1.3.0 NuGet package over real JSON-RPC 2.0 / stdio transport. The web app's ReactAgent connects to the McpServer subprocess through RealMcpClientService.

calling an LLM → having it reason and pick tools → giving it access to your database via real MCP tools → letting it search documents → persisting memory between conversations → triggering automated workflows.

Each guide below explains one of those patterns with plain English, C# analogies, and actual code excerpts from this project.

What You Already Need to Know (just C# basics)

How the Pieces Connect (MCP Version)

User query
Agent
LLM (Claude)
RealMcpClientService
McpServer process
(JSON-RPC / stdio)
Answer

The green boxes show the real MCP protocol layer. RealMcpClientService spawns NexaFlowDemo.McpServer as a subprocess and communicates via StdioClientTransport. RAG adds a document-search step before the LLM call. Memory stores facts across conversations. Workflows trigger automated actions when events fire.

Recommended reading order
Guide 01

What Is an LLM?

What a Large Language Model actually is, how the Anthropic API works, how ClaudeService calls it, and what "tokens", "system prompt", and "context window" mean.

ClaudeService LlmOptions SplitPrompt
Guide 02

AI Agents & the ReAct Loop

What an "agent" is (a think-act-observe loop), how ReactAgent routes tool calls through RealMcpClientService to the McpServer subprocess, and how IAsyncEnumerable streams steps in real time.

ReactAgent ParallelReactAgent PlanningAgent
Guide 03

Real MCP Tools — JSON-RPC 2.0 over stdio

How the official Model Context Protocol lets Claude call your C# methods across a subprocess boundary, what [McpServerToolType]/[McpServerTool] attributes do, and how RealMcpClientService bridges the web app to the McpServer.

[McpServerToolType] RealMcpClientService WithToolsFromAssembly
Guide 04

RAG — Making Claude Know Your Documents

What embeddings are, what a vector store does, how RagPipeline retrieves relevant documents and injects them into the prompt, and how the document_search MCP tool exposes this to Claude.

RagPipeline IVectorStore DocumentSearchTools
Guide 05

Memory, Conversation & Workflows

How AI memory works (LLMs are stateless!), how conversation history is stored across requests, and how the WorkflowEngine triggers automated actions from events.

IMemoryStore IConversationStore WorkflowEngine
Guide 06

Full Architecture & Program.cs Walkthrough

How the 4-project solution wires together, the McpServer subprocess model, what each DI registration does, multi-tenancy, cookie authentication, audit logging, and the carrier integration layer.

Program.cs McpServer RealMcpClientService
Reference documents
Reference

Project Roadmap

Full architecture overview, feature map, file layout, MCP migration notes, CLI reference, and the complete list of test scenarios.

Architecture MCP Migration Quick Start
Reference

ClaudeLiveKey → MCP Version Diff

Side-by-side diff of every file changed when migrating from the simulated Claude key version to the real ModelContextProtocol v1.3.0 version.

Diff MCP Migration
Bug Fixes

Bug Fix Log — 2026-05-30

Three resolved issues: MCP server startup crash (TypeInfoResolver), Pipeline SignalR CDN integrity hash failure, and Integration page DI error (ErpConnectorTool).

MCP Server SignalR DI

Tip — Read the Code Alongside These Guides