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

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

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 persist after the memory 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.

Parameters:



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

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)


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

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)


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

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)


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

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.



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

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 full lineage including the deleted row.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :memory_id, String

#memory_store_idString

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

Parameters:

  • value (String)

Returns:

  • (String)


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

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:



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

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)


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

optional :path, String, nil?: true

#redacted_atTime?

A timestamp in RFC 3339 format

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

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.



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

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

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

Parameters:

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

Returns:



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

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: -> {