Package com.embabel.agent.validation
Class AgentStructureValidator
-
- All Implemented Interfaces:
-
com.embabel.agent.validation.AgentValidator,org.springframework.beans.factory.InitializingBean
@Component() public final class AgentStructureValidator implements InitializingBean, AgentValidator
Validator that checks the fundamental structure of agent definitions.
Ensures that each agent has at least one goal, action, or condition defined, and validates that action and condition method signatures are correct and conform to expected patterns.
Specific checks include:
Detecting empty agents (no actions, conditions, or goals)
Enforcing that agents have at least one goal
Verifying that action and condition methods have valid parameter signatures
Reports detailed validation errors for structural issues, helping ensure that only well-formed agents are registered or used in the system.
-
-
Field Summary
Fields Modifier and Type Field Description private final ApplicationContextcontext
-
Constructor Summary
Constructors Constructor Description AgentStructureValidator(ApplicationContext context)
-
Method Summary
Modifier and Type Method Description final ApplicationContextgetContext()UnitafterPropertiesSet()ValidationResultvalidate(AgentScope agentScope)-
-
Method Detail
-
getContext
final ApplicationContext getContext()
-
afterPropertiesSet
Unit afterPropertiesSet()
-
validate
ValidationResult validate(AgentScope agentScope)
-
-
-
-