Documentation
Table of Contents

Glossary

The terms the IntentSharp documentation uses, in alphabetical order. A term in code is the name you meet in the API.

A to C

Allowlist. The tables the database runtime may use, set in DatabaseOptions.AllowedTables. See Database queries.

Ambient client. A client made available to the methods without a client parameter, for one async flow, with client.AsAmbient(). It ends when the scope is disposed; there is no process-wide default client.

Attempt. One request to the model and the checks on its answer. Each one is recorded on the result as an AttemptRecord; the number of attempts is limited by MaxAttempts.

Audit tags. The tags the intent runtime adds to every run of an intent from a file: its name, its version and its source: the file it came from, or memory for a definition added in code. They are kept with the run in your memory, and never sent to the model.

Cache hit. An answer served from the request cache instead of the model, for a request identical to an earlier one. It makes no model call and sets FromCache on the result. See How a call works.

Catalog. A source of intent definitions. FileIntentCatalog reads a folder of intent files and reloads them when they change; InMemoryIntentCatalog holds definitions added in code.

Catalog problem. One thing wrong with an intent file, with its source file, its line when known, and a message. A file with a problem does not stop the others from loading.

Chat client. Microsoft.Extensions.AI's IChatClient. UseChatClient runs IntentSharp on any chat client.

Check. A test an answer must pass before your code sees it: the checks every answer gets, your rules, and the optional judge. See Results and verification.

Client. An IntentClient, built with IntentClientBuilder or services.AddIntentSharp. It holds the providers, the options, the cache, the memory and the rate limiter.

D to I

Dry run. DatabaseOptions.DryRun: the database runtime plans and checks a statement but does not run it.

Envelope. The JSON object {"value": ...} that holds every answer other than text, so that a number, a list and a record travel the same way.

Example. An input and the exact answer you expect for it, shown to the model to steer the format and the judgement. An IntentExample in code, or an entry under examples in an intent file.

Fallback provider. A second provider, used only when the primary fails with a transient error: a 429, a 5xx, a transport error, an unreadable reply or a timeout.

Finding. The message of a failed check, sent back to the model on the next attempt. Each finding is also an issue on the result.

Input. The value an intent is applied to. It is sent to the model in full, or refused when it is longer than MaxInputChars; it is never cut.

Intent. A plain-language instruction applied to a value, such as "Extract the invoice total". The unit of work in IntentSharp.

Intent file. A YAML or JSON file that holds one intent's wording, shape, rules, examples and model, so that it can change without a release. See Intent files.

Intent runtime. IntentRuntime: runs a named intent from a catalog through a client, reading the current definition on every call.

Intent tool. An intent from a catalog offered to an agent as a tool (AsAIFunction, AsAIFunctions). It returns checked JSON, or a failure the agent can read, and throws into the agent's loop only when the agent's own cancellation token is cancelled.

Issue. One problem found during a call, as a ResultIssue: where it was found, on which attempt, and what is wrong.

J to M

Judge. An optional model call that reviews an answer after it passes the checks, and lists its problems. See Results and verification.

License key. The key that licenses your application's use of IntentSharp, set in code, in configuration or in an environment variable. See Licensing.

Live reload. A file catalog noticing that an intent file changed and using the new definition on the next call, with no restart.

Memory. A record of completed calls, kept by the client. The default memory keeps its entries in your process.

Model-call ceiling. MaxModelCalls: the most model calls one call may make, attempts and judge calls together (6 by default).

N to R

Named validator. A C# check your application registers under a name, so that an intent file can switch it on by that name. A file names checks; it cannot carry code.

Provider. What sends a request to a model: the built-in OpenAI and Anthropic providers, a chat client, the scripted provider for tests, or your own IAIProvider.

Refusal. A reply in which the model declines the request. It is an issue, and it ends the call with no further attempt.

Result. The AIResult<T> every call returns: Success, the checked Value, every issue and every attempt.

Rule. A check declared in an intent file, such as minimum, pattern, enum or required. A broken rule is a finding that names the path and the value.

Run-time shape. A result shape given as a JSON schema while the program runs, instead of a .NET type. It returns an AIResult<JsonNode>.

S to V

Scripted provider. ScriptedProvider: a provider that answers in your process from replies you script, for tests and demos. It calls no model.

Shape. What an intent returns: text, a single value, a .NET type, or a JSON schema.

Strict schema. A JSON schema in which every property is required and no other property is allowed. Most result types reach the model as one. See Typed output.

Time budget. Timeout on a request, or DefaultTimeout on the client: the longest a whole call may take, every attempt included.

Truncation. A reply cut off by the output token limit (MaxOutputTokens). It fails its attempt.

Validator. A check in code on the typed value, added with Require<T> or Validate<T>. It returns the problems it finds as messages.