Class AiMemoryEntry

java.lang.Object
org.netxms.client.ai.AiMemoryEntry

public class AiMemoryEntry extends Object
AI memory entry: fact about the monitored environment, note about a user, or note about an object that persists across AI assistant chats, AI tasks, and AI operator iterations.
  • Field Details

    • SOURCE_CHAT

      public static final char SOURCE_CHAT
      Source type of entries written by the model from an interactive chat, chat bot session, or one-shot request
      See Also:
    • SOURCE_TASK

      public static final char SOURCE_TASK
      Source type of entries written by the model during AI task execution
      See Also:
    • SOURCE_OPERATOR

      public static final char SOURCE_OPERATOR
      Source type of entries written by the model during AI operator iteration
      See Also:
    • SOURCE_HUMAN

      public static final char SOURCE_HUMAN
      Source type of entries written by a user through the client or web API
      See Also:
  • Constructor Details

    • AiMemoryEntry

      public AiMemoryEntry(AiMemoryScope scope, int scopeId, String title, String content)
      Create new memory entry definition (for subsequent creation on server).
      Parameters:
      scope - entry scope
      scopeId - scope ID (user ID for user scope, object ID for object scope, 0 for environment scope)
      title - entry title (unique within scope)
      content - entry content
    • AiMemoryEntry

      public AiMemoryEntry(AiMemoryEntry src)
      Create copy of memory entry (for editing without changing the original).
      Parameters:
      src - source entry
    • AiMemoryEntry

      public AiMemoryEntry(NXCPMessage msg, long baseId)
      Create memory entry object from NXCP message.
      Parameters:
      msg - NXCP message
      baseId - base ID for fields
  • Method Details

    • fillMessage

      public void fillMessage(NXCPMessage msg)
      Fill NXCP message with entry data for create/modify request.
      Parameters:
      msg - NXCP message
    • getId

      public int getId()
      Returns:
      entry ID (0 for entries not yet created on server)
    • getScope

      public AiMemoryScope getScope()
      Returns:
      entry scope
    • getScopeId

      public int getScopeId()
      Returns:
      scope ID (user ID for user scope, object ID for object scope, 0 for environment scope)
    • getTitle

      public String getTitle()
      Returns:
      entry title
    • setTitle

      public void setTitle(String title)
      Parameters:
      title - new entry title
    • getContent

      public String getContent()
      Returns:
      entry content
    • setContent

      public void setContent(String content)
      Parameters:
      content - new entry content
    • isCreatedByModel

      public boolean isCreatedByModel()
      Returns:
      true if entry was created by the model, false if created by a user
    • getSourceUserId

      public int getSourceUserId()
      Returns:
      ID of the user on whose behalf the entry was created
    • getSourceType

      public char getSourceType()
      Returns:
      source type (one of SOURCE_* constants)
    • getSourceId

      public int getSourceId()
      Returns:
      source ID (chat ID, AI task ID, or AI operator instance ID depending on source type; 0 for human source)
    • getCreationTime

      public Date getCreationTime()
      Returns:
      creation time
    • getModificationTime

      public Date getModificationTime()
      Returns:
      last modification time
    • isLocked

      public boolean isLocked()
      Returns:
      true if entry is locked (cannot be changed or deleted by the model)
    • setLocked

      public void setLocked(boolean locked)
      Parameters:
      locked - true to lock entry