Package dev.langchain4j.agentic.scope
Interface AgenticScope
- All Known Implementing Classes:
DefaultAgenticScope
public interface AgenticScope
The AgenticScope class represents a common environment where agents belonging to the same
agentic system can share their state.
It maintains the state of the computation, tracks agent invocations, and provides
methods to allow agents to interact with the shared state.
Agents can register their calls, and the context of interactions is stored for later retrieval. The class also provides methods to read and write state, manage agent invocations, and retrieve the context as a conversation.
-
Method Summary
Modifier and TypeMethodDescriptioncontextAsConversation
(String... agentNames) boolean
memoryId()
<T> T
state()
void
writeState
(String key, Object value) void
writeStates
(Map<String, Object> newState)
-
Method Details
-
memoryId
Object memoryId() -
writeState
-
writeStates
-
hasState
-
readState
-
readState
-
state
-
contextAsConversation
-