CodeAgentRegistration
AgentPrism.Core.dllA code-defined agent registration. Use one of two forms: declarative CodeAgentRegistration.Definition or CodeAgentRegistration.Factory, which gives full control.
public sealed class CodeAgentRegistrationInheritance
Section titled “Inheritance”object ← CodeAgentRegistration
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
Section titled “Properties”Definition
Section titled “ Definition”The declarative definition, or null when CodeAgentRegistration.Factory is used.
public AgentDefinition? Definition { get; }Property Value
Section titled “Property Value”Description
Section titled “ Description”A short description.
public string? Description { get; }Property Value
Section titled “Property Value”DisplayName
Section titled “ DisplayName”The name displayed in the UI.
public string? DisplayName { get; }Property Value
Section titled “Property Value”Factory
Section titled “ Factory”The factory that creates the agent, or null when CodeAgentRegistration.Definition is used.
public Func<IServiceProvider, AIAgent>? Factory { get; }Property Value
Section titled “Property Value”Func<IServiceProvider, AIAgent>?
The agent name.
public string Name { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromDefinition(AgentDefinition)
Section titled “ FromDefinition(AgentDefinition)”Creates a declarative registration. The definition passes through the AgentPrism compiler, which validates tools and the model.
public static CodeAgentRegistration FromDefinition(AgentDefinition definition)Parameters
Section titled “Parameters”definition AgentDefinition
The agent definition.
Returns
Section titled “Returns”The registration.
Exceptions
Section titled “Exceptions”definition is null.
FromFactory(string, Func<IServiceProvider, AIAgent>, string?, string?)
Section titled “ FromFactory(string, Func<IServiceProvider, AIAgent>, string?, string?)”Creates a factory-based registration. The caller fully controls how the agent is built. AgentPrism only exposes it in the catalog and wraps it with run recording.
public static CodeAgentRegistration FromFactory(string name, Func<IServiceProvider, AIAgent> factory, string? description = null, string? displayName = null)Parameters
Section titled “Parameters”name string
The agent name.
factory Func<IServiceProvider, AIAgent>
The factory that creates the agent.
description string?
A short description.
displayName string?
The name displayed in the UI.
Returns
Section titled “Returns”The registration.
Exceptions
Section titled “Exceptions”name is empty.
factory is null.