Fara support hero

⚠️ 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


When Microsoft Research introduced MagenticLite, MagenticBrain, and Fara1.5, it made a strong case for practical local agentic experiences:

In plain words: smaller, specialized models can deliver real agentic behavior when the tooling is right.

For this repo, that “tooling is right” moment means: Fara is now actually runnable end-to-end in .NET, not just listed as an idea.


Why this matters for C# end-to-end

The goal of ElBruno.LocalLLMs is to make local model usage feel native in .NET. With Fara support in place:

  1. You can auto-download the model from Hugging Face.
  2. Run vision prompts with LocalVisionChatClient.
  3. Keep everything in a C# workflow without external service dependencies.

That is especially important for app-level experiences like:

where “agent loop + UI + model inference” should stay coherent in one stack.

Fara architecture flow

Basic usage: Fara in C#

1. Install

dotnet add package ElBruno.LocalLLMs --version 0.20.3

2. Minimal Fara vision client

using ElBruno.LocalLLMs;
using Microsoft.Extensions.AI;
var options = new LocalLLMsOptions
{
Model = KnownModels.Fara15_9B,
EnsureModelDownloaded = true,
ExecutionProvider = ExecutionProvider.Cpu
};
await using var client = new LocalVisionChatClient(options);

3. Ask Fara about an image

var response = await client.GetResponseAsync(
[
new ChatMessage(ChatRole.User, "Describe the image in one sentence.")
],
new VisionChatOptions
{
ImagePaths = [@"C:\images\screen.png"],
MaxOutputTokens = 64
});
Console.WriteLine(response.Text);

Reusing existing Fara sample code

Fara-specific sample code is already in the repo:

This sample already covers:

  • auto-download from elbruno/Fara1.5-9B-onnx
  • local --model-path override
  • --image-path flow with VisionChatOptions

If you want to start from runnable code instead of snippets, use that sample first.


Validation snapshot

Focused validation for Fara support passed:

  • Fara unit tests: 39/39
  • Fara Hugging Face checks: 3/3
  • Fara vision lifecycle E2E: pass
    • download -> inference -> cache hit -> delete

Detailed report:

Lifecycle coverage

Relevant links

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno


Leave a comment

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading