SDKs changes.

TypeScript and Python SDK updates for Supermemory developers.

MCP retries instead of signing you out during an auth outage#

A brief authentication outage used to return invalid_token, the protocol signal to discard your credential, so every connected MCP client was logged out. Those requests now return 503 with Retry-After so clients wait and retry.

Improvements

  • withSupermemory in @supermemory/tools now takes an apiKey option instead of only reading the environment variable, so it works with secrets managers, edge runtimes, and per-request keys.
  • The ai-sdk package re-exports PromptTemplate, MemoryPromptData, and WithSupermemoryOptions, so the documented custom-template example compiles.

Fixes

  • Search and graph tools now bound their page and limit inputs, and whoAmI no longer returns the transport session id.

withSupermemory now takes the key directly, so it works with a secrets manager, an edge runtime, or a different key per request:

import { withSupermemory } from "@supermemory/tools/ai-sdk"

const model = withSupermemory(openai("gpt-5.6"), "user-123", {
  apiKey: process.env.MY_VAULT_KEY,
})

Requires @supermemory/tools 2.2.0 or later:

npm install @supermemory/tools@latest

Backfill historical documents with documentDate on ingest#

Set documentDate on each document so historical content lands on the date it actually happened instead of the date you uploaded it, which is what makes time-based search work on backfilled data.

Improvements

  • A new guide walks through backfilling dated documents through the batch ingestion API, with TypeScript and Python examples.

Fixes

  • Fixed an issue where SDK responses dropped fields the API returned, across 15 endpoints.

Send up to 600 documents per request to POST /v3/documents/batch, sorted oldest to newest:

{
  "documents": [
    {
      "id": "msg-2019-04-02-118",
      "content": "Decided to move the billing cutover to Q3.",
      "documentDate": "2019-04-02T09:15:00Z"
    }
  ]
}

Without documentDate a backfilled document is dated the day you uploaded it, so a question like "what did we decide in 2019" will not find it.

Codex plugin routes memories into project Spaces#

Codex can organize captured work into custom memory containers and keep project Spaces named from the context it sees.

Fixes

  • Fixed the Python OpenAI SDK injecting an empty system prompt when no memories were found.

Persistent memory plugin for OpenAI Codex#

Install the Codex plugin to recall project and user memory, capture completed sessions, and explicitly search or save context.

Fixes

  • The AI SDK wrapper now continues without memory when retrieval fails or exceeds five seconds.