IntentSharp 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package IntentSharp --version 1.0.0
                    
NuGet\Install-Package IntentSharp -Version 1.0.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" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IntentSharp" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="IntentSharp" />
                    
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 --version 1.0.0
                    
#r "nuget: IntentSharp, 1.0.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@1.0.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&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=IntentSharp&version=1.0.0
                    
Install as a Cake Tool

IntentSharp

IntentSharp lets developers express application behavior as intent, apply it to ordinary .NET values and methods, and connect it to any technology through ITarget. Our estimate for a typical business application is 20 to 40% less application code. This package is the core: send a value and an intent to a model and get your own type back, checked against your rules and retried with the findings, within your limits. Models come from an external provider file, and the core ships the openai and anthropic kinds. Every project needs it. Add IntentSharp.Catalog for rules in YAML or JSON intent files, IntentSharp.Guardrails for rule files, and IntentSharp.Extensions.AI for a Microsoft.Extensions.AI IChatClient, such as Ollama or Azure OpenAI, or for agent tools.

dotnet add package IntentSharp
using IntentSharp;
using IntentSharp.Documents;
using IntentSharp.Extensions;

// "config" holds intentsharp.providers.json: your providers, the model of each, and where its key is read from,
// such as "secret": "env:OPENAI_API_KEY".
using var store = new FolderDocumentStore("config");
using var client = new IntentClientBuilder().UseProviderOptions(store).Build();

var email = "Hi, this is Dana from Northwind. We'd like 40 units of SKU A-1192 delivered by 2026-11-15.";

var order = await email.AIAsync<PurchaseRequest>(client, "Extract the purchase request from this email.");
if (order.Success)
    Console.WriteLine($"{order.Value!.Contact} wants {order.Value.Quantity} x {order.Value.Sku}");
else
    foreach (var issue in order.Issues) Console.WriteLine(issue);

public sealed class PurchaseRequest
{
    public string Contact { get; set; } = "";
    public string Sku { get; set; } = "";
    public int Quantity { get; set; }
    public DateOnly DeliverBy { get; set; }
}

Documentation: https://intentsharp.com/docs/

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 (4)

Showing the top 4 NuGet packages that depend on IntentSharp:

Package Downloads
IntentSharp.Catalog

YAML and JSON intent files for C# and .NET: keep LLM instructions, result shapes, validation rules and examples outside compiled code. Run intents by name and check every reply in your process, with failed checks fed back within the configured limits. Supports primitive results, registered .NET types and JSON Schema shapes, plus an in-memory catalog. Intent files are versioned documents with revert. Supported saved edits reload while the application runs; malformed edits retain the last good definitions. New compiled result types, incompatible shapes, new named code checks and new call sites still need an application release. Reload is tested on local folders. Add this package to IntentSharp for file-backed or code-defined named intents; IntentSharp.Extensions.AI includes it. Commercial software, not open source: evaluate free for 30 days on development and test systems; after that, business use needs a paid license, and production use needs one from the first day (intentsharp.com/pricing).

IntentSharp.Extensions.AI

Typed, checked LLM results and agent tools for Microsoft.Extensions.AI IChatClient in C# and .NET. Use your configured chat client, such as Ollama or Azure OpenAI, with IntentSharp validation and bounded retries for invalid output. The backend and its configured adapters determine available models. UseChatClient and UseChatClientAsFallback select providers in code; the chat-client kind in a provider file selects a registered client. AsAIFunctions exposes catalog intents as AIFunction tools for Microsoft Agent Framework or another function-calling host: return a value after the intent checks pass, or an error result describing failure. The host executes function calls. Transport failures are not retried by IntentSharp; configure those retries in the chat-client pipeline or use a fallback. Installs the matching IntentSharp and IntentSharp.Catalog packages. Native OpenAI GPT or Anthropic Claude calls without IChatClient need only the core package. Commercial software, not open source: evaluate free for 30 days on development and test systems; after that, business use needs a paid license, and production use needs one from the first day (intentsharp.com/pricing).

IntentSharp.Guardrails

Guardrails as versioned YAML or JSON rule files for C# and .NET model calls, agent tools and data operations. Evaluate allow and deny lists, patterns, ranges, JSON Schema checks and operation limits in your process, with no model call during rule evaluation. A deny wins over an allow; an invalid rule-file edit keeps the last good version. Decisions identify the rule set, document and version. An AI edit to a rule file is validated and then takes effect by default; access-widening edits are flagged so your own edit writer can hold them for approval. Optional compilation of plain-language rules into deterministic checks is experimental and opt-in. Add this package to IntentSharp when rule sets live in files. Your application must integrate and honor the checkpoint decisions; this is not a sandbox for arbitrary application code. Commercial software, not open source: evaluate free for 30 days on development and test systems; after that, business use needs a paid license, and production use needs one from the first day (intentsharp.com/pricing).

IntentSharp.Specialist

Models defined per intent for C# and .NET, so one application can use several models easily, within one context or across several. For an IntentSharp catalog intent it sends the definition and the context you choose to a specialist service you wire in, waits until a specialist is provided, checks that the returned definition and specialist fit (a comparison in code by default; probe cases and an AI judge are opt-in), keeps the specialist's name and the returned intent for reuse, and runs the intent on that model through the normal IntentSharp pipeline, so every answer is still checked against your type and your rules. It never trains, tunes or changes a model and names no specialist provider: the service adapter, the store, the context sources, the fit checks and what happens after an offer does not fit are seams, and every setting is an option with a default. An offer names a provider configured on the client or brings its own, which the client reaches through a router by name only. A changed definition requests again, and keep-previous lets the specialist in use serve meanwhile. A document store keeps requests, tickets, fit reports and held specialists across restarts and processes; wait windows and an hourly request limit bound the exchange, and a guardrail checkpoint can refuse a request before anything is sent. A scripted specialist service and a contract kit test applications and adapters offline. Installs the matching IntentSharp and IntentSharp.Catalog packages. Commercial software, not open source: evaluate free for 30 days on development and test systems; after that, business use needs a paid license, and production use needs one from the first day (intentsharp.com/pricing).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 67 11/13/2026
1.0.1 300 11/6/2026
1.0.0 222 10/28/2026
1.0.0-rc.3 111 10/20/2026

Release notes for version 1.0.0, with breaking changes, new features and fixes: https://intentsharp.com/changelog