Class BetaManagedAgentsMemory
-
- All Implemented Interfaces:
public final class BetaManagedAgentsMemoryA text document at a path inside a memory store.
contentisnullwhen the response usesview=basic.content_size_bytesandcontent_sha256are 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaManagedAgentsMemory.BuilderA builder for BetaManagedAgentsMemory.
-
Method Summary
Modifier and Type Method Description final Stringid()The unique ID of the memory ( mem_...).final StringcontentSha256()Lowercase hex SHA-256 digest of the UTF-8 contentbytes (64 characters).final IntegercontentSizeBytes()The size of the memory's contentin UTF-8 bytes.final OffsetDateTimecreatedAt()When this memory was created, in RFC 3339 format. final StringmemoryStoreId()ID of the memory store this memory belongs to (a memstore_...value).final StringmemoryVersionId()The ID of the memory version that holds the memory's current content ( memver_...).final Stringpath()Hierarchical path of the memory within the store, e.g. final OffsetDateTimeupdatedAt()When the memory was last changed, in RFC 3339. final Optional<String>content()The memory's UTF-8 text content, or nullwhen the response usesview=basic.final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("memory")final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_contentSha256()Returns the raw JSON value of contentSha256. final JsonField<Integer>_contentSizeBytes()Returns the raw JSON value of contentSizeBytes. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<String>_memoryStoreId()Returns the raw JSON value of memoryStoreId. final JsonField<String>_memoryVersionId()Returns the raw JSON value of memoryVersionId. final JsonField<String>_path()Returns the raw JSON value of path. final JsonField<OffsetDateTime>_updatedAt()Returns the raw JSON value of updatedAt. final JsonField<String>_content()Returns the raw JSON value of content. final Map<String, JsonValue>_additionalProperties()final BetaManagedAgentsMemory.BuildertoBuilder()final BetaManagedAgentsMemoryvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsMemory.Builderbuilder()Returns a mutable builder for constructing an instance of BetaManagedAgentsMemory. -
-
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
contentbytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for acontent_sha256precondition on update. Always populated, regardless ofview.
-
contentSizeBytes
final Integer contentSizeBytes()
The size of the memory's
contentin UTF-8 bytes. It is set regardless ofview.
-
createdAt
final OffsetDateTime createdAt()
When this memory was created, in RFC 3339 format.
-
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_byon the memory version thatmemory_version_idreferences.
-
content
final Optional<String> content()
The memory's UTF-8 text content, or
nullwhen the response usesview=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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaManagedAgentsMemory.Builder toBuilder()
-
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.
-
builder
final static BetaManagedAgentsMemory.Builder builder()
Returns a mutable builder for constructing an instance of BetaManagedAgentsMemory.
The following fields are required:
.id() .contentSha256() .contentSizeBytes() .createdAt() .memoryStoreId() .memoryVersionId() .path() .updatedAt()
-
-
-
-