Package dev.langchain4j.agentic.scope
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(String... agentNames) <T> TgetOrCreateAgent(String agentId, Function<DefaultAgenticScope, T> agentFactory) handleError(String agentName, AgentInvocationException exception) booleanmemoryId()<T> TvoidregisterAgentCall(String agentName, Object agent, Object[] 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
-
rootCallStarted
-
rootCallEnded
-
context
-
contextAsConversation
- Specified by:
contextAsConversationin interfaceAgenticScope
-
agentInvocations
-
toString
-
withErrorHandler
public DefaultAgenticScope withErrorHandler(Function<ErrorContext, ErrorRecoveryResult> errorHandler) -
handleError
-