Skip to content

AgentPrismCompilationException

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Thrown when an agent definition cannot be turned into a runnable agent.

public sealed class AgentPrismCompilationException : AgentPrismException, ISerializable

objectExceptionAgentPrismExceptionAgentPrismCompilationException

ISerializable

AgentPrismException.ErrorType, Exception.GetBaseException(), Exception.ToString(), Exception.GetType(), Exception.TargetSite, Exception.Message, Exception.Data, Exception.InnerException, Exception.HelpLink, Exception.Source, Exception.HResult, Exception.StackTrace, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The most common cause is a tool name in the definition that is not registered in code. That case is never skipped silently — an agent running with an unknown tool is an agent that does not do what the user expects.

Creates a new compilation error.

public AgentPrismCompilationException()

Creates a new compilation error.

public AgentPrismCompilationException(string message)

message string

The error message.

AgentPrismCompilationException(string, Exception)

Section titled “ AgentPrismCompilationException(string, Exception)”

Creates a new compilation error.

public AgentPrismCompilationException(string message, Exception innerException)

message string

The error message.

innerException Exception

The underlying error.

The stable value written to AgentPrismException.ErrorType.

public const string CompilationFailedErrorType = "compilation_failed"

string

Gets the name of the agent that failed to compile.

public string? AgentName { get; init; }

string?

Gets the stable error type name written to the run record.

public override string ErrorType { get; }

string

Defaults to the full name of the exception type, so today’s behaviour does not change. A derived type overrides this member when the record has to be machine readable — for example AgentPrismContentFilteredException writes content_filtered. Reports and alert rules can rely on this stable name instead of an assembly name.

The value is written to RunError.Type and carries no secret.