Dev.to AI 🤖 Ai 👁 0 📖 3 min read

5 AI-Powered NuGet Packages That Will Save You Weeks of Integration Work

Every .NET project I've worked on in the last two years has had the same story: "we need AI-powered X." Then someone spends a week writing API wrappers, handling rate limits, wiring up dependency injection, and writing t

Every .NET project I've worked on in the last two years has had the same story: "we need AI-powered X." Then someone spends a week writing API wrappers, handling rate limits, wiring up dependency injection, and writing tests before the actual feature work can begin.

These five packages eliminate that work.

1. ForeverTools.EmailAI — AI Email Composition and Classification

dotnet add package ForeverTools.EmailAI

What it does: compose emails from bullet points, generate contextual replies, summarize long threads, and classify emails by category/priority/sentiment.

services.AddForeverToolsEmailAI(config["AIML_API_KEY"]);

// In your handler:
var email = await _emailAI.ComposeAsync(new ComposeRequest
{
    Subject = "Project update for Q2",
    BulletPoints = new[] { "Shipped feature X", "Delayed feature Y by 2 weeks", "Need sign-off on Z" },
    Tone = EmailTone.Professional
});

One call. No prompt engineering. No token counting. Just a clean, typed result.

Download: ForeverTools.EmailAI on NuGet

2. ForeverTools.Sentiment — Emotion Detection Beyond Positive/Negative

dotnet add package ForeverTools.Sentiment

Most sentiment libraries give you Positive/Negative/Neutral. This one gives you joy, anger, fear, sadness, disgust, and surprise with confidence scores.

services.AddForeverToolsSentiment(config["AIML_API_KEY"]);

var result = await _sentiment.AnalyzeAsync("The new checkout flow is so much faster, love it!");
// result.Sentiment = Positive
// result.Emotions = [{ Joy: 0.87 }, { Surprise: 0.12 }]
// result.Confidence = 0.94

Useful for: customer feedback dashboards, support ticket prioritization, social media monitoring.

Download: ForeverTools.Sentiment on NuGet

3. ForeverTools.InvoiceParser — Structured Data from Any Receipt or Invoice

dotnet add package ForeverTools.InvoiceParser

Pass a PDF or image URL, get back a typed InvoiceData object with vendor name, invoice number, line items, totals, and tax. Uses GPT-4 Vision under the hood, handles multi-page documents.

var invoice = await _invoiceParser.ParseAsync(new ParseRequest
{
    FileUrl = "https://example.com/invoice.pdf"
});

Console.WriteLine($"Vendor: {invoice.VendorName}");
Console.WriteLine($"Total: {invoice.TotalAmount} {invoice.Currency}");
foreach (var item in invoice.LineItems)
    Console.WriteLine($"  {item.Description}: {item.UnitPrice} x {item.Quantity}");

Alternative: Mindee charges $0.10/page. Veryfi is $500/month minimum. This uses your own API key.

Download: ForeverTools.InvoiceParser on NuGet

4. ForeverTools.ContentMod — Toxicity, Hate Speech, and Adult Content Detection

dotnet add package ForeverTools.ContentMod

Before you store user-generated content, run it through moderation. This library checks for toxicity, hate speech, adult content, and violence with per-category confidence scores.

var result = await _contentMod.ModerateAsync(new ModerationRequest
{
    Text = userInputText
});

if (result.Flagged)
{
    var reasons = result.Categories
        .Where(c => c.Flagged)
        .Select(c => c.Name);
    return BadRequest($"Content rejected: {string.Join(", ", reasons)}");
}

Download: ForeverTools.ContentMod on NuGet

5. ForeverTools.CodeGen — AI Code Generation and Explanation

dotnet add package ForeverTools.CodeGen

Useful for building developer tools, internal assistants, or any app where users need code help. Supports generation, refactoring, explanation, and unit test generation.

var result = await _codeGen.GenerateAsync(new CodeGenRequest
{
    Description = "A C# method that validates UK postcodes using regex",
    Language = "csharp",
    IncludeTests = true
});

Console.WriteLine(result.Code);
Console.WriteLine(result.Explanation);

Download: ForeverTools.CodeGen on NuGet

The Pattern

All five packages follow the same conventions:

  • Dependency injection: services.AddForeverTools{Package}(apiKey) — one line in Program.cs
  • Async-first: every operation is Task<T>, no blocking calls
  • Typed results: no dynamic or string parsing, just clean C# objects
  • BYOK: bring your own API key (AI/ML API at aimlapi.com) — no separate vendor account needed for most packages
  • .NET 6, 8, and .NET Standard 2.0 — works with everything from legacy WCF hosts to the latest Minimal API
# Install all five
dotnet add package ForeverTools.EmailAI
dotnet add package ForeverTools.Sentiment
dotnet add package ForeverTools.InvoiceParser
dotnet add package ForeverTools.ContentMod
dotnet add package ForeverTools.CodeGen

Source and issues: github.com/ForeverTools

Have you integrated AI into your .NET stack? What integration pain points have you hit? Drop a comment — always looking for the next wrapper to build.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.