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.57.0"
".": "3.58.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-22efc23f9b6792eb4ce96106f7c227a36c008feca20df430490c7b6cb145a703.yml
openapi_spec_hash: f66075689686f6f24a7cb4e47dcffebd
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc/supermemory-new-5ad0e09495301abdcb7a5a63738ce5841248518504e122003219230ef35ed439.yml
openapi_spec_hash: 6462e423d826118caba0292cd5956178
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.58.0 (2026-08-14)

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

### Features

* **api:** api update ([28dce44](https://github.com/supermemoryai/python-sdk/commit/28dce44965387f46bc594b796a6054bb4d0472ea))

## 3.57.0 (2026-08-11)

Full Changelog: [v3.56.0...v3.57.0](https://github.com/supermemoryai/python-sdk/compare/v3.56.0...v3.57.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.57.0"
version = "3.58.0"
description = "The official Python library for the supermemory API"
dynamic = ["readme"]
license = "Apache-2.0"
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.57.0" # x-release-please-version
__version__ = "3.58.0" # x-release-please-version
4 changes: 2 additions & 2 deletions src/supermemory/types/connection_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
class ConnectionCreateResponse(BaseModel):
id: str

auth_link: str = FieldInfo(alias="authLink")
auth_link: Optional[str] = FieldInfo(alias="authLink", default=None)

expires_in: str = FieldInfo(alias="expiresIn")
expires_in: Optional[str] = FieldInfo(alias="expiresIn", default=None)

redirects_to: Optional[str] = FieldInfo(alias="redirectsTo", default=None)
10 changes: 8 additions & 2 deletions src/supermemory/types/connection_delete_by_id_response.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List
from typing_extensions import TypeAlias

from .._models import BaseModel

__all__ = ["ConnectionDeleteByIDResponse"]
__all__ = ["ConnectionDeleteByIDResponse", "ConnectionDeleteByIDResponseItem"]


class ConnectionDeleteByIDResponse(BaseModel):
class ConnectionDeleteByIDResponseItem(BaseModel):
id: str

provider: str


ConnectionDeleteByIDResponse: TypeAlias = List[ConnectionDeleteByIDResponseItem]
10 changes: 8 additions & 2 deletions src/supermemory/types/connection_delete_by_provider_response.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List
from typing_extensions import TypeAlias

from .._models import BaseModel

__all__ = ["ConnectionDeleteByProviderResponse"]
__all__ = ["ConnectionDeleteByProviderResponse", "ConnectionDeleteByProviderResponseItem"]


class ConnectionDeleteByProviderResponse(BaseModel):
class ConnectionDeleteByProviderResponseItem(BaseModel):
id: str

provider: str


ConnectionDeleteByProviderResponse: TypeAlias = List[ConnectionDeleteByProviderResponseItem]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class ConnectionListDocumentsResponseItem(BaseModel):
id: str
id: Optional[str] = None

created_at: str = FieldInfo(alias="createdAt")

Expand Down
8 changes: 8 additions & 0 deletions src/supermemory/types/document_batch_add_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ class Result(BaseModel):
error: Optional[str] = None
"""Error message when status is 'error'"""

url: Optional[str] = None
"""URL of the failed item, when it had one.

Only present on failed items, where it may be the only way to tell which input
the error belongs to (the id falls back to 'unknown' when the input had neither
an id nor a customId).
"""


class DocumentBatchAddResponse(BaseModel):
failed: float
Expand Down
9 changes: 9 additions & 0 deletions src/supermemory/types/document_list_processing_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ class Document(BaseModel):
id: str
"""Unique identifier of the document."""

connection_id: Optional[str] = FieldInfo(alias="connectionId", default=None)
"""Optional ID of connection the document was created from.

This is useful for identifying the source of the document.
"""

created_at: str = FieldInfo(alias="createdAt")
"""Creation timestamp"""

Expand All @@ -36,6 +42,9 @@ class Document(BaseModel):
status: Literal["unknown", "queued", "extracting", "chunking", "embedding", "indexing", "done", "failed"]
"""Status of the document"""

summary: Optional[str] = None
"""Summary of the document content"""

title: Optional[str] = None
"""Title of the document"""

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

from typing import Dict, List, Optional
from typing_extensions import Literal

from pydantic import Field as FieldInfo

from .._models import BaseModel

__all__ = ["ProfileResponse", "Profile", "SearchResults"]
__all__ = [
"ProfileResponse",
"Profile",
"SearchResults",
"SearchResultsResult",
"SearchResultsResultChunk",
"SearchResultsResultContext",
"SearchResultsResultContextChild",
"SearchResultsResultContextParent",
"SearchResultsResultContextRelated",
"SearchResultsResultDocument",
]


class Profile(BaseModel):
Expand All @@ -20,10 +32,158 @@ class Profile(BaseModel):
"""Static profile information that remains relevant long-term"""


class SearchResultsResultChunk(BaseModel):
content: str
"""Content of the chunk"""

document_id: str = FieldInfo(alias="documentId")
"""ID of the document this chunk belongs to"""

position: float
"""Position of chunk in the document (0-indexed)"""


class SearchResultsResultContextChild(BaseModel):
memory: str
"""The contextual memory content"""

relation: Literal["updates", "extends", "derives"]
"""Relation type between this memory and its parent/child"""

updated_at: str = FieldInfo(alias="updatedAt")
"""Contextual memory last update date"""

metadata: Optional[Dict[str, object]] = None
"""Contextual memory metadata"""

version: Optional[float] = None
"""
Relative version distance from the primary memory (+1 for direct child, +2 for
grand-child, etc.)
"""


class SearchResultsResultContextParent(BaseModel):
memory: str
"""The contextual memory content"""

relation: Literal["updates", "extends", "derives"]
"""Relation type between this memory and its parent/child"""

updated_at: str = FieldInfo(alias="updatedAt")
"""Contextual memory last update date"""

metadata: Optional[Dict[str, object]] = None
"""Contextual memory metadata"""

version: Optional[float] = None
"""
Relative version distance from the primary memory (-1 for direct parent, -2 for
grand-parent, etc.)
"""


class SearchResultsResultContextRelated(BaseModel):
memory: str
"""The related memory content"""

relation: Literal["extends", "derives"]
"""Relation type"""

updated_at: str = FieldInfo(alias="updatedAt")
"""Related memory last update date"""

metadata: Optional[Dict[str, object]] = None
"""Related memory metadata"""


class SearchResultsResultContext(BaseModel):
"""
Object containing version history (parents/children via updates) and related memories (extends/derives)
"""

children: Optional[List[SearchResultsResultContextChild]] = None

parents: Optional[List[SearchResultsResultContextParent]] = None

related: Optional[List[SearchResultsResultContextRelated]] = None


class SearchResultsResultDocument(BaseModel):
id: str
"""Document ID"""

created_at: str = FieldInfo(alias="createdAt")
"""Document creation date"""

updated_at: str = FieldInfo(alias="updatedAt")
"""Document last update date"""

metadata: Optional[Dict[str, object]] = None
"""Document metadata (only included when documents=true)"""

summary: Optional[str] = None
"""Document summary (only included when summaries=true)"""

title: Optional[str] = None
"""Document title (only included when documents=true)"""

type: Optional[str] = None
"""Document type (only included when documents=true)"""


class SearchResultsResult(BaseModel):
id: str
"""Memory entry ID or chunk ID"""

metadata: Optional[Dict[str, object]] = None
"""Memory metadata"""

similarity: float
"""Similarity score between the query and memory entry"""

updated_at: str = FieldInfo(alias="updatedAt")
"""Memory last update date"""

chunk: Optional[str] = None
"""The chunk content (only present for chunk results from hybrid search)"""

chunks: Optional[List[SearchResultsResultChunk]] = None
"""Relevant chunks from associated documents (only included when chunks=true)"""

context: Optional[SearchResultsResultContext] = None
"""
Object containing version history (parents/children via updates) and related
memories (extends/derives)
"""

documents: Optional[List[SearchResultsResultDocument]] = None
"""Associated documents for this memory entry"""

filepath: Optional[str] = None
"""Filepath of the source document this memory or chunk came from"""

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)"""

root_memory_id: Optional[str] = FieldInfo(alias="rootMemoryId", default=None)
"""ID of the root (first version) memory entry this one descends from.

Null for memories that have never been superseded. Only present on memory
results, not on standalone chunk results.
"""

version: Optional[float] = None
"""Version number of this memory entry"""


class SearchResults(BaseModel):
"""Search results if a search query was provided"""

results: List[object]
results: List[SearchResultsResult]
"""Search results for the provided query"""

timing: float
Expand Down
7 changes: 7 additions & 0 deletions src/supermemory/types/search_documents_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ class ResultChunk(BaseModel):
is_relevant: bool = FieldInfo(alias="isRelevant")
"""Whether this chunk is relevant to the query"""

position: float
"""Position of this chunk within the source document (0-indexed).

Use it to order chunks and to locate surrounding context chunks
(isRelevant=false) relative to the matching ones.
"""

score: float
"""Similarity score for this chunk"""

Expand Down
7 changes: 7 additions & 0 deletions src/supermemory/types/search_execute_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ class ResultChunk(BaseModel):
is_relevant: bool = FieldInfo(alias="isRelevant")
"""Whether this chunk is relevant to the query"""

position: float
"""Position of this chunk within the source document (0-indexed).

Use it to order chunks and to locate surrounding context chunks
(isRelevant=false) relative to the matching ones.
"""

score: float
"""Similarity score for this chunk"""

Expand Down
10 changes: 7 additions & 3 deletions src/supermemory/types/search_memories_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ class ResultChunk(BaseModel):
position: float
"""Position of chunk in the document (0-indexed)"""

score: float
"""Similarity score between the query and chunk"""


class ResultContextChild(BaseModel):
memory: str
Expand Down Expand Up @@ -159,6 +156,13 @@ class Result(BaseModel):
memory: Optional[str] = None
"""The memory content (only present for memory results)"""

root_memory_id: Optional[str] = FieldInfo(alias="rootMemoryId", default=None)
"""ID of the root (first version) memory entry this one descends from.

Null for memories that have never been superseded. Only present on memory
results, not on standalone chunk results.
"""

version: Optional[float] = None
"""Version number of this memory entry"""

Expand Down