Soenneker.Maf.Dtos.Options 11.0.70

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Maf.Dtos.Options

Options for creating a Microsoft Agent Framework AIAgent instance.

Install

dotnet add package Soenneker.Maf.Dtos.Options

Usage

var options = new MafOptions
{
    ModelId = "my-model",
    Endpoint = "https://api.example.com",
    ApiKey = configuration["AI_API_KEY"],
    RequestsPerMinute = 60,
    MaxTokens = 1_000,
    Temperature = 0.2,
    AgentFactory = static (value, cancellationToken) =>
        CreateAgentAsync(value, cancellationToken)
};

MafOptions only carries configuration. The rate-limit and generation fields are not enforced or applied by this package; the pool, cache, agent factory, or request pipeline consuming the options must do that work.

What you get

  • MafOptions — Options for creating a Microsoft Agent Framework AIAgent instance.

API at a glance

API What it does Result / important behavior
MafOptions.ModelId Optional identifier for the model or agent configuration. Optional identifier for the model or agent configuration.
MafOptions.Endpoint Optional endpoint (if applicable). Optional endpoint (if applicable).
MafOptions.ApiKey Optional API key (if applicable). Optional API key (if applicable).
MafOptions.AgentFactory Delegate that creates an AIAgent instance. Required when adding an entry by options. Delegate that creates an AIAgent instance. Required when adding an entry by options.
MafOptions.RequestsPerSecond Maximum number of requests allowed per second. Used for rate limiting. Maximum number of requests allowed per second. Used for rate limiting.
MafOptions.RequestsPerMinute Maximum number of requests allowed per minute. Used for rate limiting. Maximum number of requests allowed per minute. Used for rate limiting.
MafOptions.RequestsPerDay Maximum number of requests allowed per day. Used for rate limiting. Maximum number of requests allowed per day. Used for rate limiting.
MafOptions.TokensPerDay Maximum number of tokens allowed per day (input + output). Used for quota control. Maximum number of tokens allowed per day (input + output). Used for quota control.
MafOptions.MaxTokens The maximum number of tokens the model is allowed to generate in a single response. The maximum number of tokens the model is allowed to generate in a single response.
MafOptions.Temperature Sampling temperature (0.0 - 2.0). Higher values produce more randomness; lower values are more deterministic. Sampling temperature (0.0 - 2.0). Higher values produce more randomness; lower values are more deterministic.

Security

ApiKey is serializable. Do not log or persist populated options, and prefer loading secrets from a secret provider at runtime. AgentFactory is excluded from JSON serialization.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Soenneker.Maf.Dtos.Options:

Package Downloads
Soenneker.Maf.Cache

Providing async thread-safe singleton Microsoft Agent Framework Agents instances.

Soenneker.Maf.Cache.Options

Caches MafOptions by key with asynchronous single-creation semantics.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.70 405 11/11/2026
11.0.69 473 11/7/2026
11.0.68 612 10/30/2026
11.0.67 266 10/27/2026
11.0.66 384 10/26/2026
11.0.65 375 10/26/2026
4.0.64 423 10/23/2026
4.0.63 760 10/14/2026
4.0.62 161 10/14/2026
4.0.61 210 10/14/2026
4.0.56 240 10/12/2026
4.0.55 319 10/12/2026
4.0.54 499 10/11/2026
4.0.53 581 10/8/2026
4.0.52 555 9/29/2026
4.0.51 705 9/24/2026
4.0.50 689 9/19/2026
4.0.49 590 9/15/2026
4.0.48 948 9/12/2026
4.0.46 1,458 8/31/2026
Loading failed

Upgrade .NET 11 release candidates to stable