Skip to content
Open
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.32.0"
".": "3.33.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%2Fsupermemory-new-e519a815da9102647222f1f73920926f2d8b63d16995d3687213b604963f5ec5.yml
openapi_spec_hash: 4de453d3c2fca716f7f645d4c2c8f921
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-cb825424a78065806e278b10053f1fa86b058c5921cd1897493bbe162a5a46bf.yml
openapi_spec_hash: fcaa9f922c209e43a9be57695f3ce6ad
config_hash: f3eb5ca71172780678106f6d46f15dda
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.33.0 (2026-04-06)

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

### Features

* **api:** api update ([0eaf416](https://github.com/supermemoryai/python-sdk/commit/0eaf416665d0dfb92e0119c54c11f170e0a1fe32))
* **api:** api update ([5e2fc3b](https://github.com/supermemoryai/python-sdk/commit/5e2fc3b3b0aabe7f506284ae5922ab0c86b2eafb))

## 3.32.0 (2026-03-27)

Full Changelog: [v3.31.0...v3.32.0](https://github.com/supermemoryai/python-sdk/compare/v3.31.0...v3.32.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.32.0"
version = "3.33.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
12 changes: 12 additions & 0 deletions src/supermemory/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ def search(self) -> SearchResource:

@cached_property
def settings(self) -> SettingsResource:
"""Organization settings"""
from .resources.settings import SettingsResource

return SettingsResource(self)

@cached_property
def connections(self) -> ConnectionsResource:
"""External service integrations"""
from .resources.connections import ConnectionsResource

return ConnectionsResource(self)
Expand Down Expand Up @@ -458,12 +460,14 @@ def search(self) -> AsyncSearchResource:

@cached_property
def settings(self) -> AsyncSettingsResource:
"""Organization settings"""
from .resources.settings import AsyncSettingsResource

return AsyncSettingsResource(self)

@cached_property
def connections(self) -> AsyncConnectionsResource:
"""External service integrations"""
from .resources.connections import AsyncConnectionsResource

return AsyncConnectionsResource(self)
Expand Down Expand Up @@ -729,12 +733,14 @@ def search(self) -> search.SearchResourceWithRawResponse:

@cached_property
def settings(self) -> settings.SettingsResourceWithRawResponse:
"""Organization settings"""
from .resources.settings import SettingsResourceWithRawResponse

return SettingsResourceWithRawResponse(self._client.settings)

@cached_property
def connections(self) -> connections.ConnectionsResourceWithRawResponse:
"""External service integrations"""
from .resources.connections import ConnectionsResourceWithRawResponse

return ConnectionsResourceWithRawResponse(self._client.connections)
Expand Down Expand Up @@ -773,12 +779,14 @@ def search(self) -> search.AsyncSearchResourceWithRawResponse:

@cached_property
def settings(self) -> settings.AsyncSettingsResourceWithRawResponse:
"""Organization settings"""
from .resources.settings import AsyncSettingsResourceWithRawResponse

return AsyncSettingsResourceWithRawResponse(self._client.settings)

@cached_property
def connections(self) -> connections.AsyncConnectionsResourceWithRawResponse:
"""External service integrations"""
from .resources.connections import AsyncConnectionsResourceWithRawResponse

return AsyncConnectionsResourceWithRawResponse(self._client.connections)
Expand Down Expand Up @@ -817,12 +825,14 @@ def search(self) -> search.SearchResourceWithStreamingResponse:

@cached_property
def settings(self) -> settings.SettingsResourceWithStreamingResponse:
"""Organization settings"""
from .resources.settings import SettingsResourceWithStreamingResponse

return SettingsResourceWithStreamingResponse(self._client.settings)

@cached_property
def connections(self) -> connections.ConnectionsResourceWithStreamingResponse:
"""External service integrations"""
from .resources.connections import ConnectionsResourceWithStreamingResponse

return ConnectionsResourceWithStreamingResponse(self._client.connections)
Expand Down Expand Up @@ -861,12 +871,14 @@ def search(self) -> search.AsyncSearchResourceWithStreamingResponse:

@cached_property
def settings(self) -> settings.AsyncSettingsResourceWithStreamingResponse:
"""Organization settings"""
from .resources.settings import AsyncSettingsResourceWithStreamingResponse

return AsyncSettingsResourceWithStreamingResponse(self._client.settings)

@cached_property
def connections(self) -> connections.AsyncConnectionsResourceWithStreamingResponse:
"""External service integrations"""
from .resources.connections import AsyncConnectionsResourceWithStreamingResponse

return AsyncConnectionsResourceWithStreamingResponse(self._client.connections)
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.32.0" # x-release-please-version
__version__ = "3.33.0" # x-release-please-version
4 changes: 4 additions & 0 deletions src/supermemory/resources/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@


class ConnectionsResource(SyncAPIResource):
"""External service integrations"""

@cached_property
def with_raw_response(self) -> ConnectionsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -457,6 +459,8 @@ def resources(


class AsyncConnectionsResource(AsyncAPIResource):
"""External service integrations"""

@cached_property
def with_raw_response(self) -> AsyncConnectionsResourceWithRawResponse:
"""
Expand Down
8 changes: 8 additions & 0 deletions src/supermemory/resources/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ def upload_file(
self,
*,
file: FileTypes,
container_tag: str | Omit = omit,
container_tags: str | Omit = omit,
file_type: str | Omit = omit,
metadata: str | Omit = omit,
Expand All @@ -471,6 +472,8 @@ def upload_file(
Args:
file: File to upload and process

container_tag: Optional container tag (e.g., 'user_123'). Use this for a single tag.

container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
strings will be automatically converted to an array.
Expand Down Expand Up @@ -502,6 +505,7 @@ def upload_file(
body = deepcopy_minimal(
{
"file": file,
"container_tag": container_tag,
"container_tags": container_tags,
"file_type": file_type,
"metadata": metadata,
Expand Down Expand Up @@ -940,6 +944,7 @@ async def upload_file(
self,
*,
file: FileTypes,
container_tag: str | Omit = omit,
container_tags: str | Omit = omit,
file_type: str | Omit = omit,
metadata: str | Omit = omit,
Expand All @@ -958,6 +963,8 @@ async def upload_file(
Args:
file: File to upload and process

container_tag: Optional container tag (e.g., 'user_123'). Use this for a single tag.

container_tags: Optional container tags. Can be either a JSON string of an array (e.g.,
'["user_123", "project_123"]') or a single string (e.g., 'user_123'). Single
strings will be automatically converted to an array.
Expand Down Expand Up @@ -989,6 +996,7 @@ async def upload_file(
body = deepcopy_minimal(
{
"file": file,
"container_tag": container_tag,
"container_tags": container_tags,
"file_type": file_type,
"metadata": metadata,
Expand Down
12 changes: 12 additions & 0 deletions src/supermemory/resources/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def memories(
self,
*,
q: str,
aggregate: bool | Omit = omit,
container_tag: str | Omit = omit,
filters: search_memories_params.Filters | Omit = omit,
include: search_memories_params.Include | Omit = omit,
Expand All @@ -266,6 +267,10 @@ def memories(
Args:
q: Search query string

aggregate: If true, aggregates information from multiple memories to create new synthesized
memories. The result will be a mix of aggregated and non-aggregated memories,
reranked by relevance to the query. Works in conjunction with reranking.

container_tag: Optional tag this search should be containerized by. This can be an ID for your
user, a project ID, or any other identifier you wish to use to filter memories.

Expand Down Expand Up @@ -300,6 +305,7 @@ def memories(
body=maybe_transform(
{
"q": q,
"aggregate": aggregate,
"container_tag": container_tag,
"filters": filters,
"include": include,
Expand Down Expand Up @@ -538,6 +544,7 @@ async def memories(
self,
*,
q: str,
aggregate: bool | Omit = omit,
container_tag: str | Omit = omit,
filters: search_memories_params.Filters | Omit = omit,
include: search_memories_params.Include | Omit = omit,
Expand All @@ -559,6 +566,10 @@ async def memories(
Args:
q: Search query string

aggregate: If true, aggregates information from multiple memories to create new synthesized
memories. The result will be a mix of aggregated and non-aggregated memories,
reranked by relevance to the query. Works in conjunction with reranking.

container_tag: Optional tag this search should be containerized by. This can be an ID for your
user, a project ID, or any other identifier you wish to use to filter memories.

Expand Down Expand Up @@ -593,6 +604,7 @@ async def memories(
body=await async_maybe_transform(
{
"q": q,
"aggregate": aggregate,
"container_tag": container_tag,
"filters": filters,
"include": include,
Expand Down
4 changes: 4 additions & 0 deletions src/supermemory/resources/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@


class SettingsResource(SyncAPIResource):
"""Organization settings"""

@cached_property
def with_raw_response(self) -> SettingsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -134,6 +136,8 @@ def get(


class AsyncSettingsResource(AsyncAPIResource):
"""Organization settings"""

@cached_property
def with_raw_response(self) -> AsyncSettingsResourceWithRawResponse:
"""
Expand Down
3 changes: 3 additions & 0 deletions src/supermemory/types/document_upload_file_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class DocumentUploadFileParams(TypedDict, total=False):
file: Required[FileTypes]
"""File to upload and process"""

container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
"""Optional container tag (e.g., 'user_123'). Use this for a single tag."""

container_tags: Annotated[str, PropertyInfo(alias="containerTags")]
"""Optional container tags.

Expand Down
7 changes: 7 additions & 0 deletions src/supermemory/types/search_memories_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,13 @@ class SearchMemoriesParams(TypedDict, total=False):
q: Required[str]
"""Search query string"""

aggregate: bool
"""
If true, aggregates information from multiple memories to create new synthesized
memories. The result will be a mix of aggregated and non-aggregated memories,
reranked by relevance to the query. Works in conjunction with reranking.
"""

container_tag: Annotated[str, PropertyInfo(alias="containerTag")]
"""Optional tag this search should be containerized by.

Expand Down
3 changes: 3 additions & 0 deletions src/supermemory/types/search_memories_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ class Result(BaseModel):
documents: Optional[List[ResultDocument]] = None
"""Associated documents for this memory entry"""

is_aggregated: Optional[bool] = FieldInfo(alias="isAggregated", default=None)
"""Indicates if this memory was created by aggregating multiple source memories"""

memory: Optional[str] = None
"""The memory content (only present for memory results)"""

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ def test_method_upload_file(self, client: Supermemory) -> None:
def test_method_upload_file_with_all_params(self, client: Supermemory) -> None:
document = client.documents.upload_file(
file=b"Example data",
container_tag="user",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
Expand Down Expand Up @@ -866,6 +867,7 @@ async def test_method_upload_file(self, async_client: AsyncSupermemory) -> None:
async def test_method_upload_file_with_all_params(self, async_client: AsyncSupermemory) -> None:
document = await async_client.documents.upload_file(
file=b"Example data",
container_tag="user",
container_tags='["user_123", "project_123"]',
file_type="image",
metadata='{"category": "technology", "isPublic": true, "readingTime": 5}',
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def test_method_memories(self, client: Supermemory) -> None:
def test_method_memories_with_all_params(self, client: Supermemory) -> None:
search = client.search.memories(
q="machine learning concepts",
aggregate=False,
container_tag="user_123",
filters={
"or_": [
Expand Down Expand Up @@ -367,6 +368,7 @@ async def test_method_memories(self, async_client: AsyncSupermemory) -> None:
async def test_method_memories_with_all_params(self, async_client: AsyncSupermemory) -> None:
search = await async_client.search.memories(
q="machine learning concepts",
aggregate=False,
container_tag="user_123",
filters={
"or_": [
Expand Down