Skip to content

AgentPrismUiBuilderExtensions

Namespace AgentPrism · Assembly AgentPrism.UI.dll

Provides extensions that register the embedded management UI.

public static class AgentPrismUiBuilderExtensions

objectAgentPrismUiBuilderExtensions

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Registers the embedded management UI. MapAgentPrism finds the registration and binds the UI routes under the same prefix.

public static IAgentPrismBuilder UseUI(this IAgentPrismBuilder builder)

builder IAgentPrismBuilder

The AgentPrism configuration chain.

IAgentPrismBuilder

The continuation of the chain.

No separate mapping call is required. The prefix is written in one place - inside MapAgentPrism - because a prefix written in two places, once out of sync, would make the UI show a blank page without any error.

Registration uses TryAdd. A consumer that registers its own IAgentPrismUiProvider implementation earlier wins (the replaceable-extension rule).

builder.AddAgentPrism()
.UseOpenAI(apiKey)
.UseUI();
app.MapAgentPrism("/agentprism");

ArgumentNullException

builder is null.