Leveraging FabrCore's Built-in Discovery System

Eric Brasher February 21, 2026 at 9:12 AM 4 min read

Some teams build custom addon discovery systems from scratch — attribute scanning, assembly loading, service registration — not realizing FabrCore already handles this for agents, plugins, and tools.

What FabrCore Already Discovers

FabrCore has three built-in discovery mechanisms that run at startup:

  • FabrCoreServerOptions.AdditionalAssemblies — Ensures assemblies from external projects are loaded and scanned
  • FabrCoreToolRegistry — Scans all loaded assemblies for [PluginAlias] and [ToolAlias] attributes
  • FabrCoreRegistry — Scans for [AgentAlias] attributes to discover agent types

Loading External Assemblies

If your agents, plugins, or tools live in separate assemblies, pass them via AdditionalAssemblies:

Program.cs
builder.AddFabrCoreServer(new FabrCoreServerOptions
{
    AdditionalAssemblies = new List<Assembly>
    {
        typeof(MyCustomAgent).Assembly,
        typeof(MyPluginLibrary).Assembly
    }
});

That's it. No custom attribute scanning, no Assembly.LoadFrom(), no AppDomain.CurrentDomain.GetAssemblies() loops. FabrCore handles the rest.

Verify with the Discovery Endpoint

Hit GET /fabrcoreapi/Discovery during development to confirm your components were picked up:

Discovery Response
{
  "agents": [
    { "typeName": "MyApp.AssistantAgent", "aliases": ["assistant"] }
  ],
  "plugins": [
    { "typeName": "MyApp.WeatherPlugin", "aliases": ["weather"] }
  ],
  "tools": [
    { "typeName": "MyApp.MathTools.Add", "aliases": ["add-numbers"] }
  ]
}

When Custom Discovery Makes Sense

FabrCore's discovery is scoped to its domain: agents, plugins, and tools. For other concerns, use the appropriate .NET mechanism:

  • Blazor/Razor components: Use ASP.NET Core's AddApplicationPart()
  • App-specific services: Register in your Program.cs startup
  • Middleware: Use IStartupFilter or standard pipeline configuration

Building a custom addon discovery system for these is reinventing what ASP.NET Core already provides. Keep FabrCore discovery for FabrCore components, and use the framework's patterns for everything else.

Learn More

Check out the FabrCoreRegistry documentation for the complete discovery reference.


Eric Brasher

Builder of FabrCore and OpenCaddis.