Class: Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryVersion

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb,
sig/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::MemoryStores::MemoryVersions#retrieve

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, memory_id:, memory_store_id:, operation:, type:, content: nil, content_sha256: nil, content_size_bytes: nil, created_by: nil, path: nil, redacted_at: nil, redacted_by: nil) ⇒ Object

A memory_version object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and are not deleted with the memory; each version is retained for at least the version retention period after it was written, unless the store itself is deleted. Retrieving a redacted version returns 200 with content, path, content_size_bytes, and content_sha256 set to null; branch on redacted_at, not HTTP status.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryVersion for more details.

Parameters:



# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 104

Instance Attribute Details

#contentString?

The memory's UTF-8 text content as of this version. null when view=basic, when operation is deleted, or when redacted_at is set.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


54
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 54

optional :content, String, nil?: true

#content_sha256String?

Lowercase hex SHA-256 digest of content as of this version (64 characters). null when redacted_at is set or operation is deleted. Populated regardless of view otherwise.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


62
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 62

optional :content_sha256, String, nil?: true

#content_size_bytesInteger?

Size of content in bytes as of this version. null when redacted_at is set or operation is deleted. Populated regardless of view otherwise.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


69
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 69

optional :content_size_bytes, Integer, nil?: true

#created_atTime

A timestamp in RFC 3339 format

Parameters:

  • value (Time)

Returns:

  • (Time)


19
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 19

required :created_at, Time

#created_byAnthropic::Models::Beta::MemoryStores::BetaManagedAgentsSessionActor, ...

Identifies who performed a write or redact operation. Captured at write time on the memory_version row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.



79
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 79

optional :created_by, union: -> { Anthropic::Beta::MemoryStores::BetaManagedAgentsActor }

#idString

Unique identifier for this version (a memver_... value).

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 13

required :id, String

#memory_idString

ID of the memory this version snapshots (a mem_... value). Remains valid after the memory is deleted; pass it as memory_id to List memory versions to retrieve the memory's retained versions, including the deleted row while the lineage is retained.

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 29

required :memory_id, String

#memory_store_idString

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

Parameters:

  • value (String)

Returns:

  • (String)


35
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 35

required :memory_store_id, String

#operationSymbol, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryVersionOperation

The kind of mutation a memory_version records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.

Parameters:

  • value (Anthropic::Models::Beta::MemoryStores::beta_managed_agents_memory_version_operation)

Returns:



42
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 42

required :operation, enum: -> { Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryVersionOperation }

#pathString?

The memory's path at the time of this write. null if and only if redacted_at is set.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


86
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 86

optional :path, String, nil?: true

#redacted_atTime?

A timestamp in RFC 3339 format

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


92
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 92

optional :redacted_at, Time, nil?: true

#redacted_byAnthropic::Models::Beta::MemoryStores::BetaManagedAgentsSessionActor, ...

Identifies who performed a write or redact operation. Captured at write time on the memory_version row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.



102
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 102

optional :redacted_by, union: -> { Anthropic::Beta::MemoryStores::BetaManagedAgentsActor }

#typeSymbol, Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryVersion::Type

Parameters:

  • value (Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryVersion::type_)

Returns:



47
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rb', line 47

required :type, enum: -> { Anthropic::Beta::MemoryStores::BetaManagedAgentsMemoryVersion::Type }

Instance Method Details

#to_hash{

Returns:

  • ({)


73
# File 'sig/anthropic/models/beta/memory_stores/beta_managed_agents_memory_version.rbs', line 73

def to_hash: -> {