Skip to content

MemorySearchSummary

Source code in docs_src/capo_opensearchmemory/types/memory_search_summary.py
class MemorySearchSummary(TypedDict, closed=True):
    memory_id: "capo_opensearchmemory.types.memory_id.MemoryId"
    """<p>The memory's ID, assigned by the service. Always present.</p>"""
    memory_type: NotRequired["capo_opensearchmemory.types.memory_type.MemoryType"]
    """<p>The memory type of the result.</p>"""
    strategy_name: NotRequired["capo_opensearchmemory.types.strategy_name.StrategyName"]
    """<p>The name of the strategy the memory belongs to, for example <code>user-facts</code>: the strategy <code>memoryStrategies</code> selects on in <code>SearchMemories</code>. Absent when the memory's strategy is no longer declared on the space, for example right after the strategy is deleted.</p>"""
    content: NotRequired[
        "capo_opensearchmemory.types.sensitive_content.SensitiveContent"
    ]
    """<p>The memory text.</p>"""
    score: NotRequired["float"]
    """<p>The relevance score of the result. A higher score is more relevant. Scores aren't normalized to a fixed range and can be greater than 1, so use them only to order results.</p>"""
    system_metadata: NotRequired[
        "capo_opensearchmemory.types.system_metadata.SystemMetadata"
    ]
    """<p>Provenance for the memory: the actor and session that own it, and when it was created and last updated. It is the same block that <code>ListMemories</code>, <code>GetMemory</code>, and <code>SearchEvents</code> return.</p> <p>In a query, filter or sort on the timestamps as <code>system_metadata.created_at</code> and <code>system_metadata.updated_at</code>. Scope by owner with the top-level <code>actorId</code>, not in the query. Searching memories doesn't filter by session.</p> <p>Absent when the service has no provenance for the memory.</p>"""
    metadata: NotRequired["capo_opensearchmemory.types.metadata_map.MetadataMap"]
    """<p>The memory's metadata tags. All values are strings. In a query, filter on a tag as <code>metadata.&lt;key&gt;</code>.</p>"""
    source_event_ids: NotRequired[
        "capo_opensearchmemory.types.source_event_id_list.SourceEventIdList"
    ]
    """<p>The IDs of the events the memory was derived from, without duplicates. Use them with <code>GetEvent</code> or <code>BatchGetEvent</code>, or to search those events' content with <code>SearchEvents</code> by filtering on <code>event_ids</code> in the query. Absent for a memory created directly with <code>CreateMemory</code>. A memory can be derived from several events. The service sets this value.</p>"""

content instance-attribute

content: NotRequired[SensitiveContent]

The memory text.

memory_id instance-attribute

memory_id: MemoryId

The memory's ID, assigned by the service. Always present.

memory_type instance-attribute

memory_type: NotRequired[MemoryType]

The memory type of the result.

metadata instance-attribute

metadata: NotRequired[MetadataMap]

The memory's metadata tags. All values are strings. In a query, filter on a tag as metadata.<key>.

score instance-attribute

score: NotRequired[float]

The relevance score of the result. A higher score is more relevant. Scores aren't normalized to a fixed range and can be greater than 1, so use them only to order results.

source_event_ids instance-attribute

source_event_ids: NotRequired[SourceEventIdList]

The IDs of the events the memory was derived from, without duplicates. Use them with GetEvent or BatchGetEvent, or to search those events' content with SearchEvents by filtering on event_ids in the query. Absent for a memory created directly with CreateMemory. A memory can be derived from several events. The service sets this value.

strategy_name instance-attribute

strategy_name: NotRequired[StrategyName]

The name of the strategy the memory belongs to, for example user-facts: the strategy memoryStrategies selects on in SearchMemories. Absent when the memory's strategy is no longer declared on the space, for example right after the strategy is deleted.

system_metadata instance-attribute

system_metadata: NotRequired[SystemMetadata]

Provenance for the memory: the actor and session that own it, and when it was created and last updated. It is the same block that ListMemories, GetMemory, and SearchEvents return.

In a query, filter or sort on the timestamps as system_metadata.created_at and system_metadata.updated_at. Scope by owner with the top-level actorId, not in the query. Searching memories doesn't filter by session.

Absent when the service has no provenance for the memory.