@@ -133,6 +133,7 @@ def create_memory(
133133 description : Optional [str ] = None ,
134134 event_expiry_days : int = 90 ,
135135 memory_execution_role_arn : Optional [str ] = None ,
136+ stream_delivery_resources : Optional [Dict [str , Any ]] = None ,
136137 ) -> Dict [str , Any ]:
137138 """Create a memory with simplified configuration."""
138139 if strategies is None :
@@ -154,6 +155,9 @@ def create_memory(
154155 if memory_execution_role_arn is not None :
155156 params ["memoryExecutionRoleArn" ] = memory_execution_role_arn
156157
158+ if stream_delivery_resources is not None :
159+ params ["streamDeliveryResources" ] = stream_delivery_resources
160+
157161 response = self .gmcp_client .create_memory (** params )
158162
159163 memory = response ["memory" ]
@@ -174,6 +178,7 @@ def create_or_get_memory(
174178 description : Optional [str ] = None ,
175179 event_expiry_days : int = 90 ,
176180 memory_execution_role_arn : Optional [str ] = None ,
181+ stream_delivery_resources : Optional [Dict [str , Any ]] = None ,
177182 ) -> Dict [str , Any ]:
178183 """Create a memory resource or fetch the existing memory details if it already exists.
179184
@@ -187,6 +192,7 @@ def create_or_get_memory(
187192 description = description ,
188193 event_expiry_days = event_expiry_days ,
189194 memory_execution_role_arn = memory_execution_role_arn ,
195+ stream_delivery_resources = stream_delivery_resources ,
190196 )
191197 return memory
192198 except ClientError as e :
@@ -208,6 +214,7 @@ def create_memory_and_wait(
208214 description : Optional [str ] = None ,
209215 event_expiry_days : int = 90 ,
210216 memory_execution_role_arn : Optional [str ] = None ,
217+ stream_delivery_resources : Optional [Dict [str , Any ]] = None ,
211218 max_wait : int = 300 ,
212219 poll_interval : int = 10 ,
213220 ) -> Dict [str , Any ]:
@@ -222,6 +229,7 @@ def create_memory_and_wait(
222229 description: Optional description
223230 event_expiry_days: How long to retain events (default: 90 days)
224231 memory_execution_role_arn: IAM role ARN for memory execution
232+ stream_delivery_resources: Optional delivery configuration for streaming memory records
225233 max_wait: Maximum seconds to wait (default: 300)
226234 poll_interval: Seconds between status checks (default: 10)
227235
@@ -239,6 +247,7 @@ def create_memory_and_wait(
239247 description = description ,
240248 event_expiry_days = event_expiry_days ,
241249 memory_execution_role_arn = memory_execution_role_arn ,
250+ stream_delivery_resources = stream_delivery_resources ,
242251 )
243252
244253 memory_id = memory .get ("memoryId" , memory .get ("id" )) # Handle both field names
0 commit comments