ā ļø This blog post was created with the help of AI tools. Yes, I used a bit of magic from language models to organize my thoughts and automate the boring parts, but the geeky fun and the š¤ in C# are 100% mine.
TL;DR
KnownModels.MagenticBrainĀ is now ready for local .NET usage withĀElBruno.LocalLLMs.- ONNX package is available at:
- Original model source:
- This support is designed to power end-to-end agentic app experiences such as:
Why this model is important (and what it is designed for)
MagenticBrain is not just another general-purpose chat model. It is designed for agent orchestration: planning multi-step tasks, selecting tools, chaining tool calls across rounds, and deciding when to terminate with a final answer.
That design matters because many app scenarios need more than one prompt/one response:
- file + web research workflows
- iterative tool usage with state between turns
- ādo the task, then submit resultā orchestration patterns
In short, MagenticBrain is built for agentic execution loops, which is why it is a strong fit for .NET + LocalChatClient + MagenticUI experiences.
When Microsoft Research introduced MagenticLite, MagenticBrain, and Fara1.5, they framed a practical path for local agentic workflows:
- Official post:
For this repo, this post marks the concrete implementation milestone: MagenticBrain is now a first-class supported model in ElBruno.LocalLLMs.
Why this matters for MagenticUI scenarios
The target is a clean .NET workflow where orchestration and model inference stay in the same stack:
- UseĀ
KnownModels.MagenticBrainĀ inĀLocalChatClient. - Keep tool-calling and multi-round logic in C#.
- Reuse the same model path for local multi-agent UX in MagenticUI-style applications.
This is exactly the scenario behind:
Basic usage: MagenticBrain in C#
1. Install
dotnet add package ElBruno.LocalLLMs --version 0.20.4
2. Create a local MagenticBrain client
using ElBruno.LocalLLMs;using Microsoft.Extensions.AI;var options = new LocalLLMsOptions{ Model = KnownModels.MagenticBrain, EnsureModelDownloaded = true, Temperature = 0.7f, MaxSequenceLength = 32768};using var client = await LocalChatClient.CreateAsync(options);
3. Use it in an agentic loop with tools
var response = await client.GetResponseAsync([ new ChatMessage(ChatRole.System, "You are an agentic assistant. Use tools and call submit when done."), new ChatMessage(ChatRole.User, "List project files and summarize README.")],new ChatOptions{ Tools = tools});
Repo samples you can run now
src/samples/MagenticBrainAgent- OmniAgent-style round loop, tool calls, andĀ
submitĀ stop-signal.
- OmniAgent-style round loop, tool calls, andĀ
src/samples/MagenticUIServer- Local multi-agent web sample with SignalR + React UI.
docs/magentic-ui-dotnet.md- Architecture and setup details for MagenticUI .NET flow.
No extra sample project is required for this post: the existing MagenticBrain and MagenticUI samples already cover the runnable story.
Sample app screenshots (MagenticUIServer)
The following screenshots illustrate the sample app flow using the Magentic UI client and agent stream model:
You can run the sample from:
src/samples/MagenticUIServer/MagenticUIServersrc/samples/MagenticUIServer/MagenticUIServer/ClientApp
Relevant links
https://github.com/elbruno/ElBruno.MagenticUI
NuGet:Ā https://www.nuget.org/packages/ElBruno.LocalLLMs
Repository:Ā https://github.com/elbruno/ElBruno.LocalLLMs
Supported models reference:
https://github.com/elbruno/ElBruno.LocalLLMs/blob/main/docs/supported-models.md
Auto-download guide:
https://github.com/elbruno/ElBruno.LocalLLMs/blob/main/docs/auto-download.md
Official Microsoft announcement:
Original MagenticBrain model:
https://huggingface.co/microsoft/MagenticBrain
Published ONNX package used by this repo:
https://huggingface.co/elbruno/MagenticBrain-onnx
Happy coding!
Greetings
El Bruno
More posts in my blog ElBruno.com.
More info in https://beacons.ai/elbruno
Leave a comment