Turn any existing ASP.NET Core app into an AI-enabled application — local models, RAG, tools and agents, with two lines of code.
Status: early development. The API surface and package names described below are the target design and will change until the first
0.xrelease. Star or watch the repo to follow along, and open a Discussion if you want to help shape it.
NetCoreAI is a NuGet-distributed framework that mounts a complete AI platform inside your existing ASP.NET Core application — think Hangfire for AI. Add the package, map the endpoint, open the dashboard.
builder.Services.AddNetCoreAI().AddGgufBackend().AddOnnxBackend();
app.MapNetCoreAI(); // dashboard + APIs at /netcoreai
From there you get:
IAgentClient) or HTTP (JSON / SSE).All model access goes through Microsoft.Extensions.AI abstractions (IChatClient, IEmbeddingGenerator), so your application code never depends on a specific runtime or vendor.
Requires the .NET 10 SDK.
1. Install
dotnet add package NetCoreAI
dotnet add package NetCoreAI.Backend.Gguf # runs GGUF models via LLamaSharp
dotnet add package LLamaSharp.Backend.Cpu # the native llama.cpp library it calls (required)
dotnet add package NetCoreAI.Backend.Onnx # runs ONNX models via ONNX Runtime GenAI
2. Register
// Program.cs
builder.Services.AddNetCoreAI(o =>
{
o.DataDirectory = "./netcoreai"; // models, vectors, metadata
o.Dashboard.Authorization = p => p.RequireRole("Admin");
})
.AddGgufBackend()
.AddOnnxBackend()
.AddSqliteVectorStore();
app.MapNetCoreAI();
3. Open the dashboard at https://localhost:5001/netcoreai, go to Model Hub, download a small chat model (a curated list shows what fits your hardware), and start chatting.
4. Use it from code
public class InvoiceSummarizer(IChatClient chat)
{
public async Task<string> SummarizeAsync(string text)
=> (await chat.GetResponseAsync($"Summarize this invoice:\n{text}")).Text;
}
Or call an agent you designed in the dashboard:
public class SupportBot(IAgentClient agents)
{
public IAsyncEnumerable<AgentEvent> AskAsync(string question, ClaimsPrincipal user)
=> agents.RunStreamingAsync("support-agent", new AgentRequest(question, user));
}
| Package | Purpose |
|---|---|
NetCoreAI | Meta-package: Core + Dashboard + SQLite storage |
NetCoreAI.Abstractions | Interfaces and records only; reference this from libraries |
NetCoreAI.Core | Model registry, hardware probe, downloader, RAG pipeline, tool & agent engine |
NetCoreAI.Dashboard | Embedded management UI and management API |
NetCoreAI.Client | IAgentClient, IKnowledgeClient — in-process or over HTTP |
NetCoreAI.Documents | Document extractors: PDF, DOCX, PPTX, XLSX, HTML (text, Markdown, CSV and JSON need no extra package) |
NetCoreAI.Backend.Gguf | LLamaSharp provider. Also reference LLamaSharp.Backend.Cpu (or .Cuda12 / .Vulkan) in your own project: NuGet does not pass build targets through an intermediate package, and that is how the native binaries arrive |
NetCoreAI.Backend.Onnx | ONNX Runtime GenAI provider (CPU / DirectML / CUDA) |
NetCoreAI.Backend.Safetensors | Convert-on-import (to GGUF/ONNX) and, later, native execution |
NetCoreAI.Backend.Ollama | Ollama provider (local or LAN) |
NetCoreAI.Backend.OpenAICompatible | OpenAI, Azure OpenAI and any OpenAI-compatible server |
NetCoreAI.Backend.Anthropic | Anthropic Messages API (Claude) |
NetCoreAI.VectorStore.Sqlite / .Postgres / .Qdrant | Vector stores |
NetCoreAI.Storage.Sqlite / .SqlServer / .Postgres | Metadata storage |
┌───────────────────────────────────────────────────────────────────┐
│ Dashboard UI (Blazor) │ Agent HTTP API │ C# Client SDK │
├───────────────────────────────────────────────────────────────────┤
│ Agent Engine │ Tool Registry │ RAG Pipeline │ Chat Sessions │
├───────────────────────────────────────────────────────────────────┤
│ Model Registry │ Model Hub (HF) │ Hardware Probe │ Download Manager│
├───────────────────────────────────────────────────────────────────┤
│ IModelProvider: ONNX │ GGUF │ Safetensors │ Ollama │ OpenAI │ Anthropic │
├───────────────────────────────────────────────────────────────────┤
│ Storage: metadata DB │ vector store │ file store │
└───────────────────────────────────────────────────────────────────┘
Every provider, vector store, document extractor and data source is a separate project behind a documented interface, with a conformance test suite so contributors can add one without touching Core. See docs/requirements/NetCoreAI-Requirements.md for the full specification, docs/plans/ for the per-phase development plans, docs/adr/ for design decisions and docs/guides/ for how-to guides.
| OS | CPU | GPU |
|---|---|---|
| Windows x64 | ✅ | DirectML, CUDA 12 |
| Linux x64 | ✅ | CUDA 12, Vulkan |
| macOS arm64 | ✅ | Metal |
| Windows arm64 (NPU) | planned | planned |
Runs under Kestrel, IIS, Docker and Azure App Service (CPU). GPU acceleration requires the matching native backend package referenced from your own project (e.g. LLamaSharp.Backend.Cuda12).
| Phase | Scope | Status |
|---|---|---|
| 1 — Foundation | Providers (GGUF, ONNX, Ollama, OpenAI-compatible, Anthropic), hardware probe, Model Hub, chat playground, dashboard shell | 🚧 in progress |
| 2 — Knowledge | Knowledge bases, file/SQL/API/code data sources, ingestion pipeline, document chat with citations | ⏳ |
| 3 — Tools & Agents | Endpoint discovery, tool designer, agent builder, IAgentClient, HTTP run API, API keys, OpenTelemetry | ⏳ |
| 4 — Hardening | Safetensors convert-on-import, hybrid search + re-ranking, guardrails, versioning, audit, multi-tenant, OpenAI-compatible endpoint | ⏳ |
| 5 — Expansion | Native Safetensors runtime, MCP in/out, multi-agent, vision input, more connectors | ⏳ |
Track progress on the project board.
The framework and the example applications are kept in separate solutions so the framework never carries sample dependencies, and the samples consume NetCoreAI exactly the way a real user would — as NuGet packages.
NetCoreAI/
├── NetCoreAI.slnx # framework only
├── src/
│ ├── NetCoreAI.Abstractions/
│ ├── NetCoreAI.Core/
│ ├── NetCoreAI.Dashboard/
│ ├── NetCoreAI.Client/
│ ├── Backends/
│ │ ├── NetCoreAI.Backend.Gguf/
│ │ ├── NetCoreAI.Backend.Onnx/
│ │ ├── NetCoreAI.Backend.Safetensors/
│ │ ├── NetCoreAI.Backend.Ollama/
│ │ ├── NetCoreAI.Backend.OpenAICompatible/
│ │ └── NetCoreAI.Backend.Anthropic/
│ ├── VectorStores/
│ │ ├── NetCoreAI.VectorStore.Sqlite/
│ │ ├── NetCoreAI.VectorStore.Postgres/
│ │ └── NetCoreAI.VectorStore.Qdrant/
│ └── Storage/
│ ├── NetCoreAI.Storage.Sqlite/
│ ├── NetCoreAI.Storage.SqlServer/
│ └── NetCoreAI.Storage.Postgres/
├── tests/
│ ├── NetCoreAI.Core.Tests/
│ ├── NetCoreAI.Conformance/ # contract tests any provider/vector store can run
│ └── NetCoreAI.Integration.Tests/
├── samples/
│ ├── NetCoreAI.Samples.slnx # examples only — references NetCoreAI via NuGet
│ ├── Directory.Build.props # pins the NetCoreAI package version used by all samples
│ ├── MinimalApi/ # smallest possible host
│ ├── MvcExistingApp/ # existing MVC app exposing its controllers as tools
│ ├── BlazorHost/ # Blazor app with the embeddable chat widget
│ ├── RagDocuments/ # knowledge base over PDFs + SQL table
│ └── DockerGpu/ # docker-compose with CUDA backend
├── docs/
│ ├── requirements/
│ ├── adr/
│ └── guides/
├── build/ # CI scripts, local NuGet feed config
├── Directory.Build.props # SDK pin, central package management (framework)
├── Directory.Packages.props
└── global.json
Rules that keep the two apart:
NetCoreAI.slnx contains only src/ and tests/. It has no reference to anything under samples/.ProjectReference into src/. They pull NetCoreAI.* packages from NuGet.org, or from the local feed produced by dotnet pack during development.Directory.Build.props that sets the package version, so bumping one line upgrades every example.artifacts/packages/, then builds the samples against that feed — so a sample that breaks is caught before release, but sample breakage never blocks a framework build.Framework
git clone https://github.com/netcoreai/NetCoreAI.git
cd NetCoreAI
dotnet build NetCoreAI.slnx
dotnet test --solution NetCoreAI.slnx # default suite needs no secrets; downloads a <500 MB test model on first run
dotnet pack NetCoreAI.slnx -c Release -o artifacts/packages
Samples (against the packages you just packed, or against NuGet.org)
cd samples
dotnet nuget add source ../artifacts/packages --name netcoreai-local # only for local development
dotnet build NetCoreAI.Samples.slnx
cd MinimalApi && dotnet run
# open https://localhost:5001/netcoreai
No private feeds, keys or services are needed to build. Provider tests for OpenAI/Anthropic run only when the corresponding environment variables are set.
Contributions are very welcome — providers, vector stores, document extractors, dashboard pages, docs and translations are all good entry points.
CONTRIBUTING.md for dev setup, coding standards and the PR checklist.good first issue or help wanted.NetCoreAI.Abstractions go through an RFC in Discussions first.This project follows the Contributor Covenant. Security issues: see SECURITY.md.
NetCoreAI sends no telemetry. The only outbound connections are Hugging Face (when you use the Model Hub), provider connections you configure yourself, and the curated model manifest served from this repository. A single setting disables all remote access for air-gapped deployments.
MIT © Masums. Built with Microsoft.Extensions.AI, LLamaSharp, ONNX Runtime GenAI and OllamaSharp. Model licences are shown in the Model Hub and remain the responsibility of the user.
C#
90.9%
JavaScript
4.3%
HTML
4.3%
Turn any existing ASP.NET Core app into an AI-enabled application — local models, RAG, tools and agents, with two lines of code.
Status: early development. The API surface and package names described below are the target design and will change until the first
0.xrelease. Star or watch the repo to follow along, and open a Discussion if you want to help shape it.
NetCoreAI is a NuGet-distributed framework that mounts a complete AI platform inside your existing ASP.NET Core application — think Hangfire for AI. Add the package, map the endpoint, open the dashboard.
builder.Services.AddNetCoreAI().AddGgufBackend().AddOnnxBackend();
app.MapNetCoreAI(); // dashboard + APIs at /netcoreai
From there you get:
IAgentClient) or HTTP (JSON / SSE).All model access goes through Microsoft.Extensions.AI abstractions (IChatClient, IEmbeddingGenerator), so your application code never depends on a specific runtime or vendor.
Requires the .NET 10 SDK.
1. Install
dotnet add package NetCoreAI
dotnet add package NetCoreAI.Backend.Gguf # runs GGUF models via LLamaSharp
dotnet add package LLamaSharp.Backend.Cpu # the native llama.cpp library it calls (required)
dotnet add package NetCoreAI.Backend.Onnx # runs ONNX models via ONNX Runtime GenAI
2. Register
// Program.cs
builder.Services.AddNetCoreAI(o =>
{
o.DataDirectory = "./netcoreai"; // models, vectors, metadata
o.Dashboard.Authorization = p => p.RequireRole("Admin");
})
.AddGgufBackend()
.AddOnnxBackend()
.AddSqliteVectorStore();
app.MapNetCoreAI();
3. Open the dashboard at https://localhost:5001/netcoreai, go to Model Hub, download a small chat model (a curated list shows what fits your hardware), and start chatting.
4. Use it from code
public class InvoiceSummarizer(IChatClient chat)
{
public async Task<string> SummarizeAsync(string text)
=> (await chat.GetResponseAsync($"Summarize this invoice:\n{text}")).Text;
}
Or call an agent you designed in the dashboard:
public class SupportBot(IAgentClient agents)
{
public IAsyncEnumerable<AgentEvent> AskAsync(string question, ClaimsPrincipal user)
=> agents.RunStreamingAsync("support-agent", new AgentRequest(question, user));
}
| Package | Purpose |
|---|---|
NetCoreAI | Meta-package: Core + Dashboard + SQLite storage |
NetCoreAI.Abstractions | Interfaces and records only; reference this from libraries |
NetCoreAI.Core | Model registry, hardware probe, downloader, RAG pipeline, tool & agent engine |
NetCoreAI.Dashboard | Embedded management UI and management API |
NetCoreAI.Client | IAgentClient, IKnowledgeClient — in-process or over HTTP |
NetCoreAI.Documents | Document extractors: PDF, DOCX, PPTX, XLSX, HTML (text, Markdown, CSV and JSON need no extra package) |
NetCoreAI.Backend.Gguf | LLamaSharp provider. Also reference LLamaSharp.Backend.Cpu (or .Cuda12 / .Vulkan) in your own project: NuGet does not pass build targets through an intermediate package, and that is how the native binaries arrive |
NetCoreAI.Backend.Onnx | ONNX Runtime GenAI provider (CPU / DirectML / CUDA) |
NetCoreAI.Backend.Safetensors | Convert-on-import (to GGUF/ONNX) and, later, native execution |
NetCoreAI.Backend.Ollama | Ollama provider (local or LAN) |
NetCoreAI.Backend.OpenAICompatible | OpenAI, Azure OpenAI and any OpenAI-compatible server |
NetCoreAI.Backend.Anthropic | Anthropic Messages API (Claude) |
NetCoreAI.VectorStore.Sqlite / .Postgres / .Qdrant | Vector stores |
NetCoreAI.Storage.Sqlite / .SqlServer / .Postgres | Metadata storage |
┌───────────────────────────────────────────────────────────────────┐
│ Dashboard UI (Blazor) │ Agent HTTP API │ C# Client SDK │
├───────────────────────────────────────────────────────────────────┤
│ Agent Engine │ Tool Registry │ RAG Pipeline │ Chat Sessions │
├───────────────────────────────────────────────────────────────────┤
│ Model Registry │ Model Hub (HF) │ Hardware Probe │ Download Manager│
├───────────────────────────────────────────────────────────────────┤
│ IModelProvider: ONNX │ GGUF │ Safetensors │ Ollama │ OpenAI │ Anthropic │
├───────────────────────────────────────────────────────────────────┤
│ Storage: metadata DB │ vector store │ file store │
└───────────────────────────────────────────────────────────────────┘
Every provider, vector store, document extractor and data source is a separate project behind a documented interface, with a conformance test suite so contributors can add one without touching Core. See docs/requirements/NetCoreAI-Requirements.md for the full specification, docs/plans/ for the per-phase development plans, docs/adr/ for design decisions and docs/guides/ for how-to guides.
| OS | CPU | GPU |
|---|---|---|
| Windows x64 | ✅ | DirectML, CUDA 12 |
| Linux x64 | ✅ | CUDA 12, Vulkan |
| macOS arm64 | ✅ | Metal |
| Windows arm64 (NPU) | planned | planned |
Runs under Kestrel, IIS, Docker and Azure App Service (CPU). GPU acceleration requires the matching native backend package referenced from your own project (e.g. LLamaSharp.Backend.Cuda12).
| Phase | Scope | Status |
|---|---|---|
| 1 — Foundation | Providers (GGUF, ONNX, Ollama, OpenAI-compatible, Anthropic), hardware probe, Model Hub, chat playground, dashboard shell | 🚧 in progress |
| 2 — Knowledge | Knowledge bases, file/SQL/API/code data sources, ingestion pipeline, document chat with citations | ⏳ |
| 3 — Tools & Agents | Endpoint discovery, tool designer, agent builder, IAgentClient, HTTP run API, API keys, OpenTelemetry | ⏳ |
| 4 — Hardening | Safetensors convert-on-import, hybrid search + re-ranking, guardrails, versioning, audit, multi-tenant, OpenAI-compatible endpoint | ⏳ |
| 5 — Expansion | Native Safetensors runtime, MCP in/out, multi-agent, vision input, more connectors | ⏳ |
Track progress on the project board.
The framework and the example applications are kept in separate solutions so the framework never carries sample dependencies, and the samples consume NetCoreAI exactly the way a real user would — as NuGet packages.
NetCoreAI/
├── NetCoreAI.slnx # framework only
├── src/
│ ├── NetCoreAI.Abstractions/
│ ├── NetCoreAI.Core/
│ ├── NetCoreAI.Dashboard/
│ ├── NetCoreAI.Client/
│ ├── Backends/
│ │ ├── NetCoreAI.Backend.Gguf/
│ │ ├── NetCoreAI.Backend.Onnx/
│ │ ├── NetCoreAI.Backend.Safetensors/
│ │ ├── NetCoreAI.Backend.Ollama/
│ │ ├── NetCoreAI.Backend.OpenAICompatible/
│ │ └── NetCoreAI.Backend.Anthropic/
│ ├── VectorStores/
│ │ ├── NetCoreAI.VectorStore.Sqlite/
│ │ ├── NetCoreAI.VectorStore.Postgres/
│ │ └── NetCoreAI.VectorStore.Qdrant/
│ └── Storage/
│ ├── NetCoreAI.Storage.Sqlite/
│ ├── NetCoreAI.Storage.SqlServer/
│ └── NetCoreAI.Storage.Postgres/
├── tests/
│ ├── NetCoreAI.Core.Tests/
│ ├── NetCoreAI.Conformance/ # contract tests any provider/vector store can run
│ └── NetCoreAI.Integration.Tests/
├── samples/
│ ├── NetCoreAI.Samples.slnx # examples only — references NetCoreAI via NuGet
│ ├── Directory.Build.props # pins the NetCoreAI package version used by all samples
│ ├── MinimalApi/ # smallest possible host
│ ├── MvcExistingApp/ # existing MVC app exposing its controllers as tools
│ ├── BlazorHost/ # Blazor app with the embeddable chat widget
│ ├── RagDocuments/ # knowledge base over PDFs + SQL table
│ └── DockerGpu/ # docker-compose with CUDA backend
├── docs/
│ ├── requirements/
│ ├── adr/
│ └── guides/
├── build/ # CI scripts, local NuGet feed config
├── Directory.Build.props # SDK pin, central package management (framework)
├── Directory.Packages.props
└── global.json
Rules that keep the two apart:
NetCoreAI.slnx contains only src/ and tests/. It has no reference to anything under samples/.ProjectReference into src/. They pull NetCoreAI.* packages from NuGet.org, or from the local feed produced by dotnet pack during development.Directory.Build.props that sets the package version, so bumping one line upgrades every example.artifacts/packages/, then builds the samples against that feed — so a sample that breaks is caught before release, but sample breakage never blocks a framework build.Framework
git clone https://github.com/netcoreai/NetCoreAI.git
cd NetCoreAI
dotnet build NetCoreAI.slnx
dotnet test --solution NetCoreAI.slnx # default suite needs no secrets; downloads a <500 MB test model on first run
dotnet pack NetCoreAI.slnx -c Release -o artifacts/packages
Samples (against the packages you just packed, or against NuGet.org)
cd samples
dotnet nuget add source ../artifacts/packages --name netcoreai-local # only for local development
dotnet build NetCoreAI.Samples.slnx
cd MinimalApi && dotnet run
# open https://localhost:5001/netcoreai
No private feeds, keys or services are needed to build. Provider tests for OpenAI/Anthropic run only when the corresponding environment variables are set.
Contributions are very welcome — providers, vector stores, document extractors, dashboard pages, docs and translations are all good entry points.
CONTRIBUTING.md for dev setup, coding standards and the PR checklist.good first issue or help wanted.NetCoreAI.Abstractions go through an RFC in Discussions first.This project follows the Contributor Covenant. Security issues: see SECURITY.md.
NetCoreAI sends no telemetry. The only outbound connections are Hugging Face (when you use the Model Hub), provider connections you configure yourself, and the curated model manifest served from this repository. A single setting disables all remote access for air-gapped deployments.
MIT © Masums. Built with Microsoft.Extensions.AI, LLamaSharp, ONNX Runtime GenAI and OllamaSharp. Model licences are shown in the Model Hub and remain the responsibility of the user.
C#
90.9%
JavaScript
4.3%
HTML
4.3%