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 record
static enum
-
Method Summary
Modifier and TypeMethodDescriptionagentInvocations
(String agentName) context()
contextAsConversation
(String... agentNames) <T> T
getOrCreateAgent
(String agentId, Function<DefaultAgenticScope, T> agentFactory) handleError
(String agentName, AgentInvocationException exception) boolean
memoryId()
<T> T
void
registerAgentCall
(String agentName, Object agent, Object[] input, Object output) void
rootCallEnded
(AgenticScopeRegistry registry) void
rootCallStarted
(AgenticScopeRegistry registry) state()
toString()
withErrorHandler
(Function<ErrorContext, ErrorRecoveryResult> errorHandler) void
writeState
(String key, Object value) void
writeStates
(Map<String, Object> newState)
-
Method Details
-
memoryId
- Specified by:
memoryId
in interfaceAgenticScope
-
writeState
- Specified by:
writeState
in interfaceAgenticScope
-
writeStates
- Specified by:
writeStates
in interfaceAgenticScope
-
hasState
- Specified by:
hasState
in interfaceAgenticScope
-
readState
- Specified by:
readState
in interfaceAgenticScope
-
readState
- Specified by:
readState
in interfaceAgenticScope
-
state
- Specified by:
state
in interfaceAgenticScope
-
getOrCreateAgent
-
registerAgentCall
-
rootCallStarted
-
rootCallEnded
-
context
-
contextAsConversation
- Specified by:
contextAsConversation
in interfaceAgenticScope
-
agentInvocations
-
toString
-
withErrorHandler
public DefaultAgenticScope withErrorHandler(Function<ErrorContext, ErrorRecoveryResult> errorHandler) -
handleError
-