Build intelligent apps that adapt, and evolve effortlessly with people and AI.

The data model, the intent and the rules live in versioned files. The runtime plans, checks, runs and retries against them, and notices when something changes. A person, a coding agent or your own application can change a definition; every change is checked, versioned and reversible before it runs.

Mark a method with [AIIntent] and run it with ExecuteIntentAsync<T>, or call TransformAsync<T> on any value. The answer is your own type, checked against your rules before your code sees it.

IntentSharp is on NuGet: dotnet add package IntentSharp

No intent file needed. .NET 8, 9 and 10, with OpenAI, Anthropic or any IChatClient.

Program.cs
var email = "Hi, this is Dana from Northwind. We'd like 40 units of SKU A-1192 delivered by 2026-11-15.";var options = new AIRequestOptions()    .Require<PurchaseRequest>(r => r.Quantity > 0, "Quantity must be a positive number.");var order = await client.TransformAsync<PurchaseRequest>(email, "Extract the purchase request from this email.", options);
The answer is checkedThe model's first answer is checked against the rule in Program.cs, and the rule fails.checked The answer is checkedThe model's first answer is checked against the rule in Program.cs, and the rule fails.checked
Attempt 1 (scripted)
[Validator] attempt 1: Quantity must be a positive number.
Retried with the findingsThe second attempt sends the failed rule's message back to the model, and the second answer passes.retriedwith thefindings Retried with the findingsThe second attempt sends the failed rule's message back to the model, and the second answer passes.retried withthe findings
Output
Success: true, after 2 attemptsValue: PurchaseRequest { Contact = Dana (Northwind), Sku = A-1192, Quantity = 40, DeliverBy = 2026-11-15 }

Compiled and run with every build of this site. The model's answers are scripted.

Status Release 1.0.0, on nuget.org. Its tests pass on .NET 8 and .NET 10; live tests against OpenAI and Anthropic models ran on an earlier build. Roadmap and known limits
What it does

The parse, check and retry loop, built in.

No confidence score. The result says what was checked. A pass means the checks passed, not that the answer is right.

The path of one checked call Your value (text, a record, a list, a DataTable or JSON) and an intent go to the model, unless the cache already holds an answer for the same request. A switched-off, unknown or mismatched intent stops with an exception before any model call. Every answer, cached or fresh, is checked in code. A failed check goes back to the model with the findings, within MaxAttempts, MaxModelCalls and Timeout; when the answer passes, or the attempts run out, the call returns an AIResult with Success, Value, Issues and Attempts. Your value text, a record, a list, a DataTable or JSON Intent wording, shape and rules, in code or in a file Model OpenAI, Anthropic or any IChatClient; fallback if transient Checks refusal, truncation, JSON, members, nulls and your rules AIResult<T> Success, Value, Issues, Attempts passed failed a check: retry with the findings,within MaxAttempts, MaxModelCalls and Timeout out of attempts: Success = false, with the issues cache hit: no call for the answer, still checked switched off, unknownor wrong shape: throwsbefore any model call
The drawing: the path of one checked call
The path of one checked call Your value (text, a record, a list, a DataTable or JSON) and an intent go to the model, unless the cache already holds an answer for the same request. A switched-off, unknown or mismatched intent stops with an exception before any model call. Every answer, cached or fresh, is checked in code. A failed check goes back to the model with the findings, within MaxAttempts, MaxModelCalls and Timeout; when the answer passes, or the attempts run out, the call returns an AIResult with Success, Value, Issues and Attempts. Your value text, a record, a list, a DataTable or JSON Intent wording, shape and rules, in code or in a file Model OpenAI, Anthropic or any IChatClient, with fallback Checks refusal, truncation, JSON, members, nulls, your rules AIResult<T> Success, Value, Issues, Attempts switched off, unknown or wrong shape: throws, no model call cache hit: no call for the answer, still checked failed a check: retry with the findings, within MaxAttempts, MaxModelCalls and Timeout passed out of attempts: Success = false, with the issues

Each box links to its stage on the Overview.

  • Your own objects back. Filter, sort and group your own objects. On success the original objects come back, selected or ordered by the model: a filter's matches once each, and every element exactly once for sort and group.
  • Checks run in code. No check calls a model, except the optional judge. What does not call the model
  • Wording and rules in a file. The folder is watched: save the file, and the next call uses it, with no release. A bad save keeps the last good version while the app runs. Intent files
  • Tools for Microsoft Agent Framework. AsAIFunctions() turns every enabled catalog intent into a standard AIFunction tool, and each answer is checked before the agent sees it.

Or start from the problem you have: nine problems IntentSharp solves, each with an example compiled and run on scripted answers.

Definitions

One set of files, changed by people and by AI

The intent, the data model, the rules and the examples live in plain YAML or JSON files, next to the code.

People

A person edits them like any other file and reviews the change like code.

Coding agents

A coding agent edits the same files, and reads the goal, the data model, the rules and the budget in one place instead of hunting through the call sites.

The running application

The running application can change them too: it proposes an edit, IntentSharp checks it, and the next call uses it, with no rebuild and no release.

A change that fails its checks is refused, and the version before it keeps running. Every change is a version you can read, compare and go back to.

Comparison

Why not just call the model?

For one typed call, GetResponseAsync<T> is enough. IntentSharp is the checking, retry, limit, fallback and reporting code you would write around every call after that.

The GetResponseAsync<T> column follows Microsoft's .NET structured-output quickstart (learn.microsoft.com/dotnet/ai/quickstarts/structured-output), checked on 2026-10-13.

What you needIntentSharpGetResponseAsync<T>
Typed resultBuilt inBuilt in
Missing member reported, not defaultedBuilt inYou write it
Your rules checkedBuilt inYou write it
Retry with the findingsBuilt inYou write it
Limits on attempts, model calls and timeBuilt inYou write it
Every attempt kept, with raw output and tokensBuilt inYou write it
Wording, data model and rules in a file that reloadsBuilt inYou write it

And when something changes

When this changesIntentSharpGetResponseAsync<T>
A rule changesSave the file, the next call uses itYou change code and release
A schema changesThe runtime senses the target again and plans again, onceYou write it
The provider changesThe provider file; a move of the key is flaggedYou write it
A reviewer's stance changesA new version of the intent, revert if it was wrongYou write it
A mapping's input driftsReported; a value it can no longer parse is recompiled, under an hourly capYou write it

From $349 per developer per year.

  • 30-day free evaluation
  • Unlimited deployments
  • Keep the versions released while you paid
See pricing
Made by
C2Consultants LLC, North Carolina
License
Commercial software, not open source
Your data
Sent only to the model providers you configure. The library never phones home.
Support
By email; the support policy gives the response target for each edition