Interface AgenticScopeAccess
- All Known Subinterfaces:
P2PAgent, SupervisorAgent, UntypedAgent
public interface AgenticScopeAccess
Allow to access the
AgenticScope of any agent extending it.-
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteAgenticScope(Object memoryId) Evicts theAgenticScopewith the given id likeevictAgenticScope(Object), and deletes the chat memories that the agents of this agentic system hold for that id: each one is cleared, which deletes its messages from itsChatMemoryStore, and then evicted.booleanevictAgenticScope(Object memoryId) Evicts theAgenticScopewith the given id, together with the chat memories that the agents of this agentic system hold for that id, with the meaning ofChatMemoryAccess.evictChatMemory(Object): the chat memory objects are forgotten, the messages they stored stay in theirChatMemoryStore.getAgenticScope(Object memoryId) Returns theAgenticScopewith the given id for this AI service or null if such memory doesn't exist.
-
Method Details
-
getAgenticScope
Returns theAgenticScopewith the given id for this AI service or null if such memory doesn't exist.- Parameters:
memoryId- The id of theAgenticScope.- Returns:
- The
AgenticScopewith the given memoryId or null if such memory doesn't exist.
-
evictAgenticScope
Evicts theAgenticScopewith the given id, together with the chat memories that the agents of this agentic system hold for that id, with the meaning ofChatMemoryAccess.evictChatMemory(Object): the chat memory objects are forgotten, the messages they stored stay in theirChatMemoryStore. UsedeleteAgenticScope(Object)to delete the messages too. An AI agent configured with a single chat memory, shared by all the memory ids, has nothing of the scope to evict and is left alone by both methods.- Parameters:
memoryId- The id of theAgenticScopeto be evicted.- Returns:
- true if
AgenticScopewith the given id existed, and it was successfully evicted, false otherwise.
-
deleteAgenticScope
Evicts theAgenticScopewith the given id likeevictAgenticScope(Object), and deletes the chat memories that the agents of this agentic system hold for that id: each one is cleared, which deletes its messages from itsChatMemoryStore, and then evicted. The listeners are notified of the destruction of the scope before the chat memories are touched, and the scope is evicted even when the deletion of a chat memory fails: the failure is rethrown after the other chat memories have been deleted.Only the chat memories created in this JVM for that id are reached: the messages stored by another node, or before a restart, have to be deleted through their store.
- Parameters:
memoryId- The id of theAgenticScopeto be deleted.- Returns:
- true if
AgenticScopewith the given id existed, and it was successfully evicted, false otherwise.
-