Interface Planner
- All Known Implementing Classes:
ConditionalPlanner, GoalOrientedPlanner, LoopPlanner, P2PPlanner, ParallelMapperPlanner, ParallelPlanner, SequentialPlanner, SupervisorPlanner
public interface Planner
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends AgentInstance>
Tas(Class<T> agentInstanceClass, AgentInstance agentInstance) default Actioncall(AgentInstance... agents) default Actioncall(List<AgentInstance> agents) default Actiondone()default ActionReturns the planner's current execution state as a map of serializable values.default ActionfirstAction(PlanningContext planningContext) default voidinit(InitPlanningContext initPlanningContext) nextAction(PlanningContext planningContext) default ActionnoOp()default voidrestoreExecutionState(Map<String, Object> state) Restores the planner's execution state from a previously saved map.default booleandefault AgenticSystemTopologytopology()
-
Method Details
-
init
-
executionState
Returns the planner's current execution state as a map of serializable values. This state is persisted to theAgenticScopeafter each agent invocation, enabling the planner to resume from the correct position after a crash.The returned state must be such that, when passed to
restoreExecutionState(Map)andfirstAction(PlanningContext)is called, the planner produces the correct resume action.Stateless planners (e.g., parallel, conditional) can use the default empty implementation.
- Returns:
- a map of state entries to persist, or an empty map if no state needs saving
-
restoreExecutionState
Restores the planner's execution state from a previously saved map. Called by the execution loop beforefirstAction(PlanningContext)when recovering from a persisted scope.- Parameters:
state- the previously saved execution state
-
firstAction
-
topology
-
nextAction
-
terminated
default boolean terminated() -
noOp
-
call
-
call
-
done
-
done
-
as
-