Skip to content

AgentPrismEndpointRouteBuilderExtensions

Namespace AgentPrism · Assembly AgentPrism.AspNetCore.dll

Extensions that connect AgentPrism’s HTTP surface to the application.

public static class AgentPrismEndpointRouteBuilderExtensions

objectAgentPrismEndpointRouteBuilderExtensions

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

Default path prefix.

public const string DefaultPrefix = "/agentprism"

string

MapAgentPrism(IEndpointRouteBuilder, string, Action<AgentPrismEndpointOptions>?)

Section titled “ MapAgentPrism(IEndpointRouteBuilder, string, Action<AgentPrismEndpointOptions>?)”

Connects the AgentPrism management API and the OpenAI-compatible run endpoints.

public static IEndpointConventionBuilder MapAgentPrism(this IEndpointRouteBuilder endpoints, string prefix = "/agentprism", Action<AgentPrismEndpointOptions>? configure = null)

endpoints IEndpointRouteBuilder

The application’s routing builder.

prefix string

Path prefix. Default is /agentprism.

configure Action<AgentPrismEndpointOptions>?

Hook that mutates access and streaming settings.

IEndpointConventionBuilder

The convention builder for the protected endpoints. Every convention added only applies to the protected endpoints.

Endpoints fall into two groups. {prefix}/api/meta is reachable without authentication; it is needed for the UI to learn which authentication method to use and returns no sensitive data. Every other endpoint passes through the three-layer protection.

The returned builder represents only the protected group. This is deliberate: if the meta endpoint were also locked when the caller writes MapAgentPrism(...).RequireAuthorization, the UI could never learn the authentication method and could never open a session.

app.MapAgentPrism("/agentprism", options =>
{
options.RequireAuthorization("AgentPrismAdmin");
});

ArgumentNullException

endpoints is null.

ArgumentException

prefix is empty.

InvalidOperationException

AddAgentPrism has not been called.