Skip to content

svnscha/knowledge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Branch Topic What You'll Learn CodeSpace
main Latest Merged version of all branches. Open in Codespaces
part/00-repository-setup Repository & Hello World Agent Project setup, DevUI, your first conversational agent Open in Codespaces
part/01-agentic-rag AI Agents in .NET: Building Agentic RAG PostgreSQL storage, Tool calling, Message Persistence, Embeddings Open in Codespaces
part/02-connect-librechat AI Agents in .NET: Beyond DevUI - LibreChat Integration LibreChat, Tool Call Middleware, Hosting as OpenAI Compatible API Open 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 migration dotnet ef database update --project src/Knowledge.Shared
  5. Run dotnet 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 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 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

License

Stars

Watchers

Forks

Languages