BedrockAgentCore / Client / get_memory_record

get_memory_record

BedrockAgentCore.Client.get_memory_record(**kwargs)

Retrieves a specific memory record from an AgentCore Memory resource.

To use this operation, you must have the bedrock-agentcore:GetMemoryRecord permission.

See also: AWS API Documentation

Request Syntax

response = client.get_memory_record(
    memoryId='string',
    memoryRecordId='string',
    namespace='string'
)
Parameters:
  • memoryId (string) –

    [REQUIRED]

    The identifier of the AgentCore Memory resource containing the memory record.

  • memoryRecordId (string) –

    [REQUIRED]

    The identifier of the memory record to retrieve.

  • namespace (string) – The namespace of the memory record to retrieve. This value is used for IAM condition key authorization.

Return type:

dict

Returns:

Response Syntax

{
    'memoryRecord': {
        'memoryRecordId': 'string',
        'content': {
            'text': 'string'
        },
        'memoryStrategyId': 'string',
        'namespaces': [
            'string',
        ],
        'createdAt': datetime(2015, 1, 1),
        'timestamp': datetime(2015, 1, 1),
        'metadata': {
            'string': {
                'stringValue': 'string',
                'stringListValue': [
                    'string',
                ],
                'numberValue': 123.0,
                'dateTimeValue': datetime(2015, 1, 1)
            }
        },
        'expiresAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • memoryRecord (dict) –

      The requested memory record.

      • memoryRecordId (string) –

        The unique identifier of the memory record.

      • content (dict) –

        The content of the memory record.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: text. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • text (string) –

          The text content of the memory record.

      • memoryStrategyId (string) –

        The identifier of the memory strategy associated with this record.

      • namespaces (list) –

        The namespaces associated with this memory record. Namespaces help organize and categorize memory records.

        • (string) –

      • createdAt (datetime) –

        The timestamp when the memory record was created.

      • timestamp (datetime) –

        The timestamp based on which the memory record was ingested. This reflects the time of the source content that the record was derived from, which can differ from createdAt, the time the record itself was written.

      • metadata (dict) –

        A map of metadata key-value pairs associated with a memory record.

        • (string) –

          • (dict) –

            The value of a memory record metadata entry.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: stringValue, stringListValue, numberValue, dateTimeValue. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
            
            • stringValue (string) –

              A string value.

            • stringListValue (list) –

              A list of string values.

              • (string) –

            • numberValue (float) –

              A numeric value.

            • dateTimeValue (datetime) –

              A timestamp value in ISO 8601 UTC format.

      • expiresAt (datetime) –

        The timestamp at which the memory record expires and becomes eligible for deletion. This value is set when a record expiry (long-term memory time-to-live) applies to the record, either from the strategy the record belongs to or from a record expiry provided on the batch request that created or updated it. If the record has no expiry configured, this value is not present and the record does not expire.

Exceptions