Package org.bsc.spring.agentexecutor
Class AgentExecutor.State
java.lang.Object
org.bsc.langgraph4j.state.AgentState
org.bsc.spring.agentexecutor.AgentExecutor.State
- Enclosing class:
- AgentExecutor
Represents the state of an agent in a system.
This class extends
AgentState
and defines constants for keys related to input, agent outcome,
and intermediate steps. It includes a static map schema that specifies how these keys should be handled.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the outcome for the agent.input()
Retrieves input from the user with a specified key.Retrieves the list of intermediate steps.Methods inherited from class org.bsc.langgraph4j.state.AgentState
appendableValue, data, mergeWith, toString, updateState, updateState, value, value, value
-
Field Details
-
INPUT
- See Also:
-
AGENT_OUTCOME
- See Also:
-
INTERMEDIATE_STEPS
- See Also:
-
-
Constructor Details
-
State
Constructs a new State object using the initial data provided in the initData map.- Parameters:
initData
- the map containing the initial settings for this state
-
-
Method Details
-
input
Retrieves input from the user with a specified key.- Returns:
- An Optional containing the input value if found; an empty Optional otherwise.
-
agentOutcome
Returns the outcome for the agent.- Returns:
- an
Optional
containing the agent's outcome, or an empty Optional if not available.
-
intermediateSteps
Retrieves the list of intermediate steps. This method returns aList
ofStep
objects that represent the intermediate steps. If no such list is available, it creates and returns a new empty list.- Returns:
- a non-null list of intermediate steps
-