Rag.NET.Hosting 0.1.0

dotnet add package Rag.NET.Hosting --version 0.1.0
                    
NuGet\Install-Package Rag.NET.Hosting -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rag.NET.Hosting" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rag.NET.Hosting" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Rag.NET.Hosting" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rag.NET.Hosting --version 0.1.0
                    
#r "nuget: Rag.NET.Hosting, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rag.NET.Hosting@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rag.NET.Hosting&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Rag.NET.Hosting&version=0.1.0
                    
Install as a Cake Tool

Rag.NET.Hosting

Configuration-driven pipeline wiring for hosting Rag.NET inside an executable — a dotnet tool, a CLI, a worker service. One extension method binds a RagNet configuration section to a working IRagPipeline: an OpenAI-compatible chat client and embedding generator (OpenAI, Azure OpenAI, OpenRouter, Ollama, and LM Studio all speak the same wire API), plus one of three vector stores — InMemory, Qdrant, or PgVector. That is a deliberately bounded set: anything outside it — Weaviate, Pinecone, Chroma, Azure AI Search, ONNX embeddings, a bespoke IChatClient — is served by referencing Rag.NET.Mcp or Rag.NET directly and registering your own store, which stays a real answer rather than an apology.

Install

dotnet add package Rag.NET.Hosting

Setup

using Rag.NET.Hosting.DependencyInjection;

services.AddRagNetPipelineFromConfiguration(configuration);

configuration is any IConfiguration with a RagNet section:

{
  "RagNet": {
    "ChatClient":  { "Endpoint": "https://openrouter.ai/api/v1", "ApiKey": "…", "Model": "meta-llama/llama-3.3-70b-instruct" },
    "Embeddings":  { "Endpoint": "https://openrouter.ai/api/v1", "ApiKey": "…", "Model": "text-embedding-3-small", "VectorDimensions": 1536 },
    "VectorStore": {
      "Kind": "InMemory",
      "Qdrant":   { "Host": "localhost", "Port": 6334, "CollectionName": "my-collection" },
      "PgVector": { "ConnectionString": "Host=localhost;Database=ragnet;Username=…;Password=…" }
    }
  }
}

A few things about that shape are load-bearing, not arbitrary:

  • VectorDimensions lives under Embeddings, not the store. It is a property of the embedding model — nomic-embed-text is 768, OpenAI's text-embedding-3-small is 1536 — and every store merely has to agree with it.
  • Qdrant and PgVector take different settings, because the builder extensions they wrap do: UseQdrant wants a host, port, and collection name; UsePgVector wants a connection string. Only the section matching VectorStore.Kind is read.
  • Kind defaults to InMemory. Its data does not survive a restart — the same silent-reset shape UseCostBudgeting()'s default in-memory cost ledger already cost this repository once, with real money behind it.

Environment variables come free with the standard IConfiguration builder — for example RagNet__VectorStore__Kind=Qdrant overrides the JSON above without touching a file.

No startup validation runs yet: a misconfigured value fails wherever it is first used (Uri construction, store connection, first ingest), not with a diagnostic naming the setting and the key that fixes it. That is deliberately out of scope for this wiring and lands as follow-on work in the same phase.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 88 8/11/2026