Nexus.Messaging 0.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Nexus.Messaging --version 0.1.2
                    
NuGet\Install-Package Nexus.Messaging -Version 0.1.2
                    
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="Nexus.Messaging" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nexus.Messaging" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Nexus.Messaging" />
                    
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 Nexus.Messaging --version 0.1.2
                    
#r "nuget: Nexus.Messaging, 0.1.2"
                    
#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 Nexus.Messaging@0.1.2
                    
#: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=Nexus.Messaging&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Nexus.Messaging&version=0.1.2
                    
Install as a Cake Tool

Nexus β€” Multi-Agent Orchestration Engine

CI .NET 10 License: MIT

Nexus is an enterprise-grade .NET 10 framework for building, orchestrating, and managing multi-agent AI systems. It provides a composable architecture for agent execution, tool integration, memory management, guardrails, protocol support (MCP, A2A, AG-UI), and workflow orchestration.

πŸ“– Full Documentation β€” Architecture guides, API reference, and examples.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Nexus.Hosting.AspNetCore               β”‚
β”‚              (AG-UI SSE, A2A JSON-RPC, Health)           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Nexus.Protocols.Mcp  β”‚  Nexus.Protocols.A2A  β”‚  AG-UI  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                   Nexus.Workflows.Dsl                    β”‚
β”‚                  (JSON/YAML Pipelines)                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Nexus.Orchestration  β”‚  Nexus.Orchestration.Checkpoint  β”‚
β”‚   (Graph, Sequence,   β”‚     (Snapshot Serialization,     β”‚
β”‚    Parallel, Hier.)   β”‚      In-Memory Store)            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Guardrails  β”‚  Memory  β”‚  Messaging  β”‚  Telemetry  β”‚Authβ”‚
β”‚  (PII, Inj.) β”‚ (Conv,   β”‚ (PubSub,   β”‚(OTel Tracesβ”‚OAuthβ”‚
β”‚              β”‚  Working) β”‚  DLQ)      β”‚ & Metrics) β”‚    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                      Nexus.Core                          β”‚
β”‚    Agents Β· Tools Β· Pipeline Β· Events Β· Contracts Β· DI   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Packages

Package Description
Nexus.Core Agent abstractions, tool registry, pipeline builder, events, DI configuration
Nexus.Orchestration Graph/sequence/parallel/hierarchical execution, agent pool, task graphs
Nexus.Orchestration.Checkpointing In-memory checkpoint store, JSON snapshot serialization
Nexus.Memory Conversation store, working memory, context window management
Nexus.Messaging In-memory message bus, pub/sub, shared state, dead letter queue
Nexus.Guardrails Prompt injection detection, PII redaction, secrets detection, input limits
Nexus.Telemetry OpenTelemetry traces & metrics for agents and tools
Nexus.Auth.OAuth2 API key authentication, OAuth2 client credentials, token cache
Nexus.Protocols.Mcp Model Context Protocol tool adapter and host management
Nexus.Protocols.A2A Agent-to-Agent protocol client (JSON-RPC over HTTP)
Nexus.Protocols.AgUi AG-UI event bridge for real-time streaming to frontends
Nexus.Workflows.Dsl Load agent pipelines from JSON/YAML with validation & variable resolution
Nexus.Hosting.AspNetCore ASP.NET Core endpoints for AG-UI (SSE) and A2A, health checks
Nexus.Testing Mock agents, tools, event recording, evaluation harnesses

Quick Start

using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;
using Nexus.Core.Agents;
using Nexus.Core.Configuration;
using Nexus.Core.Tools;
using Nexus.Memory;
using Nexus.Orchestration;

var services = new ServiceCollection();

services.AddNexus(nexus =>
{
    nexus.UseChatClient(_ => myLlmClient);       // Plug in any IChatClient
    nexus.AddOrchestration(o => o.UseDefaults());
    nexus.AddMemory(m => m.UseInMemory());
});

var sp = services.BuildServiceProvider();

// Register tools
var tools = sp.GetRequiredService<IToolRegistry>();
tools.Register(new LambdaTool("get_time", "Current UTC time",
    (_, _, _) => Task.FromResult(ToolResult.Success(DateTime.UtcNow.ToString("O")))));

// Spawn an agent and execute
var pool = sp.GetRequiredService<IAgentPool>();
var agent = await pool.SpawnAsync(new AgentDefinition
{
    Name = "Assistant",
    SystemPrompt = "You are a helpful assistant.",
});

var orchestrator = sp.GetRequiredService<IOrchestrator>();
var result = await orchestrator.ExecuteSequenceAsync([
    new AgentTask { Id = TaskId.New(), Description = "Hello!", AssignedAgent = agent.Id }
]);

Console.WriteLine(result.TaskResults.Values.First().Text);

Multi-Agent Graph

var graph = orchestrator.CreateGraph();
var research = graph.AddTask(new AgentTask
{
    Id = TaskId.New(),
    Description = "Research AI trends",
    AssignedAgent = researcher.Id,
});
var write = graph.AddTask(new AgentTask
{
    Id = TaskId.New(),
    Description = "Write blog post",
    AssignedAgent = writer.Id,
});

graph.AddDependency(research, write);

await foreach (var evt in orchestrator.ExecuteGraphStreamingAsync(graph))
{
    // Handle NodeStarted, AgentEventInGraph, NodeCompleted, etc.
}

Guardrails

using Nexus.Guardrails;
using Nexus.Guardrails.BuiltIn;

var pipeline = new DefaultGuardrailPipeline([
    new PromptInjectionDetector(),
    new PiiRedactor(GuardrailPhase.Output),
    new SecretsDetector(),
    new InputLengthLimiter { MaxTokens = 5000 },
]);

var result = await pipeline.EvaluateInputAsync(userInput);
if (!result.IsAllowed)
    Console.WriteLine($"Blocked: {result.Reason}");

Workflow DSL

{
    "id": "content-pipeline",
    "name": "Content Pipeline",
    "nodes": [
        { "id": "research", "name": "Researcher", "description": "Research topic",
          "agent": { "tools": ["web_search"], "budget": { "maxCostUsd": 1.0 } } },
        { "id": "write", "name": "Writer", "description": "Write content" }
    ],
    "edges": [
        { "from": "research", "to": "write" }
    ]
}
var loader = sp.GetRequiredService<IWorkflowLoader>();
var workflow = loader.LoadFromString(json, "json");
var validation = sp.GetRequiredService<IWorkflowValidator>().Validate(workflow);

Documentation

Full documentation is in the docs/ directory:

Building & Testing

dotnet build Nexus.sln
dotnet test Nexus.sln

Project Structure

src/
  Nexus.Core/                       Core abstractions & DI
  Nexus.Orchestration/              Agent pool, orchestrator, task graphs
  Nexus.Orchestration.Checkpointing/ Snapshot serialization & storage
  Nexus.Memory/                     Conversation & working memory
  Nexus.Messaging/                  Message bus & shared state
  Nexus.Guardrails/                 Input/output guardrails
  Nexus.Telemetry/                  OpenTelemetry integration
  Nexus.Auth.OAuth2/                Authentication & token management
  Nexus.Protocols.Mcp/              MCP tool adapter
  Nexus.Protocols.A2A/              A2A protocol client
  Nexus.Protocols.AgUi/             AG-UI event bridge
  Nexus.Workflows.Dsl/              JSON/YAML workflow loader
  Nexus.Hosting.AspNetCore/         ASP.NET Core hosting
  Nexus.Testing/                    Test utilities & mocks
tests/
  Nexus.Core.Tests/                 35 unit tests
  Nexus.Orchestration.Tests/        14 unit tests
  Nexus.Memory.Tests/               12 unit tests
  Nexus.Messaging.Tests/            11 unit tests
  Nexus.Guardrails.Tests/           16 unit tests
  Nexus.Workflows.Dsl.Tests/        20 unit tests
  Nexus.Integration.Tests/          9 integration tests + 15 unit tests
examples/
  Nexus.Examples.Minimal/           Single agent with tools & guardrails
  Nexus.Examples.MultiAgent/        Graph orchestration, checkpointing, workflows

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.

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.3.0 56 4/2/2026
0.2.1 60 4/2/2026
0.1.2 56 3/31/2026
0.1.1 50 3/31/2026