Class MemoryEntry.Builder

java.lang.Object
com.google.adk.memory.MemoryEntry.Builder
Enclosing class:
MemoryEntry

public abstract static class MemoryEntry.Builder extends Object
Builder for MemoryEntry.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • content

      public abstract MemoryEntry.Builder content(com.google.genai.types.Content content)
      Sets the main content of the memory.

      This is a required field.

    • author

      public abstract MemoryEntry.Builder author(@Nullable String author)
      Sets the author of the memory.
    • timestamp

      public abstract MemoryEntry.Builder timestamp(@Nullable String timestamp)
      Sets the timestamp when the original content of this memory happened.
    • timestamp

      public MemoryEntry.Builder timestamp(Instant instant)
      A convenience method to set the timestamp from an Instant object, formatted as an ISO 8601 string.
      Parameters:
      instant - The timestamp as an Instant object.
    • build

      public abstract MemoryEntry build()
      Builds the immutable MemoryEntry object.