Skip to content

Repository files navigation

🧠 Knowledge

"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.

Series Branches

BranchTopicWhat You'll LearnCodeSpace
mainLatestMerged version of all branches.Open in Codespaces
part/00-repository-setupRepository & Hello World AgentProject setup, DevUI, your first conversational agentOpen in Codespaces
part/01-agentic-ragAI Agents in .NET: Building Agentic RAGPostgreSQL storage, Tool calling, Message Persistence, EmbeddingsOpen in Codespaces
part/02-connect-librechatAI Agents in .NET: Beyond DevUI - LibreChat IntegrationLibreChat, Tool Call Middleware, Hosting as OpenAI Compatible APIOpen in Codespaces

New branches added as the series progresses. Star the repo to stay updated!

Project Structure

src/
├── Knowledge/ # Web API with DevUI (simple agent, no persistence)
└── Knowledge.Shared/ # Shared services, entities, and storage

Getting Started

Web API (DevUI)

  1. Clone & checkout the branch for your current article
  2. Open in VS Code with Dev Containers (or GitHub Codespaces)
  3. Configure your API key (see Configuration below)
  4. Database migrationdotnet ef database update --project src/Knowledge.Shared
  5. Rundotnet run --project src/Knowledge
  6. Navigate to http://localhost:5000/devui

Configuration

Application settings are managed via appsettings.json and appsettings.Development.json. For sensitive values like API keys, use .NET User Secrets.

Setting up User Secrets

Initialize and set your API key:

# Navigate to the Knowledge projectcd 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 list

To 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 Development environment.

Tech Stack

Blog Series

Follow along at svnscha.de where each article walks through the code in detail.

License

MIT - Build something awesome.

About

Companion repository for the AI Agents in .NET blog series

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages