@@ -68,6 +68,7 @@ def update(
6868 content : str | Omit = omit ,
6969 custom_id : str | Omit = omit ,
7070 filepath : str | Omit = omit ,
71+ filter_by_metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
7172 metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
7273 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
7374 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -104,6 +105,11 @@ def update(
104105 filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
105106 by supermemoryfs to map documents to filesystem paths.
106107
108+ filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
109+ during ingestion. Scalar values match exactly (AND across keys); array values
110+ match ANY (OR within key). Only memories whose source documents match this
111+ filter are used as context.
112+
107113 metadata: Optional metadata for the document. This is used to store additional information
108114 about the document. You can use this to store any additional information you
109115 need about the document. Metadata can be filtered through. Keys must be strings
@@ -132,6 +138,7 @@ def update(
132138 "content" : content ,
133139 "custom_id" : custom_id ,
134140 "filepath" : filepath ,
141+ "filter_by_metadata" : filter_by_metadata ,
135142 "metadata" : metadata ,
136143 "task_type" : task_type ,
137144 },
@@ -257,6 +264,7 @@ def add(
257264 custom_id : str | Omit = omit ,
258265 entity_context : str | Omit = omit ,
259266 filepath : str | Omit = omit ,
267+ filter_by_metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
260268 metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
261269 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
262270 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -285,6 +293,9 @@ def add(
285293 filepath: Optional file path for the document. Used by supermemoryfs to store the full
286294 path of the file.
287295
296+ filter_by_metadata: Optional metadata filter to apply when pulling related memories and profile
297+ during ingestion. Only memories matching these filters will be used as context.
298+
288299 metadata: Optional metadata for the document.
289300
290301 task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
@@ -308,6 +319,7 @@ def add(
308319 "custom_id" : custom_id ,
309320 "entity_context" : entity_context ,
310321 "filepath" : filepath ,
322+ "filter_by_metadata" : filter_by_metadata ,
311323 "metadata" : metadata ,
312324 "task_type" : task_type ,
313325 },
@@ -327,6 +339,7 @@ def batch_add(
327339 container_tags : SequenceNotStr [str ] | Omit = omit ,
328340 content : None | Omit = omit ,
329341 filepath : str | Omit = omit ,
342+ filter_by_metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
330343 metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
331344 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
332345 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -353,6 +366,11 @@ def batch_add(
353366 filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
354367 by supermemoryfs to map documents to filesystem paths.
355368
369+ filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
370+ during ingestion. Scalar values match exactly (AND across keys); array values
371+ match ANY (OR within key). Only memories whose source documents match this
372+ filter are used as context.
373+
356374 metadata: Optional metadata for the document. This is used to store additional information
357375 about the document. You can use this to store any additional information you
358376 need about the document. Metadata can be filtered through. Keys must be strings
@@ -379,6 +397,7 @@ def batch_add(
379397 "container_tags" : container_tags ,
380398 "content" : content ,
381399 "filepath" : filepath ,
400+ "filter_by_metadata" : filter_by_metadata ,
382401 "metadata" : metadata ,
383402 "task_type" : task_type ,
384403 },
@@ -500,6 +519,7 @@ def upload_file(
500519 entity_context : str | Omit = omit ,
501520 filepath : str | Omit = omit ,
502521 file_type : str | Omit = omit ,
522+ filter_by_metadata : str | Omit = omit ,
503523 metadata : str | Omit = omit ,
504524 mime_type : str | Omit = omit ,
505525 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
@@ -537,6 +557,10 @@ def upload_file(
537557 text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
538558 notion_doc, webpage, onedrive
539559
560+ filter_by_metadata: Optional metadata filter as a JSON string. Scopes which existing memories are
561+ pulled as context during ingestion. Scalar values match exactly (AND across
562+ keys); array values match ANY (OR within key).
563+
540564 metadata: Optional metadata for the document as a JSON string. This is used to store
541565 additional information about the document. Keys must be strings and values can
542566 be strings, numbers, or booleans.
@@ -568,6 +592,7 @@ def upload_file(
568592 "entity_context" : entity_context ,
569593 "filepath" : filepath ,
570594 "file_type" : file_type ,
595+ "filter_by_metadata" : filter_by_metadata ,
571596 "metadata" : metadata ,
572597 "mime_type" : mime_type ,
573598 "task_type" : task_type ,
@@ -620,6 +645,7 @@ async def update(
620645 content : str | Omit = omit ,
621646 custom_id : str | Omit = omit ,
622647 filepath : str | Omit = omit ,
648+ filter_by_metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
623649 metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
624650 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
625651 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -656,6 +682,11 @@ async def update(
656682 filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
657683 by supermemoryfs to map documents to filesystem paths.
658684
685+ filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
686+ during ingestion. Scalar values match exactly (AND across keys); array values
687+ match ANY (OR within key). Only memories whose source documents match this
688+ filter are used as context.
689+
659690 metadata: Optional metadata for the document. This is used to store additional information
660691 about the document. You can use this to store any additional information you
661692 need about the document. Metadata can be filtered through. Keys must be strings
@@ -684,6 +715,7 @@ async def update(
684715 "content" : content ,
685716 "custom_id" : custom_id ,
686717 "filepath" : filepath ,
718+ "filter_by_metadata" : filter_by_metadata ,
687719 "metadata" : metadata ,
688720 "task_type" : task_type ,
689721 },
@@ -809,6 +841,7 @@ async def add(
809841 custom_id : str | Omit = omit ,
810842 entity_context : str | Omit = omit ,
811843 filepath : str | Omit = omit ,
844+ filter_by_metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
812845 metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
813846 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
814847 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -837,6 +870,9 @@ async def add(
837870 filepath: Optional file path for the document. Used by supermemoryfs to store the full
838871 path of the file.
839872
873+ filter_by_metadata: Optional metadata filter to apply when pulling related memories and profile
874+ during ingestion. Only memories matching these filters will be used as context.
875+
840876 metadata: Optional metadata for the document.
841877
842878 task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
@@ -860,6 +896,7 @@ async def add(
860896 "custom_id" : custom_id ,
861897 "entity_context" : entity_context ,
862898 "filepath" : filepath ,
899+ "filter_by_metadata" : filter_by_metadata ,
863900 "metadata" : metadata ,
864901 "task_type" : task_type ,
865902 },
@@ -879,6 +916,7 @@ async def batch_add(
879916 container_tags : SequenceNotStr [str ] | Omit = omit ,
880917 content : None | Omit = omit ,
881918 filepath : str | Omit = omit ,
919+ filter_by_metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
882920 metadata : Dict [str , Union [str , float , bool , SequenceNotStr [str ]]] | Omit = omit ,
883921 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
884922 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -905,6 +943,11 @@ async def batch_add(
905943 filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
906944 by supermemoryfs to map documents to filesystem paths.
907945
946+ filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
947+ during ingestion. Scalar values match exactly (AND across keys); array values
948+ match ANY (OR within key). Only memories whose source documents match this
949+ filter are used as context.
950+
908951 metadata: Optional metadata for the document. This is used to store additional information
909952 about the document. You can use this to store any additional information you
910953 need about the document. Metadata can be filtered through. Keys must be strings
@@ -931,6 +974,7 @@ async def batch_add(
931974 "container_tags" : container_tags ,
932975 "content" : content ,
933976 "filepath" : filepath ,
977+ "filter_by_metadata" : filter_by_metadata ,
934978 "metadata" : metadata ,
935979 "task_type" : task_type ,
936980 },
@@ -1052,6 +1096,7 @@ async def upload_file(
10521096 entity_context : str | Omit = omit ,
10531097 filepath : str | Omit = omit ,
10541098 file_type : str | Omit = omit ,
1099+ filter_by_metadata : str | Omit = omit ,
10551100 metadata : str | Omit = omit ,
10561101 mime_type : str | Omit = omit ,
10571102 task_type : Literal ["memory" , "superrag" ] | Omit = omit ,
@@ -1089,6 +1134,10 @@ async def upload_file(
10891134 text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
10901135 notion_doc, webpage, onedrive
10911136
1137+ filter_by_metadata: Optional metadata filter as a JSON string. Scopes which existing memories are
1138+ pulled as context during ingestion. Scalar values match exactly (AND across
1139+ keys); array values match ANY (OR within key).
1140+
10921141 metadata: Optional metadata for the document as a JSON string. This is used to store
10931142 additional information about the document. Keys must be strings and values can
10941143 be strings, numbers, or booleans.
@@ -1120,6 +1169,7 @@ async def upload_file(
11201169 "entity_context" : entity_context ,
11211170 "filepath" : filepath ,
11221171 "file_type" : file_type ,
1172+ "filter_by_metadata" : filter_by_metadata ,
11231173 "metadata" : metadata ,
11241174 "mime_type" : mime_type ,
11251175 "task_type" : task_type ,
0 commit comments