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
<PackageReference Include="Rag.NET.Hosting" Version="0.1.0" />
<PackageVersion Include="Rag.NET.Hosting" Version="0.1.0" />
<PackageReference Include="Rag.NET.Hosting" />
paket add Rag.NET.Hosting --version 0.1.0
#r "nuget: Rag.NET.Hosting, 0.1.0"
#:package Rag.NET.Hosting@0.1.0
#addin nuget:?package=Rag.NET.Hosting&version=0.1.0
#tool nuget:?package=Rag.NET.Hosting&version=0.1.0
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:
VectorDimensionslives underEmbeddings, not the store. It is a property of the embedding model —nomic-embed-textis 768, OpenAI'stext-embedding-3-smallis 1536 — and every store merely has to agree with it.QdrantandPgVectortake different settings, because the builder extensions they wrap do:UseQdrantwants a host, port, and collection name;UsePgVectorwants a connection string. Only the section matchingVectorStore.Kindis read.Kinddefaults toInMemory. Its data does not survive a restart — the same silent-reset shapeUseCostBudgeting()'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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.AI (>= 10.8.3)
- Microsoft.Extensions.AI.OpenAI (>= 10.8.3)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Rag.NET (>= 0.1.0)
- Rag.NET.VectorStores.PgVector (>= 0.1.0)
- Rag.NET.VectorStores.Qdrant (>= 0.1.0)
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 |