Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.39.0"
".": "3.40.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 26
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-14eac4a927f8fb858cd4f2ae84cebdcf28f9639b4ec76e47c33fb5f3bf62632d.yml
openapi_spec_hash: c8e892b3a65c51e15145b79781347f5e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-cc0ff5a1831707e8733abeeaa245215c4ba276f8f485ed36beeeaa4f0580a203.yml
openapi_spec_hash: d49d49625c82142babe4a6ac4d2cd8d4
config_hash: cde97ef3188581c5f4924c633ec33ddb
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 3.40.0 (2026-05-11)

Full Changelog: [v3.39.0...v3.40.0](https://github.com/supermemoryai/python-sdk/compare/v3.39.0...v3.40.0)

### Features

* **api:** api update ([855936a](https://github.com/supermemoryai/python-sdk/commit/855936a27f9de29cae51681e30e275fe05574607))

## 3.39.0 (2026-05-09)

Full Changelog: [v3.38.1...v3.39.0](https://github.com/supermemoryai/python-sdk/compare/v3.38.1...v3.39.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supermemory"
version = "3.39.0"
version = "3.40.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def add(
custom_id: str | Omit = omit,
entity_context: str | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -284,6 +285,9 @@ def add(
filepath: Optional file path for the document. Used by supermemoryfs to store the full
path of the file.

filter_by_metadata: Optional metadata filter to apply when pulling related memories and profile
during ingestion. Only memories matching these filters will be used as context.

metadata: Optional metadata for the document.

task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
Expand All @@ -307,6 +311,7 @@ def add(
"custom_id": custom_id,
"entity_context": entity_context,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand Down Expand Up @@ -591,6 +596,7 @@ async def add(
custom_id: str | Omit = omit,
entity_context: str | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -619,6 +625,9 @@ async def add(
filepath: Optional file path for the document. Used by supermemoryfs to store the full
path of the file.

filter_by_metadata: Optional metadata filter to apply when pulling related memories and profile
during ingestion. Only memories matching these filters will be used as context.

metadata: Optional metadata for the document.

task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
Expand All @@ -642,6 +651,7 @@ async def add(
"custom_id": custom_id,
"entity_context": entity_context,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand Down
2 changes: 1 addition & 1 deletion src/supermemory/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "supermemory"
__version__ = "3.39.0" # x-release-please-version
__version__ = "3.40.0" # x-release-please-version
50 changes: 50 additions & 0 deletions src/supermemory/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def update(
content: str | Omit = omit,
custom_id: str | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -104,6 +105,11 @@ def update(
filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
by supermemoryfs to map documents to filesystem paths.

filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.

metadata: Optional metadata for the document. This is used to store additional information
about the document. You can use this to store any additional information you
need about the document. Metadata can be filtered through. Keys must be strings
Expand Down Expand Up @@ -132,6 +138,7 @@ def update(
"content": content,
"custom_id": custom_id,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand Down Expand Up @@ -257,6 +264,7 @@ def add(
custom_id: str | Omit = omit,
entity_context: str | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -285,6 +293,9 @@ def add(
filepath: Optional file path for the document. Used by supermemoryfs to store the full
path of the file.

filter_by_metadata: Optional metadata filter to apply when pulling related memories and profile
during ingestion. Only memories matching these filters will be used as context.

metadata: Optional metadata for the document.

task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
Expand All @@ -308,6 +319,7 @@ def add(
"custom_id": custom_id,
"entity_context": entity_context,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand All @@ -327,6 +339,7 @@ def batch_add(
container_tags: SequenceNotStr[str] | Omit = omit,
content: None | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -353,6 +366,11 @@ def batch_add(
filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
by supermemoryfs to map documents to filesystem paths.

filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.

metadata: Optional metadata for the document. This is used to store additional information
about the document. You can use this to store any additional information you
need about the document. Metadata can be filtered through. Keys must be strings
Expand All @@ -379,6 +397,7 @@ def batch_add(
"container_tags": container_tags,
"content": content,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand Down Expand Up @@ -500,6 +519,7 @@ def upload_file(
entity_context: str | Omit = omit,
filepath: str | Omit = omit,
file_type: str | Omit = omit,
filter_by_metadata: str | Omit = omit,
metadata: str | Omit = omit,
mime_type: str | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
Expand Down Expand Up @@ -537,6 +557,10 @@ def upload_file(
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
notion_doc, webpage, onedrive

filter_by_metadata: Optional metadata filter as a JSON string. Scopes which existing memories are
pulled as context during ingestion. Scalar values match exactly (AND across
keys); array values match ANY (OR within key).

metadata: Optional metadata for the document as a JSON string. This is used to store
additional information about the document. Keys must be strings and values can
be strings, numbers, or booleans.
Expand Down Expand Up @@ -568,6 +592,7 @@ def upload_file(
"entity_context": entity_context,
"filepath": filepath,
"file_type": file_type,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"mime_type": mime_type,
"task_type": task_type,
Expand Down Expand Up @@ -620,6 +645,7 @@ async def update(
content: str | Omit = omit,
custom_id: str | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -656,6 +682,11 @@ async def update(
filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
by supermemoryfs to map documents to filesystem paths.

filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.

metadata: Optional metadata for the document. This is used to store additional information
about the document. You can use this to store any additional information you
need about the document. Metadata can be filtered through. Keys must be strings
Expand Down Expand Up @@ -684,6 +715,7 @@ async def update(
"content": content,
"custom_id": custom_id,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand Down Expand Up @@ -809,6 +841,7 @@ async def add(
custom_id: str | Omit = omit,
entity_context: str | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -837,6 +870,9 @@ async def add(
filepath: Optional file path for the document. Used by supermemoryfs to store the full
path of the file.

filter_by_metadata: Optional metadata filter to apply when pulling related memories and profile
during ingestion. Only memories matching these filters will be used as context.

metadata: Optional metadata for the document.

task_type: Task type: "memory" (default) for full context layer with SuperRAG built in,
Expand All @@ -860,6 +896,7 @@ async def add(
"custom_id": custom_id,
"entity_context": entity_context,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand All @@ -879,6 +916,7 @@ async def batch_add(
container_tags: SequenceNotStr[str] | Omit = omit,
content: None | Omit = omit,
filepath: str | Omit = omit,
filter_by_metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]] | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -905,6 +943,11 @@ async def batch_add(
filepath: Optional file path for the document (e.g., '/documents/reports/file.pdf'). Used
by supermemoryfs to map documents to filesystem paths.

filter_by_metadata: Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.

metadata: Optional metadata for the document. This is used to store additional information
about the document. You can use this to store any additional information you
need about the document. Metadata can be filtered through. Keys must be strings
Expand All @@ -931,6 +974,7 @@ async def batch_add(
"container_tags": container_tags,
"content": content,
"filepath": filepath,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"task_type": task_type,
},
Expand Down Expand Up @@ -1052,6 +1096,7 @@ async def upload_file(
entity_context: str | Omit = omit,
filepath: str | Omit = omit,
file_type: str | Omit = omit,
filter_by_metadata: str | Omit = omit,
metadata: str | Omit = omit,
mime_type: str | Omit = omit,
task_type: Literal["memory", "superrag"] | Omit = omit,
Expand Down Expand Up @@ -1089,6 +1134,10 @@ async def upload_file(
text, pdf, tweet, google_doc, google_slide, google_sheet, image, video,
notion_doc, webpage, onedrive

filter_by_metadata: Optional metadata filter as a JSON string. Scopes which existing memories are
pulled as context during ingestion. Scalar values match exactly (AND across
keys); array values match ANY (OR within key).

metadata: Optional metadata for the document as a JSON string. This is used to store
additional information about the document. Keys must be strings and values can
be strings, numbers, or booleans.
Expand Down Expand Up @@ -1120,6 +1169,7 @@ async def upload_file(
"entity_context": entity_context,
"filepath": filepath,
"file_type": file_type,
"filter_by_metadata": filter_by_metadata,
"metadata": metadata,
"mime_type": mime_type,
"task_type": task_type,
Expand Down
8 changes: 8 additions & 0 deletions src/supermemory/types/client_add_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ class ClientAddParams(TypedDict, total=False):
Used by supermemoryfs to store the full path of the file.
"""

filter_by_metadata: Annotated[
Dict[str, Union[str, float, bool, SequenceNotStr[str]]], PropertyInfo(alias="filterByMetadata")
]
"""
Optional metadata filter to apply when pulling related memories and profile
during ingestion. Only memories matching these filters will be used as context.
"""

metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
"""Optional metadata for the document."""

Expand Down
8 changes: 8 additions & 0 deletions src/supermemory/types/document_add_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ class DocumentAddParams(TypedDict, total=False):
Used by supermemoryfs to store the full path of the file.
"""

filter_by_metadata: Annotated[
Dict[str, Union[str, float, bool, SequenceNotStr[str]]], PropertyInfo(alias="filterByMetadata")
]
"""
Optional metadata filter to apply when pulling related memories and profile
during ingestion. Only memories matching these filters will be used as context.
"""

metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
"""Optional metadata for the document."""

Expand Down
20 changes: 20 additions & 0 deletions src/supermemory/types/document_batch_add_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ class DocumentBatchAddParams(TypedDict, total=False):
Used by supermemoryfs to map documents to filesystem paths.
"""

filter_by_metadata: Annotated[
Dict[str, Union[str, float, bool, SequenceNotStr[str]]], PropertyInfo(alias="filterByMetadata")
]
"""
Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.
"""

metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
"""Optional metadata for the document.

Expand Down Expand Up @@ -92,6 +102,16 @@ class DocumentsUnionMember0(TypedDict, total=False):
Used by supermemoryfs to map documents to filesystem paths.
"""

filter_by_metadata: Annotated[
Dict[str, Union[str, float, bool, SequenceNotStr[str]]], PropertyInfo(alias="filterByMetadata")
]
"""
Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.
"""

metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
"""Optional metadata for the document.

Expand Down
10 changes: 10 additions & 0 deletions src/supermemory/types/document_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ class DocumentUpdateParams(TypedDict, total=False):
Used by supermemoryfs to map documents to filesystem paths.
"""

filter_by_metadata: Annotated[
Dict[str, Union[str, float, bool, SequenceNotStr[str]]], PropertyInfo(alias="filterByMetadata")
]
"""
Optional metadata filter scoping which existing memories are pulled as context
during ingestion. Scalar values match exactly (AND across keys); array values
match ANY (OR within key). Only memories whose source documents match this
filter are used as context.
"""

metadata: Dict[str, Union[str, float, bool, SequenceNotStr[str]]]
"""Optional metadata for the document.

Expand Down
Loading