Build AI Agent Systems with .NET
Fabricate Agent Behavior and Reasoning
An open-source .NET framework for building AI agent systems. Agent lifecycle management, chat persistence, tool resolution, and multi-model orchestration — designed as a first-class .NET library using the patterns .NET developers already know.
// Define an agent with FabrCore
public class MyAgent : FabrAgentProxy
{
private AIAgent? _agent;
private AgentThread? _thread;
public override async Task OnInitialize()
{
var client = await GetChatClient("AzureOpenAI");
_agent = new ChatClientAgent(client)
.AsBuilder()
.UseOpenTelemetry()
.Build(ServiceProvider);
_thread = _agent.GetNewThread();
}
public override async Task<AgentMessage> OnMessage(
AgentMessage message)
{
var response = message.Response();
var result = await _agent!.RunAsync(
message.Message, _thread);
response.Message =
string.Join("\r\n", result.Messages);
return response;
}
}
The Infrastructure Agents Need
FabrCore provides the foundational infrastructure that AI agent applications require — so you can focus on what your agent does, not on the plumbing underneath. Every agent type inherits from the FabrAgentProxy base class and gets the full infrastructure for free.
Fabricate
Intentional creation. Define agent types, configure behaviors, wire up tools — all through familiar .NET patterns like dependency injection and configuration.
Behavior
Complex, autonomous workflows that adapt and respond. Multi-agent routing, workflow planning, pipeline orchestration — real agent behaviors, not just API wrappers.
Reasoning
Multi-step problem solving with structured output, tool selection, context management, and automatic conversation summarization to stay within model limits.
Built with FabrCore
OpenCaddis is a full AI agent workspace built on FabrCore — a Blazor Server application where you create, configure, and interact with multiple AI agents through a chat interface. 4 agent types, 10 plugins, persistent vector memory, and CaddisFly pipeline orchestration — all powered by FabrCore.
Framework Capabilities
Everything your agent application needs, built into the base class
Agent Lifecycle
Initialization, health reporting, message processing, and graceful shutdown. OnInitialize() and OnMessage() — implement two methods and get a fully managed agent.
Chat Persistence
Thread-based message storage with Orleans grain state, buffered writes, and atomic replacement. Conversations survive restarts and are scoped per agent per thread.
Chat Compaction
Automatic LLM-powered conversation summarization when approaching context window limits. Preserves key context while keeping token usage under control.
Tool Resolution
Automatic discovery of tools from dependency injection with the IFabrPlugin interface. Register plugins once, and any agent can resolve and use them.
Multi-Model
Configurable model providers — Azure OpenAI, OpenAI, local models — with named configurations. Agents can use different models for different tasks.
Structured Output
JSON schema extraction for deterministic LLM responses. Define a C# class, get validated structured data back from the model — no manual parsing.
The FabrAgentProxy Pattern
One base class. Full infrastructure. Zero boilerplate.
What You Get for Free
What You Implement
OnInitialize() — set up your chat client and tools
OnMessage() — decide what to do with each message
Whether it's a simple assistant, a multi-step workflow planner, or an intelligent message router — your agent type just decides what to do with the message. The infrastructure handles the rest.
Quick Start
Get up and running in minutes
# Install the FabrCore NuGet package
dotnet add package FabrCore
# Clone the repository
git clone https://github.com/vulcan365/FabrCore.git
# Navigate and build
cd FabrCore
dotnet build
Install
Add the FabrCore NuGet package to your .NET project or clone the repository from GitHub.
Implement
Create your agent class by inheriting from FabrAgentProxy and implementing OnInitialize and OnMessage.
Run
Configure your LLM provider in fabr.json, register services, and start your application.
{
"Fabr": {
"Agents": [
{
"Handle": "assistant",
"AgentType": "MyAgent",
"Plugins": [
"WebBrowser",
"FileSystem",
"Memory"
]
}
],
"ChatClients": {
"AzureOpenAI": {
"Provider": "AzureOpenAI",
"Model": "gpt-4o"
}
}
}
}
Architecture
Built on proven .NET technologies
Your Application
Blazor, API, Console, or any .NET hostFabrCore
Agent behavior, reasoning & tool executionAgent Lifecycle
Init, health, shutdownChat & Memory
Persistence, compactionTool Resolution
DI-based pluginsOrleans
Distributed state & grain managementMicrosoft.Extensions.AI
Unified AI abstractionLLM Providers
Azure OpenAI, OpenAI, local modelsTech Stack
Ready to Build AI Agent Systems?
Get started with FabrCore — free, open source, Apache 2.0 licensed.