Skip to content

MemoryStrategy

Structure Class

MemoryStrategy dataclass

Bases: _SerdeShape

Contains information about a memory strategy.

Attributes

configuration class-attribute instance-attribute
configuration: StrategyConfiguration | None = ...

The configuration of the memory strategy.

created_at class-attribute instance-attribute
created_at: datetime | None = ...

The timestamp when the memory strategy was created.

description class-attribute instance-attribute
description: str | None = ...

The description of the memory strategy.

memory_record_schema class-attribute instance-attribute
memory_record_schema: MemoryRecordSchema | None = ...

Schema for metadata fields on records generated by this strategy.

name instance-attribute
name: str

The name of the memory strategy.

namespace_templates instance-attribute
namespace_templates: list[str]

The namespaceTemplates associated with the memory strategy.

namespaces instance-attribute
namespaces: list[str]

This is a legacy parameter. The namespaces associated with the memory strategy.

record_expiry_duration_days class-attribute instance-attribute
record_expiry_duration_days: int | None = ...

The effective record expiry (long-term memory time-to-live), in days, for memory records generated by this strategy. New records expire this many days after they are created. If not set, records generated by this strategy do not expire.

status class-attribute instance-attribute
status: str | None = ...

The current status of the memory strategy.

strategy_id instance-attribute
strategy_id: str

The unique identifier of the memory strategy.

type instance-attribute
type: str

The type of the memory strategy.

updated_at class-attribute instance-attribute
updated_at: datetime | None = ...

The timestamp when the memory strategy was last updated.