Class DefaultAgenticScope
java.lang.Object
dev.langchain4j.agentic.scope.DefaultAgenticScope
- All Implemented Interfaces:
AgenticScope
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enum -
Method Summary
Modifier and TypeMethodDescriptionagentInvocations(String agentName) context()contextAsConversation(Object... agents) contextAsConversation(String... agentNames) <T> TgetOrCreateAgent(String agentId, Function<DefaultAgenticScope, T> agentFactory) handleError(String agentName, AgentInvocationException exception) booleanmemoryId()<T> TvoidregisterAgentCall(AgentSpecification agentSpec, Object agent, AgentInvocationArguments input, Object output) voidrootCallEnded(AgenticScopeRegistry registry) voidrootCallStarted(AgenticScopeRegistry registry) state()toString()withErrorHandler(Function<ErrorContext, ErrorRecoveryResult> errorHandler) voidwriteState(String key, Object value) voidwriteStates(Map<String, Object> newState)
-
Method Details
-
memoryId
- Specified by:
memoryIdin interfaceAgenticScope
-
writeState
- Specified by:
writeStatein interfaceAgenticScope
-
writeStates
- Specified by:
writeStatesin interfaceAgenticScope
-
hasState
- Specified by:
hasStatein interfaceAgenticScope
-
readState
- Specified by:
readStatein interfaceAgenticScope
-
readState
- Specified by:
readStatein interfaceAgenticScope
-
state
- Specified by:
statein interfaceAgenticScope
-
getOrCreateAgent
-
registerAgentCall
public void registerAgentCall(AgentSpecification agentSpec, Object agent, AgentInvocationArguments input, Object output) -
rootCallStarted
-
rootCallEnded
-
context
-
contextAsConversation
- Specified by:
contextAsConversationin interfaceAgenticScope
-
contextAsConversation
- Specified by:
contextAsConversationin interfaceAgenticScope
-
agentInvocations
- Specified by:
agentInvocationsin interfaceAgenticScope
-
toString
-
withErrorHandler
public DefaultAgenticScope withErrorHandler(Function<ErrorContext, ErrorRecoveryResult> errorHandler) -
handleError
-