Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Building AI Agents in .NET: A Progressive Series

This is an eleven-part, code-first series for building provider-configurable AI agents with C#, the official OpenAI .NET client, and either OpenAI or OpenRouter.

Each article begins with the working result from the previous article. New abstractions are introduced only when the course needs them, so the reader can see why each layer exists.

Reading order

Part Article Outcome Status
1 Starter agent and multi-turn conversation A configurable conversational agent with in-memory history Complete
2 Structured outputs Type-safe support-ticket extraction using JSON Schema Complete
3 Tool calling An agent loop that invokes local C# functions as tools In Progress
4 Agents as tools An orchestrator agent that delegates to specialized agents exposed as tools Complete
5 Execution and streaming Streaming, cancellation, retries, and execution events Planned
6 Context and state Explicit run context and controlled conversation state Planned
7 Guardrails Input, output, and business-rule validation Planned
8 Persistent sessions Durable conversations that survive application restarts Planned
9 Handoffs and delegation A triage agent that transfers work to specialists Planned
10 Multi-agent orchestration Parallel and sequential workflows across agents Planned
11 Tracing and observability End-to-end telemetry for model calls, tools, and workflows Planned

Repository shape

agentic-ai-crash-course/
├── AgenticAiCrashCourse.slnx
├── LLMSupport/
│   ├── Configuration/
│   │   └── LlmOptions.cs
│   ├── Infrastructure/
│   │   └── LlmClientFactory.cs
│   └── LLMSupport.csproj
├── a-starter-agent/
│   ├── Agents/
│   ├── appsettings.json
│   ├── Program.cs
│   ├── StarterAgent.csproj
│   └── 01-starter-agent.md
├── b-1-structured-output/
│   ├── Agents/
│   ├── Models/
│   ├── Schemas/
│   ├── Serialization/
│   ├── appsettings.json
│   ├── Program.cs
│   ├── StructuredOutputAgent.csproj
│   └── 02-structured-outputs.md
├── b-2-structured-product-review-agent/
│   └── ...
├── c-1-tool-calling/
│   ├── ToolUsingAgent/
│   │   ├── Agents/
│   │   ├── Tools/
│   │   ├── appsettings.json
│   │   ├── Program.cs
│   │   └── ToolUsingAgent.csproj
│   └── 03-tool-calling.md
└── ...

Every article uses a separate runnable console project, named with a lettered prefix (a-starter-agent, b-structured-output, ...) that reflects reading order. Each article's markdown file lives next to the project it describes instead of in a separate docs/ tree, so the article and the code stay side by side.

Provider configuration and ChatClient creation are defined once in the shared LLMSupport class library and referenced by every part's project (<ProjectReference Include="..\LLMSupport\LLMSupport.csproj" />), so that shape does not need to be recreated per article.

Article contract

Every article follows this order:

  1. The problem introduced at this stage
  2. What the reader will build
  3. Concepts and request flow
  4. Incremental implementation steps
  5. OpenAI and OpenRouter verification
  6. Failure cases and design tradeoffs
  7. Exercises
  8. What the next article adds

Provider compatibility rule

The examples use OpenAI-compatible Chat Completions capabilities shared by the selected OpenAI and OpenRouter models. Provider-specific behavior is isolated behind configuration or an adapter and is called out explicitly.

Model capabilities vary. Each article should verify that its configured model supports the feature being taught, especially structured outputs and function calling.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages