IntentSharp.Specialist 1.1.0

Prefix Reserved
dotnet add package IntentSharp.Specialist --version 1.1.0
                    
NuGet\Install-Package IntentSharp.Specialist -Version 1.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="IntentSharp.Specialist" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IntentSharp.Specialist" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="IntentSharp.Specialist" />
                    
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 IntentSharp.Specialist --version 1.1.0
                    
#r "nuget: IntentSharp.Specialist, 1.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 IntentSharp.Specialist@1.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=IntentSharp.Specialist&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=IntentSharp.Specialist&version=1.1.0
                    
Install as a Cake Tool

IntentSharp.Specialist: models per intent from your own specialist service

Define the model each intent runs on, so one application can use several models easily, within one context or across several. For an intent, IntentSharp.Specialist sends the intent's definition and the context you choose to a specialist service you wire in, waits until a specialist is provided, checks that what came back fits, keeps the specialist's name and the returned intent so they can be used again, and runs the intent on that model through the normal IntentSharp pipeline. Every answer is still checked against your type and your rules.

Each step is a seam you wire, and every setting is an option with a default. The library never trains, tunes or changes a model, and it names no specialist provider: the service adapter is yours. It adds a specialist runtime to IntentSharp and IntentSharp.Catalog, targets .NET 8, .NET 9 and .NET 10, and installs the matching versions of both.

Quick start: put an intent on a specialist without a model or service

This complete example uses scripted results, not AI inference. A scripted specialist service offers a scripted model for the intent. That model's first reply is 9, which breaks the intent's range; the second is 4, which passes. No API key, model service or specialist service is used.

dotnet new console -n IntentSpecialists --framework net8.0
cd IntentSpecialists
dotnet add package IntentSharp.Specialist --version 1.1.0

Replace Program.cs with:

using IntentSharp;
using IntentSharp.Catalog;
using IntentSharp.Specialist;
using IntentSharp.Specialist.Testing;
using IntentSharp.Testing;

// Scripted stand-ins: the application's usual model, the model the service offers, and the service itself.
var usualModel = new ScriptedProvider { Name = "usual" };
var urgencyModel = new ScriptedProvider("{\"value\":9}", "{\"value\":4}") { Name = "urgency-model" };
var service = new ScriptedSpecialistService(
    ScriptedSpecialistService.ReturnRequested(urgencyModel, specialistName: "urgency-small"));

// The router reaches the model an offer brings. The client knows it by name only.
var router = new SpecialistRouter();
using var client = new IntentClientBuilder()
    .UseProvider(usualModel)
    .AddProvider(router)
    .Configure(options => { options.MaxAttempts = 2; options.MaxModelCalls = 2; })
    .Build();

var catalog = new InMemoryIntentCatalog([new IntentDefinition
{
    Name = "Orders.ClassifyUrgency",
    Version = 1,
    Intent = "Rate the urgency of this order email from 1 (routine) to 5 (critical).",
    Shape = new IntentShape { Kind = IntentShapeKind.Primitive, Primitive = "int" },
    Rules = new IntentRules { Minimum = 1, Maximum = 5 }
}]);
var specialists = new SpecialistRuntime(client, catalog, service, new SpecialistOptions(), router);

var result = await specialists.RunAsync<int>("Orders.ClassifyUrgency",
    "Our packaging line stops on Thursday unless the replacement belts arrive.");

Console.WriteLine($"Success: {result.Success}");
if (result.Success) Console.WriteLine($"Urgency: {result.Value}");
else foreach (var issue in result.Issues) Console.WriteLine(issue);

var status = specialists.GetStatus("Orders.ClassifyUrgency");
var held = await specialists.GetHeldAsync("Orders.ClassifyUrgency");
Console.WriteLine($"Specialist: {status.SpecialistName} ({status.State})");
Console.WriteLine($"Held: {held?.Name}, version {held?.ReadDefinition().Version}");
Console.WriteLine($"Requests to the service: {service.Requests.Count}");
Console.WriteLine($"Calls to the specialist model: {urgencyModel.CallCount}");
Console.WriteLine($"Calls to the usual model: {usualModel.CallCount}");

Run dotnet run. The output is:

Success: True
Urgency: 4
Specialist: urgency-small (Active)
Held: urgency-small, version 1
Requests to the service: 1
Calls to the specialist model: 2
Calls to the usual model: 0

The run sent one request, put the offered specialist in use after the definition check passed, held its name and the returned intent, and answered on the specialist; the client's usual model was not asked. The numeric rule refused the first reply and the retry passed. This demonstrates the exchange and the checks with fixed replies. It does not measure any model's classification quality.

Wire in your specialist service

Implement ISpecialistService as an adapter over the service you use; the library assumes no wire format. RequestAsync sends a SpecialistRequest (the definition, the context items and your requirements) and returns a ticket. WaitAsync returns a SpecialistOffer once a specialist is ready, or null for "not yet". ReportFitAsync receives the verdict, and RetireAsync is called when the application stops using the specialist. RecallAsync is optional.

An offer reaches its model in one of two ways: ProviderName, a provider already configured on the client, or Provider, a provider your adapter builds, which runs through the SpecialistRouter as in the example. For services that exchange intent files, SpecialistIntentFile writes a request as intent-file text and reads the answer into an offer, with the specialist's name, model and limits under extensions.specialist.

This helper builds a runtime with a few options changed and a document store that keeps requests, verdicts and held specialists across restarts and processes:

using IntentSharp;
using IntentSharp.Catalog;
using IntentSharp.Documents;
using IntentSharp.Specialist;

public static class Specialists
{
    // service: your adapter to your specialist service. state: where requests, verdicts and held specialists are kept.
    public static SpecialistRuntime Create(IntentClient client, SpecialistRouter router, IIntentCatalog catalog,
        ISpecialistService service, IDocumentStore state)
    {
        var options = new SpecialistOptions
        {
            WaitTimeout = TimeSpan.FromMinutes(2),
            MaxRequestsPerHour = 2,
            ContextSources = { new CatalogContextSource(catalog) },
            Intents =
            {
                ["Orders.ClassifyUrgency"] = new SpecialistIntentOptions { KeepPrevious = KeepPreviousPolicy.Always }
            }
        };
        return new SpecialistRuntime(client, catalog, service, options, router,
            store: new DocumentSpecialistStore(state));
    }
}

ScriptedSpecialistService stays useful after the quick start: test your application's specialist handling with it, and check your own adapter against the seam's promises with SpecialistContractKit.

What you choose, and the defaults

Choice Default
When a specialist is requested and waited for (WaitOn) On the intent call; Explicit waits only in EnsureAsync
How long to wait (WaitTimeout, WaitPollInterval, WaitRetries) 30-second windows, asked every second, 3 more windows after the first
Requests per intent per hour (MaxRequestsPerHour) 3
The context sent (ContextSources) None: a request carries the definition, your requirements and only what your sources return
Fit checks (FitEvaluators, AIJudge) A comparison in code with no model call; probe cases and an AI judge are opt-in
After an offer does not fit (NotFitHandler) The call throws SpecialistNotFitException
During a changed definition (KeepPrevious) Callers wait for the new specialist
Held specialists (HoldSpecialists, UseHeld) Kept, and a fitting held specialist is used again
Where state lives (the store) In memory; DocumentSpecialistStore for restarts and several processes

The option values can also be set per intent in SpecialistOptions.Intents. Named guardrail sets can refuse a request at the specialist checkpoint before anything is sent, and a settings document or rule file can set the wait and request limits.

Boundaries

The wait happens before the pipeline starts. When every wait ends empty, the call throws SpecialistWaitTimeoutException; it does not fall back to another provider, and the next call waits on the same request. An offer that does not fit is never run. A changed definition requests again on the next call. Runs on the specialist, probe cases and the AI judge are ordinary client calls with the client's checkpoints and limits. A passing result means the configured checks passed, not that an answer is factually correct.

Which package do I need?

Need Package
Typed model calls and code-defined checks IntentSharp
Named intents in YAML, JSON or an in-memory catalog IntentSharp.Catalog
Versioned rule files for checkpoint enforcement IntentSharp.Guardrails
An IChatClient backend or intents exposed as agent tools IntentSharp.Extensions.AI
Models defined per intent, obtained from a specialist service you wire in IntentSharp.Specialist, which includes Catalog

Keep all installed IntentSharp packages at the same version.

Documentation, evaluation and support

Commercial software, not open source. Evaluate free for 30 days on development and test systems; after that, business use needs a paid license. Production use needs a paid license from the first day. For help, use the website's support information or NuGet's Contact owners link.

The wider direction

A model chosen per intent is one building block of Unified Intent Architecture: explicit instructions, contracts and rules alongside application logic. This package obtains and checks the specialists; your application supplies the service, the context it is willing to send and its approval process.

Built and sold by C2Consultants LLC. C2Empowered, the company's self-hosted operations platform, is built on IntentSharp; how the two fit together.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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
1.1.0 62 11/13/2026

IntentSharp 1.1.0: a fifth package, IntentSharp.Specialist, for models defined per intent, and additions to the four existing packages. Nothing is removed or changed in meaning, so an application on 1.0.x upgrades without code changes. Release notes: https://intentsharp.com/changelog