Class BetaManagedAgentsMemory

  • All Implemented Interfaces:

    
    public final class BetaManagedAgentsMemory
    
                        

    A text document at a path inside a memory store.

    content is null when the response uses view=basic. content_size_bytes and content_sha256 are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.

    See the memory guide to learn more about working with memories.

    • Constructor Detail

    • Method Detail

      • id

         final String id()

        The unique ID of the memory (mem_...). It stays the same when the memory's path changes.

        To retrieve, update, or delete the memory, pass this ID.

      • contentSha256

         final String contentSha256()

        Lowercase hex SHA-256 digest of the UTF-8 content bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a content_sha256 precondition on update. Always populated, regardless of view.

      • contentSizeBytes

         final Integer contentSizeBytes()

        The size of the memory's content in UTF-8 bytes. It is set regardless of view.

      • memoryStoreId

         final String memoryStoreId()

        ID of the memory store this memory belongs to (a memstore_... value).

      • memoryVersionId

         final String memoryVersionId()

        The ID of the memory version that holds the memory's current content (memver_...).

        Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.

        See the memory guide to learn more about memory versions.

      • path

         final String path()

        Hierarchical path of the memory within the store, e.g. /projects/foo/notes.md. Always starts with /. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.

      • updatedAt

         final OffsetDateTime updatedAt()

        When the memory was last changed, in RFC 3339.

        To find out who made the change, look at created_by on the memory version that memory_version_id references.

      • content

         final Optional<String> content()

        The memory's UTF-8 text content, or null when the response uses view=basic.

        The maximum size is 100 kB (102,400 bytes).

      • _type

         final JsonValue _type()

        Expected to always return the following:

        JsonValue.from("memory")

        However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).

      • _id

         final JsonField<String> _id()

        Returns the raw JSON value of id.

        Unlike id, this method doesn't throw if the JSON field has an unexpected type.

      • _contentSha256

         final JsonField<String> _contentSha256()

        Returns the raw JSON value of contentSha256.

        Unlike contentSha256, this method doesn't throw if the JSON field has an unexpected type.

      • _contentSizeBytes

         final JsonField<Integer> _contentSizeBytes()

        Returns the raw JSON value of contentSizeBytes.

        Unlike contentSizeBytes, this method doesn't throw if the JSON field has an unexpected type.

      • _createdAt

         final JsonField<OffsetDateTime> _createdAt()

        Returns the raw JSON value of createdAt.

        Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.

      • _memoryStoreId

         final JsonField<String> _memoryStoreId()

        Returns the raw JSON value of memoryStoreId.

        Unlike memoryStoreId, this method doesn't throw if the JSON field has an unexpected type.

      • _memoryVersionId

         final JsonField<String> _memoryVersionId()

        Returns the raw JSON value of memoryVersionId.

        Unlike memoryVersionId, this method doesn't throw if the JSON field has an unexpected type.

      • _path

         final JsonField<String> _path()

        Returns the raw JSON value of path.

        Unlike path, this method doesn't throw if the JSON field has an unexpected type.

      • _updatedAt

         final JsonField<OffsetDateTime> _updatedAt()

        Returns the raw JSON value of updatedAt.

        Unlike updatedAt, this method doesn't throw if the JSON field has an unexpected type.

      • _content

         final JsonField<String> _content()

        Returns the raw JSON value of content.

        Unlike content, this method doesn't throw if the JSON field has an unexpected type.

      • validate

         final BetaManagedAgentsMemory validate()

        Validates that the types of all values in this object match their expected types recursively.

        This method is not forwards compatible with new types from the API for existing fields.