Muxi 0.20260220.0

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

MUXI .NET SDK

Official .NET SDK for MUXI — infrastructure for AI agents.

Highlights

  • Async/await with HttpClient transport
  • Built-in retries, idempotency, and typed errors
  • Streaming helpers for chat/audio and deploy/log tails

Need deeper usage notes? See the User Guide for streaming, retries, and auth details.

Requirements

  • .NET 8.0+

Installation

dotnet add package Muxi

Quick Start

Server Management (Control Plane)

using Muxi;

var server = new ServerClient(new ServerConfig
{
    Url = Environment.GetEnvironmentVariable("MUXI_SERVER_URL")!,
    KeyId = Environment.GetEnvironmentVariable("MUXI_KEY_ID")!,
    SecretKey = Environment.GetEnvironmentVariable("MUXI_SECRET_KEY")!
});

// List formations
var formations = await server.ListFormationsAsync();
Console.WriteLine(formations);

// Get server status
var status = await server.StatusAsync();
Console.WriteLine($"Uptime: {status?["uptime"]}s");

Formation Usage (Runtime API)

using Muxi;

// Connect via server proxy
var client = new FormationClient(new FormationConfig
{
    FormationId = "my-bot",
    ServerUrl = Environment.GetEnvironmentVariable("MUXI_SERVER_URL"),
    AdminKey = Environment.GetEnvironmentVariable("MUXI_ADMIN_KEY"),
    ClientKey = Environment.GetEnvironmentVariable("MUXI_CLIENT_KEY")
});

// Or connect directly to formation
var client = new FormationClient(new FormationConfig
{
    Url = "http://localhost:8001",
    AdminKey = Environment.GetEnvironmentVariable("MUXI_ADMIN_KEY"),
    ClientKey = Environment.GetEnvironmentVariable("MUXI_CLIENT_KEY")
});

// Chat (non-streaming)
var response = await client.ChatAsync(new { message = "Hello!" }, "user123");
Console.WriteLine(response?["message"]);

// Chat (streaming)
await foreach (var evt in client.ChatStreamAsync(new { message = "Tell me a story" }, "user123"))
{
    Console.Write(evt.Data);
}

// Health check
var health = await client.HealthAsync();
Console.WriteLine($"Status: {health?["status"]}");

Webhook Verification

using Muxi;

// In your webhook handler (e.g., ASP.NET Core controller)
[HttpPost("webhook")]
public IActionResult HandleWebhook()
{
    using var reader = new StreamReader(Request.Body);
    var payload = reader.ReadToEnd();
    var signature = Request.Headers["X-Muxi-Signature"].FirstOrDefault();
    var secret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET")!;

    if (!Webhook.VerifySignature(payload, signature, secret))
    {
        return Unauthorized("Invalid signature");
    }

    var evt = Webhook.Parse(payload);

    switch (evt.Status)
    {
        case "completed":
            foreach (var item in evt.Content)
            {
                if (item.Type == "text")
                    Console.WriteLine(item.Text);
            }
            break;
        case "failed":
            Console.WriteLine($"Error: {evt.Error?.Message}");
            break;
        case "awaiting_clarification":
            Console.WriteLine($"Question: {evt.Clarification?.Question}");
            break;
    }

    return Ok(new { received = true });
}

Configuration

Environment Variables

  • MUXI_DEBUG=1 - Enable debug logging

Client Options

var server = new ServerClient(new ServerConfig
{
    Url = "https://muxi.example.com:7890",
    KeyId = "your-key-id",
    SecretKey = "your-secret-key",
    Timeout = 30,      // Request timeout in seconds
    MaxRetries = 3,    // Retry on 429/5xx errors
    Debug = true       // Enable debug logging
});

Error Handling

try
{
    await server.GetFormationAsync("nonexistent");
}
catch (NotFoundException e)
{
    Console.WriteLine($"Not found: {e.Message}");
}
catch (AuthenticationException e)
{
    Console.WriteLine($"Auth failed: {e.Message}");
}
catch (RateLimitException e)
{
    Console.WriteLine($"Rate limited. Retry after: {e.RetryAfter}s");
}
catch (MuxiException e)
{
    Console.WriteLine($"Error: {e.Message} ({e.StatusCode})");
}

License

MIT

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.
  • net10.0

    • No dependencies.

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
0.20260220.0 80 2/20/2026
0.20260211.0 81 2/11/2026