Interface AgenticScopeAccess

All Known Subinterfaces:
P2PAgent, SupervisorAgent, UntypedAgent

public interface AgenticScopeAccess
Allow to access the AgenticScope of any agent extending it.
  • Method Details

    • getAgenticScope

      AgenticScope getAgenticScope(Object memoryId)
      Returns the AgenticScope with the given id for this AI service or null if such memory doesn't exist.
      Parameters:
      memoryId - The id of the AgenticScope.
      Returns:
      The AgenticScope with the given memoryId or null if such memory doesn't exist.
    • evictAgenticScope

      boolean evictAgenticScope(Object memoryId)
      Evicts the AgenticScope with the given id, together with the chat memories that the agents of this agentic system hold for that id, with the meaning of ChatMemoryAccess.evictChatMemory(Object): the chat memory objects are forgotten, the messages they stored stay in their ChatMemoryStore. Use deleteAgenticScope(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 the AgenticScope to be evicted.
      Returns:
      true if AgenticScope with the given id existed, and it was successfully evicted, false otherwise.
    • deleteAgenticScope

      boolean deleteAgenticScope(Object memoryId)
      Evicts the AgenticScope with the given id like evictAgenticScope(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 its ChatMemoryStore, 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 the AgenticScope to be deleted.
      Returns:
      true if AgenticScope with the given id existed, and it was successfully evicted, false otherwise.