Soenneker.Maf.Pool.Ollama 4.0.149

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

Provides Ollama-specific registration extensions for IMafPool, enabling integration with local LLMs via Microsoft Agent Framework.

Install

dotnet add package Soenneker.Maf.Pool.Ollama

Usage

using Soenneker.Maf.Pool.Ollama;
using Soenneker.Maf.Pool.Abstract;

await pool.AddOllama(
    poolId: "chat",
    key: "local-primary",
    modelId: "llama3.2",
    endpoint: "http://localhost:11434",
    rpm: 60,
    instructions: "Answer concisely.",
    cancellationToken: cancellationToken);

(AIAgent? agent, IMafPoolEntry? entry) =
    await pool.GetAvailable("chat", cancellationToken);

The Ollama server and requested model must already be available. Registration does not start Ollama or pull the model.

What you get

  • MafPoolOllamaExtension — Provides Ollama-specific registration extensions for IMafPool, enabling integration with local LLMs via Microsoft Agent Framework.

API at a glance

API What it does Result / important behavior
MafPoolOllamaExtension.AddOllama(pool, poolId, key, modelId, endpoint, rps, rpm, rpd, tokensPerDay, instructions, cancellationToken) Registers an Ollama model in the agent pool with optional rate/token limits. A task that completes when the ollama addition is complete.
MafPoolOllamaExtension.RemoveOllama(pool, poolId, key, cancellationToken) Unregisters an Ollama model from the agent pool and removes the associated cache entry. True if the entry existed and was removed; false if it was not present.

Practical notes

  • The agent is created lazily and reused until its entry is removed.
  • Omitted instructions default to You are a helpful assistant running locally via Ollama.
  • Checkout consumes one request from the configured quota. tokensPerDay is not reconciled against actual model token usage.
  • Treat non-loopback HTTP endpoints as unencrypted; use an appropriately secured endpoint for remote Ollama servers.
Product Compatible and additional computed target framework versions.
.NET 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.149 0 10/8/2026
4.0.148 79 9/30/2026
4.0.147 54 9/30/2026
4.0.146 58 9/29/2026
4.0.145 65 9/29/2026
4.0.144 67 9/25/2026
4.0.143 61 9/25/2026
4.0.142 56 9/25/2026
4.0.141 58 9/25/2026
4.0.139 57 9/24/2026
4.0.138 64 9/19/2026
4.0.137 65 9/17/2026
4.0.136 66 9/17/2026
4.0.135 68 9/16/2026
4.0.134 59 9/16/2026
4.0.133 69 9/16/2026
4.0.132 59 9/15/2026
4.0.131 61 9/13/2026
4.0.130 67 9/13/2026
4.0.129 65 9/13/2026
Loading failed

Update dependency Soenneker.Maf.Pool to 4.0.163 (#154)

Automatically merged