Agnostic 0.1.2
dotnet add package Agnostic --version 0.1.2
NuGet\Install-Package Agnostic -Version 0.1.2
<PackageReference Include="Agnostic" Version="0.1.2" />
<PackageVersion Include="Agnostic" Version="0.1.2" />
<PackageReference Include="Agnostic" />
paket add Agnostic --version 0.1.2
#r "nuget: Agnostic, 0.1.2"
#:package Agnostic@0.1.2
#addin nuget:?package=Agnostic&version=0.1.2
#tool nuget:?package=Agnostic&version=0.1.2
Agnostic
Prompt in, typed object out, from any provider. A profile name picks the model and the transport.
record Summary(string Title, string Gist);
Summary a = await AI.Ask<Summary>(prompt); // Opus, via the API
Summary b = await AI.Ask<Summary>(prompt, "cheap"); // a cheap OpenAI model
Summary c = await AI.Ask<Summary>(prompt, "sub"); // the local claude CLI, no API key
var answer = await AI.Ask("What is in this?", "sub", images: [AI.Image(path)]);
Console.WriteLine(answer.Spend); // 3026 ms $0.003202 1 call claude-sonnet-5
Ask returns AIAnswer<T>, which converts implicitly to T. Keep it for cost, timing, failure and
which tools ran; a failed call is a returned value, not an exception.
Tools are ordinary methods and work on every backend. AIAgent<T> declares a profile, a system
prompt and [Tool] methods as one type. Also streaming, embeddings, per-profile limits, a usage log
and Admin spend reports.
Targets net9.0 and net10.0. Full reference:
DETAILS.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Anthropic (>= 12.8.0)
- Microsoft.Extensions.AI (>= 10.9.0)
- Microsoft.Extensions.AI.OpenAI (>= 10.9.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
-
net9.0
- Anthropic (>= 12.8.0)
- Microsoft.Extensions.AI (>= 10.9.0)
- Microsoft.Extensions.AI.OpenAI (>= 10.9.0)
- Microsoft.Extensions.Caching.Memory (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.