For more information, see the full updated references at

Python SDK

Installation

# install from PyPI
pip install --pre supermemory

Usage

import os
from supermemory import Supermemory

client = supermemory(
    api_key=os.environ.get("SUPERMEMORY_API_KEY"),  # This is the default and can be omitted
)

response = client.search.documents(
    q="documents related to python",
)
print(response.results)

JavaScript SDK

Installation

npm install supermemory

Usage

import supermemory from 'supermemory';

const client = new supermemory({
  apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.search.documents({ q: 'documents related to python' });

  console.debug(response.results);
}

main();