Platforms
Where Klyroo., Klyroo. and Klyroo. run, what their project files declare, and how render modes, .NET MAUI, NativeAOT and the browser runtime behave.
On this page
What the csproj files declare
| Property | Klyroo. |
Klyroo. |
Klyroo. |
|---|---|---|---|
| Target framework | net11.0 |
net11.0 |
net11.0 |
IsAotCompatible |
true |
not set | not set |
IsTrimmable |
true |
true |
not set |
Supported |
none declared | browser, ios, android, maccatalyst, windows |
none declared |
| Dependencies | none | Microsoft., Microsoft., Klyroo., Klyroo., Klyroo., Klyroo. |
Klyroo., Microsoft. |
All three projects build with warnings as errors, so the trimming and AOT analyzers that apply to them are clean.
Blazor render modes
Agent uses no JavaScript interop, no IJSRuntime, no component lifecycle and no browser API, so it
does not depend on the render mode. What differs is how long the scoped service and your controllers live:
| Render mode | Lifetime of the service and controllers | Note |
|---|---|---|
| Static SSR | One HTTP request | Useful for server-side tool handlers; there is no live UI to observe. |
| Interactive Server | One circuit | The agent edits the same controller instances the page renders. |
| Interactive WebAssembly | One browser tab | The bridge runs in the browser, next to the controllers. |
| Auto | Server first, then the browser | Register AddKlyrooAgent() in both projects. Controllers on the server and in the browser are different instances. |
An agent that runs on your server and must edit what a browser shows has to reach the controllers of that user's
session, which is your application's responsibility, for example through a service that holds the user's
Agent.
.NET MAUI Blazor Hybrid
Register the bridge after AddMaui:
using Klyroo.Agent;
builder.Services.AddMauiBlazorWebView();
builder.Services.AddKlyrooAgent();Klyroo. declares ios, android, maccatalyst and windows as supported platforms, so the platform
compatibility analyzer does not warn when you reference it from a MAUI project. The service itself runs in the .NET
runtime of the app, not in the WebView.
If your MAUI app uses XAML or C# Markup instead of Blazor, note that Agent has no WebView
dependency in its code, but this repository does not test that setup. Klyroo. alone gives you only the types.
NativeAOT and trimming
Klyroo. declares IsAotCompatible and IsTrimmable. It contains records, an enum and
UndoStack, with no reflection.
Klyroo. declares IsTrimmable but not IsAotCompatible, so the AOT analyzers are not enforced for it. Its
service code uses LINQ, lambdas and no reflection of its own, but it depends on the Klyroo Core packages, and you
should publish with PublishAot and read the warnings before relying on it in an AOT app. The tool handler in the
guides serializes nothing itself; if you serialize its results in an
AOT app, use a source-generated System. context.
The browser runtime
klyroo-agent. runs in any browser that supports ES modules. It uses CSS., custom events and standard
DOM APIs. WebMCP registration needs a browser that exposes document. or navigator. with
registerTool; without it the call returns a no-op function and nothing is registered.
Static web assets are served at /_ in development and when your app maps static assets in
production. If the script returns 404 in a published app, check that your app calls UseStaticFiles or
MapStaticAssets.