ButlerSDK.Core 1.1.0-preview

This is a prerelease version of ButlerSDK.Core.
dotnet add package ButlerSDK.Core --version 1.1.0-preview
                    
NuGet\Install-Package ButlerSDK.Core -Version 1.1.0-preview
                    
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="ButlerSDK.Core" Version="1.1.0-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ButlerSDK.Core" Version="1.1.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="ButlerSDK.Core" />
                    
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 ButlerSDK.Core --version 1.1.0-preview
                    
#r "nuget: ButlerSDK.Core, 1.1.0-preview"
                    
#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 ButlerSDK.Core@1.1.0-preview
                    
#: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=ButlerSDK.Core&version=1.1.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ButlerSDK.Core&version=1.1.0-preview&prerelease
                    
Install as a Cake Tool

ButlerSDK - AI Orchestration Framework (Preview 1)

Robust, vendor-agnostic AI orchestration for .NET.

ButlerSDK transforms Large Language Models (LLMs) from unpredictable chatbots into reliable infrastructure components. It provides a unified abstraction layer over OpenAI, Google Gemini, and Ollama, while enforcing tool infrastructure, strict C# typing, and dynamic streaming interception for agentic workflows.


🚀 Why ButlerSDK?

Most AI integrations are simple wrappers. ButlerSDK is a complete Orchestrator.

  • 🔌 Vendor Agnostic: Swap between gpt-4o, gemini-flash, and local mistral models without changing a single line of business logic.
  • 🧠 Self-Healing Agents (QoS): Built-in (And Opt in) Post-Processing detects tool-call hallucinations (e.g., the model discussing a tool without outputting the JSON) and forces a hidden "Remedial" turn to fix the error mid-stream.
  • 🛡️ Capability-Based Security: Tools are sandboxed via code. The ToolSurfaceScope flags have developers to specify exact permissions (Disk, Network, OS execution).
  • 🗄️ "TrenchCoat" Memory: A tiered, sliding-window context engine that ensures your System Prompts and Tool instructions are permanently pinned and never age out of the context window.

⚡ Quick Start

ButlerSDK uses a Facade pattern to get you started instantly, while exposing the full architecture for power users.

using ButlerSDK;
using ButlerToolContract.DataTypes;

// 1. Initialize the Butler
var apiKey = Environment.GetEnvironmentVariable("OPENAI_API_KEY");
var butler = ButlerStarter.Instance.CreateOpenAiButler(apiKey, "gpt-4o");

// 2. Adjust Security Scope & Add Capability-Safe Tools
butler.ToolSurfaceScope += (ToolSurfaceScope.NetworkWrite | ToolSurfaceScope.NetworkRead);
butler.AddTool(new ButlerTool_Network_Ping());   

// 3. Set Directives
butler.AddSystemMessage("You are a helpful network engineer.");
butler.AddUserMessage("Please ping 8.8.8.8 and summarize the results.");

// 4. Stream Response with Auto-Tool Execution
var EndReason = await butler.StreamResponseAsync((update, history) => 
{
    foreach(var part in update.ContentUpdate)
    {
        Console.Write(part.Text); 
    }
    return true;
});

🔐 Secure Key Management & Ephemeral Access

ButlerSDK rejects the practice of holding API keys in long-lived string variables.

Keys are handled in memory via SecureString to reduce the lifetime of plaintext values.

Tools can utilize an Ephemeral Access Pattern, accessing keys only for the duration of the HTTP request, minimizing the attack surface.

Encrypted-at-rest DPAPI Vaulting is available via the WindowsVault package.

For Non Windows, there's support for loading API keys with the EnvironmentApiKeyMgr in the ButlerSDK.ApiKeyMgr nuget.

📚 Full Documentation & Source Code

ButlerSDK is an open-source project. For the full documentation—including how to write custom tools using Interface Sniffing (IButlerToolAsyncResolver), how to set up local Ollama models, and how to write custom Providers—please visit our GitHub repository:

👉 ButlerSDK on GitHub

Feedback & Issues: This is currently in Active Preview. Please submit bug reports or feedback directly on our GitHub Issues page or via email at butlersdkfeedback@gmail.com.

License: Apache 2.0

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on ButlerSDK.Core:

Package Downloads
ButlerSDK.Provider.OpenAI

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0-preview 39 3/9/2026
1.0.1-preview 49 2/23/2026 1.0.1-preview is deprecated because it is no longer maintained.
1.0.0-preview 57 2/22/2026 1.0.0-preview is deprecated because it is no longer maintained.