Interface AgentStateFactory<State extends AgentState>

Type Parameters:
State - the type of the agent state
All Superinterfaces:
Function<Map<String,Object>,State>

public interface AgentStateFactory<State extends AgentState> extends Function<Map<String,Object>,State>
A factory interface for creating instances of AgentState.
  • Method Details

    • initialDataFromSchema

      default Map<String,Object> initialDataFromSchema(Map<String,Channel<?>> schema)
    • applyFromSchema

      default State applyFromSchema(Map<String,Channel<?>> schema)
      Initializes this state from the given schema. This method processes the provided schema map to extract default values for each channel that has a defined default value.
      Parameters:
      schema - the schema map containing channel definitions
      Returns:
      the initialized state with default values applied