AgentDefinitionValidator
AgentPrism.Core.dllValidates an AgentDefinition without saving it or calling a model.
public sealed class AgentDefinitionValidatorInheritance
Section titled “Inheritance”object ← AgentDefinitionValidator
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Validation is valuable only when it does what the real compilation path, AgentDefinitionCompiler, would do. Because the compiler throws on its first error, this type runs every check independently and in order, gathers all findings, then calls AgentDefinitionCompiler.Compile last to find remaining structural errors, such as reasoning effort or compaction settings.
The compiled AI.AIAgent is discarded. No
runs row is opened and no token is spent.
Constructors
Section titled “Constructors”AgentDefinitionValidator(IModelProviderRegistry, IToolRegistry, AgentSkillCatalog, IAgentCatalog, AgentDefinitionCompiler, IOptions<AgentPrismOptions>, IMcpToolRefresher?)
Section titled “ AgentDefinitionValidator(IModelProviderRegistry, IToolRegistry, AgentSkillCatalog, IAgentCatalog, AgentDefinitionCompiler, IOptions<AgentPrismOptions>, IMcpToolRefresher?)”Initializes an agent-definition validator.
public AgentDefinitionValidator(IModelProviderRegistry models, IToolRegistry tools, AgentSkillCatalog skills, IAgentCatalog catalog, AgentDefinitionCompiler compiler, IOptions<AgentPrismOptions> options, IMcpToolRefresher? mcpRefresher = null)Parameters
Section titled “Parameters”models IModelProviderRegistry
The model provider registry.
tools IToolRegistry
The tool registry.
skills AgentSkillCatalog
The skill catalog.
catalog IAgentCatalog
The agent catalog used to validate the call graph.
compiler AgentDefinitionCompiler
The actual compiler run when independent validation passes.
options IOptions<AgentPrismOptions>
The options that provide AgentPrismValidationOptions.McpTimeout.
mcpRefresher IMcpToolRefresher?
When registered, refreshes the MCP tool list after a missing tool name is
found. When null, AgentPrism.Mcp is not registered
and missing tool names are reported directly as errors.
Exceptions
Section titled “Exceptions”A required dependency is null.
Methods
Section titled “Methods”ValidateAsync(AgentDefinition, CancellationToken)
Section titled “ ValidateAsync(AgentDefinition, CancellationToken)”Validates a definition without saving it or calling a model.
public ValueTask<AgentValidationReport> ValidateAsync(AgentDefinition definition, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”definition AgentDefinition
The definition to validate.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<AgentValidationReport>
The report containing all findings.
Exceptions
Section titled “Exceptions”definition is null.