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.47.0"
".": "3.48.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-3e34ab6d0648da8c95f7cc0721a76f19137c7b165c14e038f67e5070e6f85200.yml
openapi_spec_hash: d940a39080b2245905ef1117d9d4f16e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-62ed5d466e259c8e4311abe68915161cd0a01d1cc6d9079945eb8a0ebf73f690.yml
openapi_spec_hash: 9622631943e5355eb6923e0c2e12f772
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.48.0 (2026-06-20)

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

### Features

* **api:** api update ([9ed1cba](https://github.com/supermemoryai/python-sdk/commit/9ed1cba81d04a41687621bc6ce66217527b06a31))

## 3.47.0 (2026-06-18)

Full Changelog: [v3.46.0...v3.47.0](https://github.com/supermemoryai/python-sdk/compare/v3.46.0...v3.47.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.47.0"
version = "3.48.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
22 changes: 21 additions & 1 deletion src/supermemory/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import os
from typing import TYPE_CHECKING, Any, Dict, Union, Mapping
from typing import TYPE_CHECKING, Any, Dict, List, Union, Mapping
from typing_extensions import Self, Literal, override

import httpx
Expand Down Expand Up @@ -334,7 +334,9 @@ def profile(
self,
*,
container_tag: str,
buckets: SequenceNotStr[str] | Omit = omit,
filters: client_profile_params.Filters | Omit = omit,
include: List[Literal["static", "dynamic", "buckets"]] | Omit = omit,
q: str | Omit = omit,
threshold: float | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -351,9 +353,15 @@ def profile(
container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or
any other identifier you wish to use to filter memories.

buckets: Specific bucket keys to return. Omit to return all configured buckets. Only
relevant when "buckets" is included.

filters: Optional metadata filters to apply to profile results and search results.
Supports complex AND/OR queries with multiple conditions.

include: Profile sections to return. Omit to return all sections. Pass a subset to reduce
payload — e.g. ["buckets"] skips static and dynamic entirely.

q: Optional search query to include search results in the response

threshold: Threshold for search results. Only results with a score above this threshold
Expand All @@ -372,7 +380,9 @@ def profile(
body=maybe_transform(
{
"container_tag": container_tag,
"buckets": buckets,
"filters": filters,
"include": include,
"q": q,
"threshold": threshold,
},
Expand Down Expand Up @@ -681,7 +691,9 @@ async def profile(
self,
*,
container_tag: str,
buckets: SequenceNotStr[str] | Omit = omit,
filters: client_profile_params.Filters | Omit = omit,
include: List[Literal["static", "dynamic", "buckets"]] | Omit = omit,
q: str | Omit = omit,
threshold: float | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -698,9 +710,15 @@ async def profile(
container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or
any other identifier you wish to use to filter memories.

buckets: Specific bucket keys to return. Omit to return all configured buckets. Only
relevant when "buckets" is included.

filters: Optional metadata filters to apply to profile results and search results.
Supports complex AND/OR queries with multiple conditions.

include: Profile sections to return. Omit to return all sections. Pass a subset to reduce
payload — e.g. ["buckets"] skips static and dynamic entirely.

q: Optional search query to include search results in the response

threshold: Threshold for search results. Only results with a score above this threshold
Expand All @@ -719,7 +737,9 @@ async def profile(
body=await async_maybe_transform(
{
"container_tag": container_tag,
"buckets": buckets,
"filters": filters,
"include": include,
"q": q,
"threshold": threshold,
},
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.47.0" # x-release-please-version
__version__ = "3.48.0" # x-release-please-version
8 changes: 8 additions & 0 deletions src/supermemory/resources/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def update(
onedrive_client_id: Optional[str] | Omit = omit,
onedrive_client_secret: Optional[str] | Omit = omit,
onedrive_custom_key_enabled: Optional[bool] | Omit = omit,
profile_buckets: Iterable[setting_update_params.ProfileBucket] | Omit = omit,
should_llm_filter: Optional[bool] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -77,6 +78,8 @@ def update(
Update settings for an organization

Args:
profile_buckets: Profile bucket definitions

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -105,6 +108,7 @@ def update(
"onedrive_client_id": onedrive_client_id,
"onedrive_client_secret": onedrive_client_secret,
"onedrive_custom_key_enabled": onedrive_custom_key_enabled,
"profile_buckets": profile_buckets,
"should_llm_filter": should_llm_filter,
},
setting_update_params.SettingUpdateParams,
Expand Down Expand Up @@ -176,6 +180,7 @@ async def update(
onedrive_client_id: Optional[str] | Omit = omit,
onedrive_client_secret: Optional[str] | Omit = omit,
onedrive_custom_key_enabled: Optional[bool] | Omit = omit,
profile_buckets: Iterable[setting_update_params.ProfileBucket] | Omit = omit,
should_llm_filter: Optional[bool] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand All @@ -188,6 +193,8 @@ async def update(
Update settings for an organization

Args:
profile_buckets: Profile bucket definitions

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -216,6 +223,7 @@ async def update(
"onedrive_client_id": onedrive_client_id,
"onedrive_client_secret": onedrive_client_secret,
"onedrive_custom_key_enabled": onedrive_custom_key_enabled,
"profile_buckets": profile_buckets,
"should_llm_filter": should_llm_filter,
},
setting_update_params.SettingUpdateParams,
Expand Down
16 changes: 15 additions & 1 deletion src/supermemory/types/client_profile_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from __future__ import annotations

from typing import Union, Iterable
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict

from .._types import SequenceNotStr
from .._utils import PropertyInfo

__all__ = [
Expand Down Expand Up @@ -335,12 +336,25 @@ class ClientProfileParams(TypedDict, total=False):
to use to filter memories.
"""

buckets: SequenceNotStr[str]
"""Specific bucket keys to return.

Omit to return all configured buckets. Only relevant when "buckets" is included.
"""

filters: Filters
"""Optional metadata filters to apply to profile results and search results.

Supports complex AND/OR queries with multiple conditions.
"""

include: List[Literal["static", "dynamic", "buckets"]]
"""Profile sections to return.

Omit to return all sections. Pass a subset to reduce payload — e.g. ["buckets"]
skips static and dynamic entirely.
"""

q: str
"""Optional search query to include search results in the response"""

Expand Down
9 changes: 6 additions & 3 deletions src/supermemory/types/profile_response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Dict, List, Optional

from pydantic import Field as FieldInfo

Expand All @@ -10,10 +10,13 @@


class Profile(BaseModel):
dynamic: List[str]
buckets: Optional[Dict[str, List[str]]] = None
"""Per-bucket memory lists, keyed by bucket key"""

dynamic: Optional[List[str]] = None
"""Dynamic profile information (recent memories)"""

static: List[str]
static: Optional[List[str]] = None
"""Static profile information that remains relevant long-term"""


Expand Down
15 changes: 14 additions & 1 deletion src/supermemory/types/setting_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@

from .._models import BaseModel

__all__ = ["SettingGetResponse"]
__all__ = ["SettingGetResponse", "ProfileBucket"]


class ProfileBucket(BaseModel):
"""Definition of a single profile bucket"""

key: str
"""Stable slug for the bucket, stored on each memory"""

description: Optional[str] = None
"""What belongs in this bucket — used to guide the ingestion classifier."""


class SettingGetResponse(BaseModel):
Expand Down Expand Up @@ -46,4 +56,7 @@ class SettingGetResponse(BaseModel):

onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)

profile_buckets: Optional[List[ProfileBucket]] = FieldInfo(alias="profileBuckets", default=None)
"""Profile bucket definitions"""

should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)
17 changes: 15 additions & 2 deletions src/supermemory/types/setting_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
from __future__ import annotations

from typing import Dict, Union, Iterable, Optional
from typing_extensions import Annotated, TypedDict
from typing_extensions import Required, Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["SettingUpdateParams"]
__all__ = ["SettingUpdateParams", "ProfileBucket"]


class SettingUpdateParams(TypedDict, total=False):
Expand Down Expand Up @@ -47,4 +47,17 @@ class SettingUpdateParams(TypedDict, total=False):

onedrive_custom_key_enabled: Annotated[Optional[bool], PropertyInfo(alias="onedriveCustomKeyEnabled")]

profile_buckets: Annotated[Iterable[ProfileBucket], PropertyInfo(alias="profileBuckets")]
"""Profile bucket definitions"""

should_llm_filter: Annotated[Optional[bool], PropertyInfo(alias="shouldLLMFilter")]


class ProfileBucket(TypedDict, total=False):
"""Definition of a single profile bucket"""

key: Required[str]
"""Stable slug for the bucket, stored on each memory"""

description: str
"""What belongs in this bucket — used to guide the ingestion classifier."""
15 changes: 14 additions & 1 deletion src/supermemory/types/setting_update_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@

from .._models import BaseModel

__all__ = ["SettingUpdateResponse", "Updated"]
__all__ = ["SettingUpdateResponse", "Updated", "UpdatedProfileBucket"]


class UpdatedProfileBucket(BaseModel):
"""Definition of a single profile bucket"""

key: str
"""Stable slug for the bucket, stored on each memory"""

description: Optional[str] = None
"""What belongs in this bucket — used to guide the ingestion classifier."""


class Updated(BaseModel):
Expand Down Expand Up @@ -46,6 +56,9 @@ class Updated(BaseModel):

onedrive_custom_key_enabled: Optional[bool] = FieldInfo(alias="onedriveCustomKeyEnabled", default=None)

profile_buckets: Optional[List[UpdatedProfileBucket]] = FieldInfo(alias="profileBuckets", default=None)
"""Profile bucket definitions"""

should_llm_filter: Optional[bool] = FieldInfo(alias="shouldLLMFilter", default=None)


Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def test_method_profile(self, client: Supermemory) -> None:
def test_method_profile_with_all_params(self, client: Supermemory) -> None:
client_ = client.profile(
container_tag="containerTag",
buckets=["string"],
filters={
"or_": [
{
Expand All @@ -93,6 +94,7 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None:
}
]
},
include=["static"],
q="q",
threshold=0,
)
Expand Down Expand Up @@ -194,6 +196,7 @@ async def test_method_profile(self, async_client: AsyncSupermemory) -> None:
async def test_method_profile_with_all_params(self, async_client: AsyncSupermemory) -> None:
client = await async_client.profile(
container_tag="containerTag",
buckets=["string"],
filters={
"or_": [
{
Expand All @@ -206,6 +209,7 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo
}
]
},
include=["static"],
q="q",
threshold=0,
)
Expand Down
12 changes: 12 additions & 0 deletions tests/api_resources/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ def test_method_update_with_all_params(self, client: Supermemory) -> None:
onedrive_client_id="onedriveClientId",
onedrive_client_secret="onedriveClientSecret",
onedrive_custom_key_enabled=True,
profile_buckets=[
{
"key": "key",
"description": "description",
}
],
should_llm_filter=True,
)
assert_matches_type(SettingUpdateResponse, setting, path=["response"])
Expand Down Expand Up @@ -129,6 +135,12 @@ async def test_method_update_with_all_params(self, async_client: AsyncSupermemor
onedrive_client_id="onedriveClientId",
onedrive_client_secret="onedriveClientSecret",
onedrive_custom_key_enabled=True,
profile_buckets=[
{
"key": "key",
"description": "description",
}
],
should_llm_filter=True,
)
assert_matches_type(SettingUpdateResponse, setting, path=["response"])
Expand Down