NexusLabs.Foundry.MicrosoftAgentFramework
0.1.0-alpha-0001
dotnet add package NexusLabs.Foundry.MicrosoftAgentFramework --version 0.1.0-alpha-0001
NuGet\Install-Package NexusLabs.Foundry.MicrosoftAgentFramework -Version 0.1.0-alpha-0001
<PackageReference Include="NexusLabs.Foundry.MicrosoftAgentFramework" Version="0.1.0-alpha-0001" />
<PackageVersion Include="NexusLabs.Foundry.MicrosoftAgentFramework" Version="0.1.0-alpha-0001" />
<PackageReference Include="NexusLabs.Foundry.MicrosoftAgentFramework" />
paket add NexusLabs.Foundry.MicrosoftAgentFramework --version 0.1.0-alpha-0001
#r "nuget: NexusLabs.Foundry.MicrosoftAgentFramework, 0.1.0-alpha-0001"
#:package NexusLabs.Foundry.MicrosoftAgentFramework@0.1.0-alpha-0001
#addin nuget:?package=NexusLabs.Foundry.MicrosoftAgentFramework&version=0.1.0-alpha-0001&prerelease
#tool nuget:?package=NexusLabs.Foundry.MicrosoftAgentFramework&version=0.1.0-alpha-0001&prerelease
<p align="center"> <img src="docs/assets/foundry.webp" alt="Foundry logo" width="360"> </p>
<h1 align="center">Foundry</h1>
<p align="center"> <strong>Forge reliable, observable, and testable AI agent systems in .NET.</strong> </p>
<p align="center"> <a href="https://github.com/ncosentino/foundry/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/ncosentino/foundry/actions/workflows/ci.yml/badge.svg?branch=main"></a> <a href="https://github.com/ncosentino/foundry/actions/workflows/docs.yml"><img alt="Documentation" src="https://github.com/ncosentino/foundry/actions/workflows/docs.yml/badge.svg?branch=main"></a> <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-blue.svg"></a> <a href="https://dotnet.microsoft.com/"><img alt=".NET 10" src="https://img.shields.io/badge/.NET-10.0-512BD4"></a> <img alt="Status: Alpha" src="https://img.shields.io/badge/status-alpha-orange"> </p>
Foundry is an AI and agentic application framework for .NET. It brings agent construction, orchestration, diagnostics, evaluation, experimentation, provider integrations, and deterministic testing into one composable package family.
Foundry is dependency-injection neutral at its core. Use standard
IServiceCollection registration, or add the optional Needlr integrations
when you want source-generated discovery and Needlr's plugin-oriented
composition model.
Foundry is alpha software. Package IDs, namespaces, and APIs may change before the first stable release.
Installation
Release v0.1.0-alpha.1 maps to NuGet package version
0.1.0-alpha-0001. After the release workflow completes, install the core
Microsoft Agent Framework runtime:
dotnet add package NexusLabs.Foundry.MicrosoftAgentFramework --version 0.1.0-alpha-0001
Add the workflow, generator, analyzer, provider, or Needlr integration packages that match your application. See Getting Started for the recommended package combinations.
Why Foundry?
AI prototypes are easy to start and difficult to operate. Foundry focuses on the parts that become important after the first successful prompt:
- Declarative agents and workflows with generated registries and typed factory methods.
- Composable orchestration for sequential, handoff, group-chat, graph, and iterative-loop workloads.
- Provider-neutral evaluation with retries, concurrency limits, deterministic and statistical policies, and publication pipelines.
- Built-in observability for agent runs, tool calls, token usage, progress, budgets, and pipeline performance.
- Replaceable integrations for Microsoft Agent Framework, MEAI Reporting, Langfuse, GitHub Copilot, Semantic Kernel, and Needlr.
- Deterministic testing tools for generated functions, agents, workflows, and scripted model interactions.
Package map
| Package | Purpose |
|---|---|
NexusLabs.Foundry.MicrosoftAgentFramework |
Agent construction, context, diagnostics, progress, workspace, and topology declarations |
NexusLabs.Foundry.MicrosoftAgentFramework.Workflows |
Sequential, handoff, group-chat, and graph workflow execution |
NexusLabs.Foundry.MicrosoftAgentFramework.Testing |
Deterministic agent and workflow testing |
NexusLabs.Foundry.MicrosoftAgentFramework.DevUI |
Microsoft Agent Framework DevUI integration |
NexusLabs.Foundry.MicrosoftAgentFramework.Generators |
Compile-time agent, function, and workflow registries |
NexusLabs.Foundry.MicrosoftAgentFramework.Analyzers |
Compile-time agent and topology validation |
NexusLabs.Foundry.Evaluation |
MEAI evaluation and provider-neutral experiments |
NexusLabs.Foundry.Evaluation.Reporting |
MEAI Reporting adapter |
NexusLabs.Foundry.Langfuse |
Langfuse telemetry, datasets, scoring, and experiment publication |
NexusLabs.Foundry.Copilot |
GitHub Copilot IChatClient and web-search integration |
NexusLabs.Foundry.Needlr.MicrosoftAgentFramework |
Optional Needlr integration for Foundry agents |
NexusLabs.Foundry.Needlr.SemanticKernel |
Optional Needlr integration for Semantic Kernel |
NexusLabs.Foundry.Needlr.SemanticKernel.Generators |
Compile-time Semantic Kernel plugin registration for Needlr |
Neutral Foundry packages never depend on Needlr. Needlr-specific behavior is
isolated under NexusLabs.Foundry.Needlr.*.
A small example
using Microsoft.Extensions.DependencyInjection;
using NexusLabs.Foundry.MicrosoftAgentFramework;
using NexusLabs.Foundry.MicrosoftAgentFramework.Workflows.Diagnostics;
var services = new ServiceCollection();
services.AddFoundryAgentFramework(builder => builder
.UsingChatClient(chatClient)
.UsingDiagnostics());
using var provider = services.BuildServiceProvider();
var agent = provider
.GetRequiredService<IAgentFactory>()
.CreateAgent<ResearchAgent>();
var response = await agent.RunAsync(
"Compare the trade-offs of reflection and source generation.",
cancellationToken: CancellationToken.None);
[FoundryAgent(
Instructions = "Research the request and return a concise, sourced answer.")]
internal sealed partial class ResearchAgent
{
}
The source generator discovers the agent declaration and produces the
registries used by IAgentFactory. Reflection-based discovery remains
available where runtime flexibility is more important than trimming or
NativeAOT.
Documentation
- Documentation source
- Agent Framework integrations and workflows
- Provider-neutral experiment runner
- Langfuse integration
- Testing tools
- Versioned API reference
- Architecture decisions
The public documentation target is www.devleader.ca/projects/foundry.
Examples
The solution includes 30 compile-validated example projects under
src/Examples:
- generated agents and functions;
- sequential, handoff, group-chat, and graph workflows;
- iterative loops, progress dashboards, diagnostics, and token metrics;
- provider-neutral experiments, MEAI Reporting, and Langfuse;
- GitHub Copilot and Semantic Kernel integrations;
- NativeAOT and generator-coexistence checks.
Build from source
dotnet build src\NexusLabs.Foundry.slnx
Build the documentation locally with:
python -m pip install --requirement requirements-docs.txt
python -m mkdocs build --strict
Trusted Linux CI jobs support isolated PitCrew runners. See Local CI Runners for routing and fork-safety details.
About
Foundry is built by Nick Cosentino, creator of Dev Leader and BrandGhost.
Find Nick online:
Contributing
Issues and pull requests are welcome. For substantial behavioral or architectural changes, open an issue first so the intended package boundary and public API can be discussed before implementation.
License
Foundry is licensed under the MIT License.
| Product | Versions 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. |
-
net10.0
- Microsoft.Agents.AI (>= 1.3.0)
- Microsoft.Agents.AI.Workflows (>= 1.3.0)
- OpenTelemetry.Api (>= 1.15.3)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on NexusLabs.Foundry.MicrosoftAgentFramework:
| Package | Downloads |
|---|---|
|
NexusLabs.Foundry.Needlr.MicrosoftAgentFramework
Needlr source-generation and dependency-injection integration for Foundry's Microsoft Agent Framework runtime. |
|
|
NexusLabs.Foundry.MicrosoftAgentFramework.DevUI
NexusLabs.Foundry integration for Microsoft Agent Framework DevUI. Bridges [FoundryAgent]-declared agents into MAF DevUI's entity discovery so they appear in the /devui web debugging interface. |
|
|
NexusLabs.Foundry.MicrosoftAgentFramework.Testing
Test harness for NexusLabs.Foundry.MicrosoftAgentFramework. Provides IAgentScenario, AgentScenarioRunner, and deterministic testing support for agent orchestrations. |
|
|
NexusLabs.Foundry.MicrosoftAgentFramework.Workflows
Package Description |
|
|
NexusLabs.Foundry.Evaluation
Evaluation support for NexusLabs.Foundry.MicrosoftAgentFramework. Maps captured diagnostics to Microsoft.Extensions.AI.Evaluation inputs and provides provider-neutral experiment scheduling, retries, run evaluation, structured quality policies, final result sinks, publication outcomes, and schema-versioned JSON artifacts. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha-0001 | 44 | 7/19/2026 |