Skip to content

SearchCriteria

Structure Class

SearchCriteria dataclass

Bases: _SerdeShape

Contains search criteria for retrieving memory records.

Attributes

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

The memory strategy identifier to filter memory records by.

metadata_filters class-attribute instance-attribute
metadata_filters: list[MemoryMetadataFilterExpression] | None = ...

Filters to apply to metadata associated with a memory.

search_query instance-attribute
search_query: str

The search query to use for finding relevant memory records.

top_k class-attribute instance-attribute
top_k: int = ...

The maximum number of top-scoring memory records to return. This value is used for semantic search ranking.