Class Mem0SearchResult

java.lang.Object
io.agentscope.core.memory.mem0.Mem0SearchResult

public class Mem0SearchResult extends Object
Represents a single memory search result from Mem0 v2 API.

Each search result contains:

  • The memory text content
  • Unique identifier for the memory
  • User identifier
  • Metadata associated with the memory
  • Categories for classification
  • Immutability flag
  • Optional expiration date
  • Creation and update timestamps

Results are typically ordered by relevance.

  • Constructor Details

    • Mem0SearchResult

      public Mem0SearchResult()
      Default constructor for Jackson.
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getMemory

      public String getMemory()
    • setMemory

      public void setMemory(String memory)
    • getUserId

      public String getUserId()
    • setUserId

      public void setUserId(String userId)
    • getMetadata

      public Map<String,Object> getMetadata()
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
    • getCategories

      public List<String> getCategories()
    • setCategories

      public void setCategories(List<String> categories)
    • getImmutable

      public Boolean getImmutable()
    • setImmutable

      public void setImmutable(Boolean immutable)
    • getExpirationDate

      public OffsetDateTime getExpirationDate()
    • setExpirationDate

      public void setExpirationDate(OffsetDateTime expirationDate)
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
    • setCreatedAt

      public void setCreatedAt(OffsetDateTime createdAt)
    • getUpdatedAt

      public OffsetDateTime getUpdatedAt()
    • setUpdatedAt

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • getScore

      public Double getScore()
      Gets the relevance score.
      Returns:
      The relevance score
    • setScore

      public void setScore(Double score)
      Sets the relevance score.
      Parameters:
      score - The relevance score
    • getStructuredAttributes

      public Map<String,Object> getStructuredAttributes()
      Gets the structured temporal attributes.
      Returns:
      The structured attributes map
    • setStructuredAttributes

      public void setStructuredAttributes(Map<String,Object> structuredAttributes)
      Sets the structured temporal attributes.
      Parameters:
      structuredAttributes - The structured attributes map
    • toString

      public String toString()
      Overrides:
      toString in class Object