"Because calling it 'AI-Stuff-I-Throw-Together-At-2AM' didn't fit the domain name."
A hands-on companion repository for the AI Agents in .NET blog series at svnscha.de. Each branch builds on the previous, taking you from "Hello World" to agentic systems. The current merged variant is on main.
| Branch | Topic | What You'll Learn | CodeSpace |
|---|---|---|---|
main |
Latest | Merged version of all branches. | |
part/00-repository-setup |
Repository & Hello World Agent | Project setup, DevUI, your first conversational agent | |
part/01-agentic-rag |
AI Agents in .NET: Building Agentic RAG | PostgreSQL storage, Tool calling, Message Persistence, Embeddings | |
part/02-connect-librechat |
AI Agents in .NET: Beyond DevUI - LibreChat Integration | LibreChat, Tool Call Middleware, Hosting as OpenAI Compatible API |
New branches added as the series progresses. Star the repo to stay updated!
src/
├── Knowledge/ # Web API with DevUI (simple agent, no persistence)
└── Knowledge.Shared/ # Shared services, entities, and storage
- Clone & checkout the branch for your current article
- Open in VS Code with Dev Containers (or GitHub Codespaces)
- Configure your API key (see Configuration below)
- Database migration
dotnet ef database update --project src/Knowledge.Shared - Run
dotnet run --project src/Knowledge - Navigate to
http://localhost:5000/devui
Application settings are managed via appsettings.json and appsettings.Development.json. For sensitive values like API keys, use .NET User Secrets.
Initialize and set your API key:
# Navigate to the Knowledge project
cd src/Knowledge
# Set your OpenAI API key
dotnet user-secrets set "Knowledge:ApiKey" "your-api-key-here"
To view your current secrets:
dotnet user-secrets listTo remove a secret:
dotnet user-secrets remove "Knowledge:ApiKey"Note: User secrets are stored outside the project directory and are never committed to source control. They only work in the
Developmentenvironment.
- .devcontainer with .NET 10 and PostgreSQL + pgvector
- ASP.NET including DevUI and Microsoft Agent Framework
Follow along at svnscha.de where each article walks through the code in detail.
MIT - Build something awesome.