DEV Community

Cover image for 5 AI-Powered NuGet Packages That Will Save You Weeks of Integration Work
Kiprio
Kiprio

Posted on

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 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
Enter fullscreen mode Exit fullscreen mode

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
});
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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}");
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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)}");
}
Enter fullscreen mode Exit fullscreen mode

Download: ForeverTools.ContentMod on NuGet


5. ForeverTools.CodeGen — AI Code Generation and Explanation

dotnet add package ForeverTools.CodeGen
Enter fullscreen mode Exit fullscreen mode

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);
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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.

Top comments (0)