From 90fd19f2156e28845d9288ea8ffc2d7d9573b77a Mon Sep 17 00:00:00 2001 From: Dhravya Shah Date: Sat, 13 Sep 2025 22:09:40 -0700 Subject: update: Readme --- apps/docs/.cursor/rules/docs.mdc | 84 ----- apps/docs/README.md | 1 - apps/docs/changelog/overview.mdx | 57 --- apps/docs/deployment/self-hosting.mdx | 243 ------------- apps/docs/docs.json | 180 ---------- apps/docs/favicon.png | Bin 616 -> 0 bytes ...enshot 2025-06-19 at 3.50.20\342\200\257PM.png" | Bin 231007 -> 0 bytes ...ot 2025-07-05 at 7.16.18\342\200\257PM (2).png" | Bin 421664 -> 0 bytes ...ot 2025-07-05 at 7.16.18\342\200\257PM (3).png" | Bin 337361 -> 0 bytes ...enshot 2025-07-05 at 7.16.18\342\200\257PM.png" | Bin 875873 -> 0 bytes ...ot 2025-07-05 at 7.16.22\342\200\257PM (2).png" | Bin 421664 -> 0 bytes ...ot 2025-07-05 at 7.16.22\342\200\257PM (3).png" | Bin 337361 -> 0 bytes ...enshot 2025-07-05 at 7.16.22\342\200\257PM.png" | Bin 931134 -> 0 bytes apps/docs/images/connectors-flow.png | Bin 244657 -> 0 bytes apps/docs/images/dev-platform-api-keys.png | Bin 243273 -> 0 bytes apps/docs/images/dev-platform-copy-key.png | Bin 310420 -> 0 bytes apps/docs/images/dev-platform-create-key.png | Bin 266661 -> 0 bytes apps/docs/images/dev-platform-login.png | Bin 582506 -> 0 bytes apps/docs/images/hero-dark.svg | 32 -- apps/docs/images/hero-light.svg | 32 -- apps/docs/images/infinite-context.png | Bin 166927 -> 0 bytes apps/docs/images/opts/Connectors.png | Bin 4164691 -> 0 bytes apps/docs/images/opts/Memory_API.png | Bin 4238814 -> 0 bytes apps/docs/images/opts/Model_Enhancer.png | Bin 4171436 -> 0 bytes apps/docs/images/opts/Supermemory_MCP.png | Bin 4332671 -> 0 bytes apps/docs/images/processing.png | Bin 185976 -> 0 bytes apps/docs/images/query-rewriting.png | Bin 108119 -> 0 bytes apps/docs/images/rerank.png | Bin 28925 -> 0 bytes apps/docs/images/sm-header.png | Bin 418889 -> 0 bytes apps/docs/images/transparent-proxy.png | Bin 96775 -> 0 bytes apps/docs/introduction.mdx | 66 ---- apps/docs/logo/dark.svg | 1 - apps/docs/logo/light.svg | 1 - .../connectors/advanced/bring-your-own-key.mdx | 138 -------- .../memory-api/connectors/creating-connection.mdx | 85 ----- apps/docs/memory-api/connectors/google-drive.mdx | 27 -- apps/docs/memory-api/connectors/overview.mdx | 26 -- apps/docs/memory-api/creation/adding-memories.mdx | 389 -------------------- apps/docs/memory-api/creation/status.mdx | 14 - apps/docs/memory-api/features/auto-multi-modal.mdx | 181 ---------- apps/docs/memory-api/features/content-cleaner.mdx | 86 ----- apps/docs/memory-api/features/filtering.mdx | 266 -------------- apps/docs/memory-api/features/query-rewriting.mdx | 50 --- apps/docs/memory-api/features/reranking.mdx | 44 --- apps/docs/memory-api/introduction.mdx | 43 --- apps/docs/memory-api/overview.mdx | 161 --------- apps/docs/memory-api/sdks/python.mdx | 349 ------------------ apps/docs/memory-api/sdks/typescript.mdx | 391 --------------------- .../memory-api/searching/searching-memories.mdx | 138 -------- apps/docs/model-enhancement/context-extender.mdx | 233 ------------ apps/docs/model-enhancement/getting-started.mdx | 101 ------ apps/docs/model-enhancement/identifying-users.mdx | 119 ------- apps/docs/overview/use-cases.mdx | 110 ------ apps/docs/overview/why-supermemory.mdx | 67 ---- apps/docs/snippets/getting-api-key.mdx | 34 -- apps/docs/supermemory-mcp/introduction.mdx | 74 ---- apps/docs/supermemory-mcp/setup.mdx | 67 ---- apps/docs/supermemory-mcp/technology.mdx | 48 --- packages/ai-sdk/README.md | 79 ++--- packages/tools/README.md | 10 +- 60 files changed, 41 insertions(+), 3986 deletions(-) delete mode 100644 apps/docs/.cursor/rules/docs.mdc delete mode 100644 apps/docs/README.md delete mode 100644 apps/docs/changelog/overview.mdx delete mode 100644 apps/docs/deployment/self-hosting.mdx delete mode 100644 apps/docs/docs.json delete mode 100644 apps/docs/favicon.png delete mode 100644 "apps/docs/images/Screenshot 2025-06-19 at 3.50.20\342\200\257PM.png" delete mode 100644 "apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (2).png" delete mode 100644 "apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (3).png" delete mode 100644 "apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM.png" delete mode 100644 "apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (2).png" delete mode 100644 "apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (3).png" delete mode 100644 "apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM.png" delete mode 100644 apps/docs/images/connectors-flow.png delete mode 100644 apps/docs/images/dev-platform-api-keys.png delete mode 100644 apps/docs/images/dev-platform-copy-key.png delete mode 100644 apps/docs/images/dev-platform-create-key.png delete mode 100644 apps/docs/images/dev-platform-login.png delete mode 100644 apps/docs/images/hero-dark.svg delete mode 100644 apps/docs/images/hero-light.svg delete mode 100644 apps/docs/images/infinite-context.png delete mode 100644 apps/docs/images/opts/Connectors.png delete mode 100644 apps/docs/images/opts/Memory_API.png delete mode 100644 apps/docs/images/opts/Model_Enhancer.png delete mode 100644 apps/docs/images/opts/Supermemory_MCP.png delete mode 100644 apps/docs/images/processing.png delete mode 100644 apps/docs/images/query-rewriting.png delete mode 100644 apps/docs/images/rerank.png delete mode 100644 apps/docs/images/sm-header.png delete mode 100644 apps/docs/images/transparent-proxy.png delete mode 100644 apps/docs/introduction.mdx delete mode 100644 apps/docs/logo/dark.svg delete mode 100644 apps/docs/logo/light.svg delete mode 100644 apps/docs/memory-api/connectors/advanced/bring-your-own-key.mdx delete mode 100644 apps/docs/memory-api/connectors/creating-connection.mdx delete mode 100644 apps/docs/memory-api/connectors/google-drive.mdx delete mode 100644 apps/docs/memory-api/connectors/overview.mdx delete mode 100644 apps/docs/memory-api/creation/adding-memories.mdx delete mode 100644 apps/docs/memory-api/creation/status.mdx delete mode 100644 apps/docs/memory-api/features/auto-multi-modal.mdx delete mode 100644 apps/docs/memory-api/features/content-cleaner.mdx delete mode 100644 apps/docs/memory-api/features/filtering.mdx delete mode 100644 apps/docs/memory-api/features/query-rewriting.mdx delete mode 100644 apps/docs/memory-api/features/reranking.mdx delete mode 100644 apps/docs/memory-api/introduction.mdx delete mode 100644 apps/docs/memory-api/overview.mdx delete mode 100644 apps/docs/memory-api/sdks/python.mdx delete mode 100644 apps/docs/memory-api/sdks/typescript.mdx delete mode 100644 apps/docs/memory-api/searching/searching-memories.mdx delete mode 100644 apps/docs/model-enhancement/context-extender.mdx delete mode 100644 apps/docs/model-enhancement/getting-started.mdx delete mode 100644 apps/docs/model-enhancement/identifying-users.mdx delete mode 100644 apps/docs/overview/use-cases.mdx delete mode 100644 apps/docs/overview/why-supermemory.mdx delete mode 100644 apps/docs/snippets/getting-api-key.mdx delete mode 100644 apps/docs/supermemory-mcp/introduction.mdx delete mode 100644 apps/docs/supermemory-mcp/setup.mdx delete mode 100644 apps/docs/supermemory-mcp/technology.mdx diff --git a/apps/docs/.cursor/rules/docs.mdc b/apps/docs/.cursor/rules/docs.mdc deleted file mode 100644 index 6c2516e2..00000000 --- a/apps/docs/.cursor/rules/docs.mdc +++ /dev/null @@ -1,84 +0,0 @@ ---- -description: -globs: -alwaysApply: true ---- -# Documentation MDX Format - -All documentation files use MDX format with a specific structure: - -## Frontmatter - -Every documentation file must begin with frontmatter: - -```mdx ---- -title: "Page Title" -description: "Brief description of the page content" -icon: "icon-name" # Optional, uses Lucide icons -sidebarTitle: "Optional Sidebar Title" # Optional ---- -``` - -Example: @features/query-rewriting.mdx - -## Components - -Use the following components to enhance documentation: - -### Accordion - -For collapsible sections: - -```mdx - - Content goes here... - -``` - -Example: @creation/supported-types.mdx - -### Notes and Warnings - -For important information: - -```mdx - - Important information goes here. - - - - Critical warning goes here. - -``` - -Example: @creation/adding-memories.mdx - -### Code Examples - -For multi-language code examples: - -```mdx - - -```bash cURL -curl https://api.supermemory.ai/v3/endpoint \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' -``` - -```typescript Typescript -await client.method({ - parameter: "value" -}) -``` - -```python Python -client.method( - parameter="value" -) -``` - - -``` - -Example: @essentials/authentication.mdx diff --git a/apps/docs/README.md b/apps/docs/README.md deleted file mode 100644 index 2c7ff641..00000000 --- a/apps/docs/README.md +++ /dev/null @@ -1 +0,0 @@ -# supermemory Docs \ No newline at end of file diff --git a/apps/docs/changelog/overview.mdx b/apps/docs/changelog/overview.mdx deleted file mode 100644 index 8dec3cd7..00000000 --- a/apps/docs/changelog/overview.mdx +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "Product Updates" -description: "New updates and improvements" -mode: "center" ---- - - - - **Enhanced Documentation:** Comprehensive API references with detailed examples - - **Developer Platform Improvements:** Fully revamped developer experience - - **Reliability:** Significantly reduced error rates - - **Categories Support:** New categorization system for better content organization - - **Custom Document Cleaning:** Advanced controls for document processing - - **Auto Content Type Detection:** Improved content handling across formats - - - - - **Google Drive Provider:** Added support for Google Drive provider. - - - - - **Optional summaries in search:** Choose to include document summaries in your search results. - - **Better document ranking:** Document similarity scoring is now more accurate. - - - - - **Improved scoring:** Our scoring was previously too low for every document due to fused ranking methods. This is now much better, and you'll see a better distribution of rankings. - - **Chunk and Document thresholds:** You can now set your own thresholds in the search body for more control. - - **Smaller chunk sizes:** Chunk sizes are now more sensible and generally smaller. - - **onlyMatchingChunks works as expected:** This now removes all context chunks with a score of 0 (previously added for chatbot context). Let us know if you notice any issues! - - **Intra-document chunk querying:** You can now query within the chunks of a single document for more focused results. - - - - - **Query rewriting:** We now rewrite queries for better search results and intent matching. - - **User profiling:** Personalized search results based on user profiles. - - - - - **Completely revamped ingestion pipeline:** Now works perfectly for images, videos, and PDFs—even if the links don’t end with .pdf or image extensions. We automatically fetch and parse the content! - - **Website ingestion:** Website links are now much more stable and reliable. - - - - - **Teams in dashboard:** Invite team members with permission control! - - **Advanced analytics:** Better analytics and observability. - - **Faster ingestion and search:** Even faster search experience. - - **Higher reliability for website URL ingestion.** - - **supermemory MCP!** - - **Unreleased v1 landing page!** - - - - - You can now search for memories in multiple spaces at once. - - All endpoints have been updated to `/v1` for better versioning - - Improved documentation and examples - - Interactive [API Playground](https://supermemory.ai/docs/api-reference) - \ No newline at end of file diff --git a/apps/docs/deployment/self-hosting.mdx b/apps/docs/deployment/self-hosting.mdx deleted file mode 100644 index 7f7db4d3..00000000 --- a/apps/docs/deployment/self-hosting.mdx +++ /dev/null @@ -1,243 +0,0 @@ ---- -title: 'Self Hosting' -description: 'Deploy your own instance of the supermemory API on Cloudflare Workers' ---- - - -This guide is intended for **enterprise customers only** who have specifically opted for self-hosting as part of their enterprise plan. If you're on a standard plan, please use our hosted API at [console.supermemory.ai](https://console.supermemory.ai). - - -## Prerequisites - -Before you start, you'll need to gather several API keys and set up accounts with various services. This comprehensive guide will walk you through obtaining each required component. - -### Enterprise Deployment Package - -Your enterprise deployment package is provided by the supermemory team and contains: -- Your unique Host ID (`NEXT_PUBLIC_HOST_ID`) -- The compiled JavaScript bundle -- The deployment script - -Contact your supermemory enterprise representative to receive your deployment package. - -### Cloudflare - - -#### Create Account - -1. Go to [cloudflare.com](https://dash.cloudflare.com/sign-up) and create an account -3. Your **Account ID** is the long randon string in the URL bar - -#### Create API Token - -1. Navigate to [Cloudflare API Tokens](https://dash.cloudflare.com/?to=/:account/api-tokens) -2. Click **"Create Token"** -3. Use the **"Custom token"** template -4. Configure the token with these permissions: - - **Account:AI Gateway:Edit** - - **Account:Hyperdrive:Edit** - - **Account:Workers KV Storage:Edit** - - **Account:Workers R2 Storage:Edit** -7. Click **"Continue to summary"** → **"Create Token"** -8. **Important**: Copy and securely store the token immediately (it won't be shown again) - -#### Enable Workers - -1. In your Cloudflare dashboard, go to **Workers & Pages** -2. If prompted, accept the Workers terms of service -3. Choose a subdomain for your workers (e.g., `yourcompany.workers.dev`) - -Your `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` are now ready. - -### Database - -You'll need to provide a PostgreSQL connection string via the `DATABASE_URL` environment variable. - -The database must: -- Support the **pgvector extension** for vector operations -- Be accessible from Cloudflare Workers -- Support SSL connections -- Allow connections from Cloudflare's IP ranges - -Your connection string should follow this format: -``` -postgresql://username:password@hostname:port/database -``` - -### LLM Providers - -#### OpenAI - -1. Go to [platform.openai.com](https://platform.openai.com) -2. Sign in or create an account -3. Navigate to **API Keys** in the left sidebar -4. Click **"Create new secret key"** -5. Name your key (e.g., "supermemory Self-Hosted") -6. Copy the key and store it securely -7. Add billing information if you haven't already - -#### Anthropic - -1. Go to [console.anthropic.com](https://console.anthropic.com) -2. Create an account and complete verification -3. Navigate to **API Keys** -4. Click **"Create Key"** -5. Name your key and copy it securely - -#### Gemini - -1. Go to [Google AI Studio](https://aistudio.google.com) -2. Sign in with your Google account -3. Click **"Get API key"** → **"Create API key"** -4. Choose an existing Google Cloud project or create a new one -5. Copy your API key - -#### Groq - -1. Go to [console.groq.com](https://console.groq.com) -2. Sign up for an account -3. Navigate to **API Keys** -4. Click **"Create API Key"** -5. Name your key and copy it - - - -{/* TODO: Add OAuth documentation */} -{/* ### Authentication Providers -#### GitHub OAuth (Optional) - -1. Go to [GitHub Developer Settings](https://github.com/settings/developers) -2. Click **"New OAuth App"** -3. Fill in the application details: - - **Application name**: Your app name - - **Homepage URL**: Your API domain (e.g., `https://api.yourdomain.com`) - - **Authorization callback URL**: `https://api.yourdomain.com/api/auth/callback/github` -4. Click **"Register application"** -5. Note the **Client ID** and generate a **Client Secret** -6. Use these for `AUTH_GITHUB_ID` and `AUTH_GITHUB_SECRET` - -#### Google OAuth (Optional) - -1. Go to [Google Cloud Console](https://console.cloud.google.com) -2. Create a new project or select an existing one -3. Enable the **Google+ API** -4. Go to **Credentials** → **Create Credentials** → **OAuth client ID** -5. Choose **Web application** -6. Add your domain to **Authorized JavaScript origins** -7. Add `https://api.yourdomain.com/api/auth/callback/google` to **Authorized redirect URIs** -8. Copy the **Client ID** and **Client secret** -9. Use these for `AUTH_GOOGLE_ID` and `AUTH_GOOGLE_SECRET` */} - -### Email Service Setup - -#### Resend - -1. Go to [resend.com](https://resend.com) and create an account -2. Navigate to **API Keys** -3. Click **"Create API Key"** -4. Name your key (e.g., "supermemory Production") -5. Copy the key for `RESEND_API_KEY` -6. Verify your sending domain in the **Domains** section - -### Connectors (Optional) - -#### Google Drive - -1. Go to [Google Cloud Console](https://console.cloud.google.com) -2. Create or select a project -3. Enable the **Google Drive API** -4. Go to **Credentials** → **Create Credentials** → **OAuth client ID** -5. Configure the OAuth consent screen if required -6. Choose **Web application** -7. Add authorized redirect URIs for your domain -8. Copy `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` - -#### Microsoft OneDrive - -1. Go to [Azure Portal](https://portal.azure.com) -2. Navigate to **Microsoft Entra ID** → **App registrations** -3. Click **"New registration"** -4. Name your app and set redirect URI -5. Go to **Certificates & secrets** → **New client secret** -6. Copy the **Application (client) ID** and **Client secret** -7. Use for `MICROSOFT_CLIENT_ID` and `MICROSOFT_CLIENT_SECRET` - -#### Notion - -1. Go to [Notion Developers](https://developers.notion.com) -2. Click **"Create new integration"** -3. Fill in the integration details -4. Copy the **Internal Integration Token** -5. Set up OAuth if needed for user connections -6. Use for `NOTION_CLIENT_ID` and `NOTION_CLIENT_SECRET` - ---- - -## Setup deployment files - -Extract the deployment package provided by the supermemory team to your preferred directory: - -```bash -# Extract the deployment package -$ unzip supermemory-enterprise-deployment.zip -$ cd supermemory-deployment -``` - ---- - -## Configure environment variables - -The deployment script reads **all** environment variables from your shell at runtime. We ship an example file that lists the full set supported by the worker. - -```bash -# Copy the template and start editing -$ cp packages/alchemy/env.example .env - -# Open the file in your editor of choice and fill in the blanks -$ $EDITOR .env -``` - -Below is a quick reference. -**Required** values are mandatory for a successful deploy – leave optional ones empty if you don't need the related feature. - -| Name | Required? | Description | -|------|-----------|-------------| -| `NODE_ENV` | ✅ | `development`, `staging` or `production`. | -| `NEXT_PUBLIC_HOST_ID` | ✅ | Your unique Host ID provided by the supermemory team. | -| `BETTER_AUTH_SECRET` | ✅ | Random 32-byte string – run `openssl rand -base64 32`. | -| `BETTER_AUTH_URL` | ✅ | Public base URL for the API (no trailing `/`). Example: `https://api.example.com`. | -| `DATABASE_URL` | ✅ | Postgres connection string (e.g. `postgres://user:pass@host:5432/db`). | -| `CLOUDFLARE_ACCOUNT_ID` | ✅ | Your Cloudflare account ID. | -| `CLOUDFLARE_API_TOKEN` | ✅ | Token created in *Prerequisites*. | -| `OPENAI_API_KEY` | ✅ | Key from [platform.openai.com](https://platform.openai.com). | -| `RESEND_API_KEY` | ✅ | E-mail provider key if you plan to send e-mails. | -| `ANTHROPIC_API_KEY` | | Needed to use Claude models. | -| `GEMINI_API_KEY` | | Key for Google Gemini models. | -| `GROQ_API_KEY` | | Key for Groq models. | -| `AUTH_GITHUB_ID` / `AUTH_GITHUB_SECRET` | | Enable GitHub OAuth login. | -| `AUTH_GOOGLE_ID` / `AUTH_GOOGLE_SECRET` | | Enable Google OAuth login. | -| `GOOGLE_CLIENT_ID` / `GOOGLE_CLIENT_SECRET` | | Needed for Google Drive connector. | -| `MICROSOFT_CLIENT_ID` / `MICROSOFT_CLIENT_SECRET` | | Needed for OneDrive connector. | -| `NOTION_CLIENT_ID` / `NOTION_CLIENT_SECRET` | | Needed for Notion connector. | -| `CLOUDFLARE_AI_GATEWAY_NAME` / `CLOUDFLARE_AI_GATEWAY_TOKEN` | | Only if you want to route requests through an AI Gateway. | -| `SENTRY_DSN` | | If you use Sentry for error reporting. | - ---- - -## Deploy - -With your `.env` in place, run the deployment script: - -```bash -# Run the deployment script provided in your package -$ bun ./deploy.ts -``` - - ---- - -## Updating Your Deployment - -To update your supermemory deployment, follow the same process as the initial deployment described in the **Deploy** section above. You can reuse your existing `.env` file and add/remove any new environment variables as needed. - ---- \ No newline at end of file diff --git a/apps/docs/docs.json b/apps/docs/docs.json deleted file mode 100644 index f62ff599..00000000 --- a/apps/docs/docs.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "$schema": "https://mintlify.com/docs.json", - "api": { - "examples": { - "defaults": "required", - "languages": ["javascript", "python", "curl"] - }, - "openapi": "https://localhost:8787/v3/openapi" - }, - "colors": { - "dark": "#1E3A8A", - "light": "#3B82F6", - "primary": "#1E3A8A" - }, - "contextual": { - "options": ["copy", "view", "chatgpt", "claude"] - }, - "favicon": "/favicon.png", - "fonts": { - "body": { - "family": "Space Grotesk", - "format": "woff2" - }, - "heading": { - "family": "Space Grotesk", - "format": "woff2" - } - }, - "footer": { - "socials": { - "github": "https://github.com/supermemoryai", - "linkedin": "https://linkedin.com/company/supermemoryai", - "x": "https://x.com/supermemoryai" - } - }, - "icons": { "library": "lucide" }, - "logo": { - "dark": "/logo/dark.svg", - "light": "/logo/light.svg" - }, - "name": "supermemory | Memory API for the AI era", - "navbar": { - "links": [ - { - "href": "mailto:dhravya@supermemory.com", - "label": "Support" - } - ], - "primary": { - "href": "https://console.supermemory.ai", - "label": "Dashboard", - "type": "button" - } - }, - "navigation": { - "tabs": [ - { - "pages": ["introduction"], - "tab": "Welcome" - }, - { - "anchors": [ - { - "anchor": "Your Dashboard", - "href": "https://console.supermemory.ai", - "icon": "play" - }, - { - "anchor": "Documentation", - "pages": [ - { - "group": "Memory API", - "pages": [ - "memory-api/introduction", - "memory-api/overview", - "memory-api/creation/adding-memories", - "memory-api/searching/searching-memories", - { - "group": "Features", - "pages": [ - "memory-api/features/auto-multi-modal", - "memory-api/features/filtering", - "memory-api/features/content-cleaner", - "memory-api/features/query-rewriting", - "memory-api/features/reranking" - ] - }, - { - "group": "Connectors Sync", - "pages": [ - "memory-api/connectors/overview", - "memory-api/connectors/creating-connection", - "api-reference/connections/list-connections", - "api-reference/connections/delete-connection", - "/api-reference/connections/sync-connection", - "memory-api/connectors/google-drive", - { - "group": "Advanced", - "pages": [ - "memory-api/connectors/advanced/bring-your-own-key" - ] - } - ] - } - ] - }, - { - "group": "Model Enhancer", - "pages": [ - "model-enhancement/context-extender", - "model-enhancement/getting-started", - "model-enhancement/identifying-users" - ] - }, - { - "group": "Overview", - "pages": ["overview/use-cases", "overview/why-supermemory"] - }, - { - "group": "Deployment", - "pages": ["deployment/self-hosting"] - } - ] - } - ], - "tab": "Documentation" - }, - { - "anchors": [ - { - "anchor": "SDKs", - "pages": ["memory-api/sdks/typescript", "memory-api/sdks/python"] - } - ], - "tab": "SDKs" - }, - { - "anchors": [ - { - "anchor": "API Reference", - "icon": "unplug", - "openapi": "https://localhost:8787/v3/openapi" - } - ], - "tab": "API Reference" - }, - { - "anchors": [ - { - "anchor": "supermemory MCP", - "pages": [ - "supermemory-mcp/introduction", - "supermemory-mcp/setup", - "supermemory-mcp/technology" - ] - } - ], - "tab": "supermemory MCP" - }, - { - "anchors": [ - { - "anchor": "Changelog", - "pages": ["changelog/overview"] - } - ], - "tab": "Changelog" - } - ] - }, - "redirects": [ - { - "destination": "/introduction", - "permanent": false, - "source": "/" - } - ], - "styling": { "eyebrows": "breadcrumbs" }, - "theme": "mint" -} diff --git a/apps/docs/favicon.png b/apps/docs/favicon.png deleted file mode 100644 index 4c3dd878..00000000 Binary files a/apps/docs/favicon.png and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-06-19 at 3.50.20\342\200\257PM.png" "b/apps/docs/images/Screenshot 2025-06-19 at 3.50.20\342\200\257PM.png" deleted file mode 100644 index 4e110427..00000000 Binary files "a/apps/docs/images/Screenshot 2025-06-19 at 3.50.20\342\200\257PM.png" and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (2).png" "b/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (2).png" deleted file mode 100644 index 12141246..00000000 Binary files "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (2).png" and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (3).png" "b/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (3).png" deleted file mode 100644 index a278db3e..00000000 Binary files "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM (3).png" and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM.png" "b/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM.png" deleted file mode 100644 index 7b265488..00000000 Binary files "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18\342\200\257PM.png" and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (2).png" "b/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (2).png" deleted file mode 100644 index 12141246..00000000 Binary files "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (2).png" and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (3).png" "b/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (3).png" deleted file mode 100644 index a278db3e..00000000 Binary files "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM (3).png" and /dev/null differ diff --git "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM.png" "b/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM.png" deleted file mode 100644 index 4c853197..00000000 Binary files "a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22\342\200\257PM.png" and /dev/null differ diff --git a/apps/docs/images/connectors-flow.png b/apps/docs/images/connectors-flow.png deleted file mode 100644 index bcee681c..00000000 Binary files a/apps/docs/images/connectors-flow.png and /dev/null differ diff --git a/apps/docs/images/dev-platform-api-keys.png b/apps/docs/images/dev-platform-api-keys.png deleted file mode 100644 index 011689ca..00000000 Binary files a/apps/docs/images/dev-platform-api-keys.png and /dev/null differ diff --git a/apps/docs/images/dev-platform-copy-key.png b/apps/docs/images/dev-platform-copy-key.png deleted file mode 100644 index 5e9039cb..00000000 Binary files a/apps/docs/images/dev-platform-copy-key.png and /dev/null differ diff --git a/apps/docs/images/dev-platform-create-key.png b/apps/docs/images/dev-platform-create-key.png deleted file mode 100644 index 84df9637..00000000 Binary files a/apps/docs/images/dev-platform-create-key.png and /dev/null differ diff --git a/apps/docs/images/dev-platform-login.png b/apps/docs/images/dev-platform-login.png deleted file mode 100644 index 1ab67e4f..00000000 Binary files a/apps/docs/images/dev-platform-login.png and /dev/null differ diff --git a/apps/docs/images/hero-dark.svg b/apps/docs/images/hero-dark.svg deleted file mode 100644 index b2c2bcee..00000000 --- a/apps/docs/images/hero-dark.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/docs/images/hero-light.svg b/apps/docs/images/hero-light.svg deleted file mode 100644 index 4d347b2a..00000000 --- a/apps/docs/images/hero-light.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/docs/images/infinite-context.png b/apps/docs/images/infinite-context.png deleted file mode 100644 index 40ff670c..00000000 Binary files a/apps/docs/images/infinite-context.png and /dev/null differ diff --git a/apps/docs/images/opts/Connectors.png b/apps/docs/images/opts/Connectors.png deleted file mode 100644 index 615b01ff..00000000 Binary files a/apps/docs/images/opts/Connectors.png and /dev/null differ diff --git a/apps/docs/images/opts/Memory_API.png b/apps/docs/images/opts/Memory_API.png deleted file mode 100644 index 99550e83..00000000 Binary files a/apps/docs/images/opts/Memory_API.png and /dev/null differ diff --git a/apps/docs/images/opts/Model_Enhancer.png b/apps/docs/images/opts/Model_Enhancer.png deleted file mode 100644 index e5ffefac..00000000 Binary files a/apps/docs/images/opts/Model_Enhancer.png and /dev/null differ diff --git a/apps/docs/images/opts/Supermemory_MCP.png b/apps/docs/images/opts/Supermemory_MCP.png deleted file mode 100644 index 0d21e076..00000000 Binary files a/apps/docs/images/opts/Supermemory_MCP.png and /dev/null differ diff --git a/apps/docs/images/processing.png b/apps/docs/images/processing.png deleted file mode 100644 index dca6e4dd..00000000 Binary files a/apps/docs/images/processing.png and /dev/null differ diff --git a/apps/docs/images/query-rewriting.png b/apps/docs/images/query-rewriting.png deleted file mode 100644 index 9261c266..00000000 Binary files a/apps/docs/images/query-rewriting.png and /dev/null differ diff --git a/apps/docs/images/rerank.png b/apps/docs/images/rerank.png deleted file mode 100644 index b40c6461..00000000 Binary files a/apps/docs/images/rerank.png and /dev/null differ diff --git a/apps/docs/images/sm-header.png b/apps/docs/images/sm-header.png deleted file mode 100644 index f643a5ad..00000000 Binary files a/apps/docs/images/sm-header.png and /dev/null differ diff --git a/apps/docs/images/transparent-proxy.png b/apps/docs/images/transparent-proxy.png deleted file mode 100644 index 7dd34246..00000000 Binary files a/apps/docs/images/transparent-proxy.png and /dev/null differ diff --git a/apps/docs/introduction.mdx b/apps/docs/introduction.mdx deleted file mode 100644 index 6618be0d..00000000 --- a/apps/docs/introduction.mdx +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: "Introduction" -description: "supermemory is the Memory API for the AI era" -mode: "custom" ---- - -export const HeroCard = ({ imageUrl, title, description, href }) => { - return ( - -
- {title} -
-
-

{title}

-

{description}

-
-
- ) -} - -
- -
-

- supermemory [docs] -

- -

- Meet the memory API for the AI era — scalable, powerful, affordable, and production-ready. -

- -
- - - - - - - -
-
-
\ No newline at end of file diff --git a/apps/docs/logo/dark.svg b/apps/docs/logo/dark.svg deleted file mode 100644 index b3cfb8e8..00000000 --- a/apps/docs/logo/dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/docs/logo/light.svg b/apps/docs/logo/light.svg deleted file mode 100644 index b3cfb8e8..00000000 --- a/apps/docs/logo/light.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/docs/memory-api/connectors/advanced/bring-your-own-key.mdx b/apps/docs/memory-api/connectors/advanced/bring-your-own-key.mdx deleted file mode 100644 index 3d63cb46..00000000 --- a/apps/docs/memory-api/connectors/advanced/bring-your-own-key.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: 'Bring Your Own Key (BYOK)' -description: 'Configure your own OAuth application credentials for enhanced security and control' ---- - -By default, supermemory uses its own OAuth applications to connect to third-party providers. However, you can configure your own OAuth application credentials for enhanced security and control. This is particularly useful for enterprise customers who want to maintain control over their data access. - - - Some providers like Google Drive require extensive verification and approval before you can use custom keys. - - -### Setting up Custom Provider Keys - -To configure custom OAuth credentials for your organization, use the `PATCH /v3/settings` endpoint: - -1. Set up your OAuth application on the provider's developer console. - -Google: https://console.developers.google.com/apis/credentials/oauthclient \ -Notion: https://www.notion.so/my-integrations \ -OneDrive: https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsMenu - -2. If using Google drive, - -- Select the application type as `Web application` -- **Enable the Google drive api in "APIs and Services" in the Cloud Console** - -3. Configure the redirect URL, set it to: - -``` -https://api.supermemory.ai/v3/connections/auth/callback/{provider} -``` - -For example, if you are using Google Drive, the redirect URL would be: - -``` -https://api.supermemory.ai/v3/connections/auth/callback/google-drive -``` - -4. Configure the client ID and client secret in the `PATCH /v3/settings` endpoint. - - -```typescript Typescript -import Supermemory from 'supermemory'; - -const client = new Supermemory({ - apiKey: process.env['SUPERMEMORY_API_KEY'], -}); - -// Example: Configure Google Drive custom OAuth credentials -const settings = await client.settings.update({ - googleCustomKeyEnabled: true, - googleDriveClientId: "your-google-client-id", - googleDriveClientSecret: "your-google-client-secret" -}); - -// Example: Configure Notion custom OAuth credentials -const settings = await client.settings.update({ - notionCustomKeyEnabled: true, - notionClientId: "your-notion-client-id", - notionClientSecret: "your-notion-client-secret" -}); - -// Example: Configure OneDrive custom OAuth credentials -const settings = await client.settings.update({ - onedriveCustomKeyEnabled: true, - onedriveClientId: "your-onedrive-client-id", - onedriveClientSecret: "your-onedrive-client-secret" -}); -``` - -```python Python -from supermemory import supermemory - -client = supermemory( - api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted -) - -# Example: Configure Google Drive custom OAuth credentials -settings = client.settings.update( - google_custom_key_enabled=True, - google_client_id="your-google-client-id", - google_client_secret="your-google-client-secret" -) - -# Example: Configure Notion custom OAuth credentials -settings = client.settings.update( - notion_custom_key_enabled=True, - notion_client_id="your-notion-client-id", - notion_client_secret="your-notion-client-secret" -) - -# Example: Configure OneDrive custom OAuth credentials -settings = client.settings.update( - onedrive_custom_key_enabled=True, - onedrive_client_id="your-onedrive-client-id", - onedrive_client_secret="your-onedrive-client-secret" -) -``` - -```bash cURL -# Example: Configure Google Drive custom OAuth credentials -curl --request PATCH \ - --url https://api.supermemory.ai/v3/settings \ - --header 'Authorization: Bearer ' \ - --header 'Content-Type: application/json' \ - --data '{ - "googleDriveCustomKeyEnabled": true, - "googleDriveClientId": "your-google-client-id", - "googleDriveClientSecret": "your-google-client-secret" -}' - -# Example: Configure Notion custom OAuth credentials -curl --request PATCH \ - --url https://api.supermemory.ai/v3/settings \ - --header 'Authorization: Bearer ' \ - --header 'Content-Type: application/json' \ - --data '{ - "notionCustomKeyEnabled": true, - "notionClientId": "your-notion-client-id", - "notionClientSecret": "your-notion-client-secret" -}' - -# Example: Configure OneDrive custom OAuth credentials -curl --request PATCH \ - --url https://api.supermemory.ai/v3/settings \ - --header 'Authorization: Bearer ' \ - --header 'Content-Type: application/json' \ - --data '{ - "onedriveCustomKeyEnabled": true, - "onedriveClientId": "your-onedrive-client-id", - "onedriveClientSecret": "your-onedrive-client-secret" -}' -``` - - - - Once you enable custom keys for a provider, all new connections for that provider will use your custom OAuth application. Existing connections WILL need to be re-authorized. - \ No newline at end of file diff --git a/apps/docs/memory-api/connectors/creating-connection.mdx b/apps/docs/memory-api/connectors/creating-connection.mdx deleted file mode 100644 index 39abc47a..00000000 --- a/apps/docs/memory-api/connectors/creating-connection.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: 'Creating connections' -description: 'Create a connection to sync your content with supermemory' ---- - -To create a connection, just make a `POST` request to `/v3/connections/{provider}` - - -```typescript Typescript -import Supermemory from 'supermemory'; - -const client = new Supermemory({ - apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted -}); - -const connection = await client.connections.create('notion'); - -console.debug(connection.authLink); -``` - -```python Python -import requests - -url = "https://api.supermemory.ai/v3/connections/{provider}" - -payload = { - "redirectUrl": "", - "containerTags": [""], - "metadata": {}, - "documentLimit": 5000 -} -headers = { - "Authorization": "Bearer ", - "Content-Type": "application/json" -} - -response = requests.request("POST", url, json=payload, headers=headers) - -print(response.text) -``` - -```bash cURL -curl --request POST \ - --url https://api.supermemory.ai/v3/connections/{provider} \ - --header 'Authorization: Bearer ' \ - --header 'Content-Type: application/json' \ - --data '{ - "redirectUrl": "", - "containerTags": [ - "" - ], - "metadata": {}, - "documentLimit": 5000 -}' -``` - - -### Parameters - -- `provider`: The provider to connect to. Currently supported providers are `notion`, `google-drive`, `one-drive` -- `redirectUrl`: The URL to redirect to after the connection is created (your app URL) -- `containerTags`: Optional. For partitioning users, organizations, etc. in your app. - - Example: `["user_123", "project_alpha"]` -- `metadata`: Optional. Any metadata you want to associate with the connection. - - This metadata is added to every document synced from this connection. -- `documentLimit`: Optional. The maximum number of documents to sync from this connection. - - Default: 10,000 - - This can be used to limit costs and sync a set number of documents for a specific user. - - -## Response - -supermemory sends a response with the following schema: -```json -{ - "id": "", - "authLink": "", - "expiresIn": "", - "redirectsTo": "" -} -``` - -You can use the `authLink` to redirect the user to the provider's login page. - -Next up, managing connections. diff --git a/apps/docs/memory-api/connectors/google-drive.mdx b/apps/docs/memory-api/connectors/google-drive.mdx deleted file mode 100644 index 8413fdd2..00000000 --- a/apps/docs/memory-api/connectors/google-drive.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: 'Google Drive' -description: 'Sync your Google Drive content with supermemory' ---- - -supermemory syncs Google Drive documents automatically and instantaneously. - -## Supported file types - -- Google Docs -- Google Slides -- Google Sheets - -## Conversions - -To import items, supermemory converts documents into markdown, and then ingests them into supermemory. -This conversion is lossy, and some formatting may be lost. - -## Sync frequency - -supermemory syncs documents: -- **A document is modified or created (Webhook recieved)** - - Note that not all providers are synced via webhook (Instant sync right now) - - `Google-Drive` and `Notion` documents are synced instantaneously -- Every **four hours** -- On **Manual Sync** (API call) - - You can call `/v3/connections/{provider}/sync` to sync documents manually diff --git a/apps/docs/memory-api/connectors/overview.mdx b/apps/docs/memory-api/connectors/overview.mdx deleted file mode 100644 index 8727b68c..00000000 --- a/apps/docs/memory-api/connectors/overview.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: 'Connectors Overview' -sidebarTitle: 'Overview' -description: 'Sync external connections like Google Drive, Notion, OneDrive with supermemory' ---- - -supermemory can sync external connections like Google Drive, Notion, OneDrive with more coming soon. - -### The Flow - -1. Make a `POST` request to `/v3/connections/{provider}` -2. supermemory will return an `authLink` which you can redirect the user to -3. The user will be redirected to the provider's login page -4. User is redirected back to your app's `redirectUrl` - -![Connectors Flow](/images/connectors-flow.png) - -## Sync frequency - -supermemory syncs documents: -- **A document is modified or created (Webhook recieved)** - - Note that not all providers are synced via webhook (Instant sync right now) - - `Google-Drive` and `Notion` documents are synced instantaneously -- Every **four hours** -- On **Manual Sync** (API call) - - You can call `/v3/connections/{provider}/sync` to sync documents manually diff --git a/apps/docs/memory-api/creation/adding-memories.mdx b/apps/docs/memory-api/creation/adding-memories.mdx deleted file mode 100644 index 45b03fc1..00000000 --- a/apps/docs/memory-api/creation/adding-memories.mdx +++ /dev/null @@ -1,389 +0,0 @@ ---- -title: "Adding Memories" -description: "Learn how to add content to supermemory" -icon: "plus" ---- - - -1. **Content Organization** - - **Use `containerTags` for grouping/partitioning** - - Optional tags (array of strings) to group memories. - - Can be a user ID, project ID, or any other identifier. - - Allows filtering for memories that share specific tags. - - Example: `["user_123", "project_alpha"]` - - Read more about [filtering](/memory-api/features/filtering) - -2. **Performance Tips** - - **Batch Operations** - - You can add multiple items in parallel - - Use different `containerTags` for different spaces - - Don't wait for processing to complete unless needed - - - **Search Optimization** - ```json - { - "q": "error logs", - "documentThreshold": 0.7, // Higher = more precise - "limit": 5, // Keep it small - "onlyMatchingChunks": true // Skip extra context if not needed - } - ``` - -3. **URL Content** - - Send clean URLs without tracking parameters - - Use article URLs, not homepage URLs - - Check URL accessibility before sending - - - -## Basic Usage - -To add a memory, send a POST request to `/add` with your content: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --data '{ - "customId": "xyz-my-db-id", - "content": "This is the content of my memory", - "metadata": { - "category": "technology", - "tag_1": "ai", - "tag_2": "machine-learning", - }, - "containerTags": ["user_123", "project_xyz"] -}' -``` - -```typescript Typescript -await client.memory.create({ - customId: "xyz-mydb-id", - content: "This is the content of my memory", - metadata: { - category: "technology", - tag_1": "ai", - tag_2": "machine-learning", - }, - containerTags: ["user_123", "project_xyz"] -}) -``` - -```python Python -client.memory.create( - customId="xyz-mydb-id", - content="documents related to python", - metadata={ - "category": "datascience", - "tag_1": "ai", - "tag_2": "machine-learning", - }, - containerTags=["user_123", "project_xyz"] -) -``` - - - -The API will return a response with an ID and initial status: - -```json -{ - "id": "mem_abc123", - "status": "queued" -} -``` - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - -d '{ - "content": "https://example.com/article", - "metadata": { - "source": "web", # Just example metadata - "category": "technology" # NOT required - }, - "containerTags": ["user_456", "research_papers"] - }' -``` - -```typescript Typescript -await client.memory.create({ - content: "https://example.com/article", - userId: "user_456", - metadata: { - source: "web", // Just example metadata - category: "technology", // NOT required - }, - containerTags: ["user_456", "research_papers"], -}); -``` - -```python Python -client.memory.create( - content="https://example.com/article", - userId="user_456", - metadata={ - "source": "web", - "category": "technology" - }, - containerTags=["user_456", "research_papers"] -) -``` - - - -{/\* -TODO: Supported content types - - */} - -## Metadata and Organization - -You can add rich metadata to organize your content: - -```json -{ - "metadata": { - "source": "string", // String - "priority": 1234, // Custom numeric field - "custom_field": "any" // Any custom field - } -} -``` - -{/\* -TODO: Filtering by metadata - - */} - -## Partitioning by user - -You can attribute and partition your data by providing a `userId`: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - -d '{ - "content": "This is space-specific content", - "userId": "space_123", - "metadata": { - "category": "space-content" - } - }' -``` - -```typescript Typescript -await client.memory.create({ - content: "This is space-specific content", - userId: "space_123", - metadata: { - category: "space-content", - }, -}); -``` - -```python Python -client.memory.create( - content="This is space-specific content", - userId="space_123", - metadata={ - "category": "space-content" - } -) -``` - - - - - When searching, if you provide a `userId`, only memories from that space will - be returned. - - -## Grouping - -You can group memories by providing an array of `containerTags`: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - -d '{ - "content": "This is space-specific content", - "containerTags": ["user_123", "project_xyz"] - }' -``` - -```typescript Typescript -await client.memory.create({ - content: "This is space-specific content", - containerTags: ["user_123", "project_xyz"], -}); -``` - -```python Python -client.memory.create( - content="This is space-specific content", - containerTags=["user_123", "project_xyz"] -) -``` - - - -{/\* -TODO: Processing Statuses - - */} - -## Checking Status - -Check status using the memory ID: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories/mem_abc123 \ - --request GET \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' -``` - -```typescript Typescript -await client.memory.get("mem_abc123"); -``` - -```python Python -client.memory.get("mem_abc123") -``` - - - - - -Memories are deleted after 2 minutes if an irrecoverable error occurs. - - - -## File Uploads - -For file uploads, use the dedicated file upload endpoint. You can include `containerTags` directly in the form data: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories/file \ - --request POST \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --form 'file=@/path/to/your/file.pdf' \ - --form 'containerTags=["user_123", "project_xyz"]' -``` - -```typescript Typescript -const formData = new FormData(); -formData.append("file", fileBlob); -formData.append("containerTags", JSON.stringify(["user_123", "project_xyz"])); - -const response = await fetch("https://api.supermemory.ai/v3/memories/file", { - method: "POST", - headers: { - Authorization: "Bearer SUPERMEMORY_API_KEY", - }, - body: formData, -}); -``` - -```python Python -import requests -import json - -with open('/path/to/your/file.pdf', 'rb') as f: - files = {'file': f} - data = {'containerTags': json.dumps(["user_123", "project_xyz"])} - response = requests.post( - 'https://api.supermemory.ai/v3/memories/file', - headers={'Authorization': 'Bearer SUPERMEMORY_API_KEY'}, - files=files, - data=data - ) -``` - - - -### Adding Additional Metadata to Files - -If you need to add additional metadata (like title or description) after upload, you can use the PATCH endpoint: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories/MEMORY_ID \ - --request PATCH \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --data '{ - "metadata": { - "title": "My Document", - "description": "Important project document" - } - }' -``` - -```typescript Typescript -await fetch(`https://api.supermemory.ai/v3/memories/${memoryId}`, { - method: "PATCH", - headers: { - "Content-Type": "application/json", - Authorization: "Bearer SUPERMEMORY_API_KEY", - }, - body: JSON.stringify({ - metadata: { - title: "My Document", - description: "Important project document", - }, - }), -}); -``` - -```python Python -import requests - -requests.patch( - f'https://api.supermemory.ai/v3/memories/{memory_id}', - headers={ - 'Content-Type': 'application/json', - 'Authorization': 'Bearer SUPERMEMORY_API_KEY' - }, - json={ - 'metadata': { - 'title': 'My Document', - 'description': 'Important project document' - } - } -) -``` - - - - - The file upload endpoint returns immediately with a memory ID and processing - status. The file will be processed asynchronously, and you can check its - status using the GET endpoint. - - -## Next Steps - -Explore more advanced features in our [API Reference](/api-reference/manage-memories/add-memory) diff --git a/apps/docs/memory-api/creation/status.mdx b/apps/docs/memory-api/creation/status.mdx deleted file mode 100644 index 44a53656..00000000 --- a/apps/docs/memory-api/creation/status.mdx +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Processing Status" -description: "Learn about the stages of content processing" ---- - -After adding content, you can check its processing status: - -1. `queued`: Content is queued for processing -2. `extracting`: Extracting content from source -3. `chunking`: Splitting content into semantic chunks -4. `embedding`: Generating vector embeddings -5. `indexing`: Adding to search index -6. `done`: Processing complete -7. `failed`: Processing failed \ No newline at end of file diff --git a/apps/docs/memory-api/features/auto-multi-modal.mdx b/apps/docs/memory-api/features/auto-multi-modal.mdx deleted file mode 100644 index 18a91135..00000000 --- a/apps/docs/memory-api/features/auto-multi-modal.mdx +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: "Auto Multi Modal" -description: "supermemory automatically detects the content type of the document you are adding." -icon: "sparkles" ---- - -supermemory is natively multi-modal, and can automatically detect the content type of the document you are adding. - -We use the best of breed tools to extract content from URLs, and process it for optimal memory storage. - -## Automatic Content Type Detection - -supermemory automatically detects the content type of the document you're adding. Simply pass your content to the API, and supermemory will handle the rest. - - - - The content detection system analyzes: - - URL patterns and domains - - File extensions and MIME types - - Content structure and metadata - - Headers and response types - - - - 1. **Type Selection** - - Use `note` for simple text - - Use `webpage` for online content - - Use native types when possible - - 2. **URL Content** - - Send clean URLs without tracking parameters - - Use article URLs, not homepage URLs - - Check URL accessibility before sending - - - - - -### Quick Implementation - -All you need to do is pass the content to the `/memories` endpoint: - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories \ - --request POST \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - -d '{"content": "https://example.com/article"}' -``` - -```typescript -await client.add.create({ - content: "https://example.com/article", -}); -``` - -```python -client.add.create( - content="https://example.com/article" -) -``` - - - - - supermemory uses [Markdowner](https://md.dhr.wtf) to extract content from - URLs. - - -## Supported Content Types - -supermemory supports a wide range of content formats to ensure versatility in memory creation: - - - - - `note`: Plain text notes and documents - - Directly processes raw text content - - Automatically chunks content for optimal retrieval - - Preserves formatting and structure - - - - - `webpage`: Web pages (just provide the URL) - - Intelligently extracts main content - - Preserves important metadata (title, description, images) - - Extracts OpenGraph metadata when available - - - `tweet`: Twitter content - - Captures tweet text, media, and metadata - - Preserves thread structure if applicable - - - - - - `pdf`: PDF files - - Extracts text content while maintaining structure - - Handles both searchable PDFs and scanned documents with OCR - - Preserves page breaks and formatting - - - `google_doc`: Google Documents - - Seamlessly integrates with Google Docs API - - Maintains document formatting and structure - - Auto-updates when source document changes - - - `notion_doc`: Notion pages - - Extracts content while preserving Notion's block structure - - Handles rich text formatting and embedded content - - - - - - `image`: Images with text content - - Advanced OCR for text extraction - - Visual content analysis and description - - - `video`: Video content - - Transcription and content extraction - - Key frame analysis - - - - -## Processing Pipeline - - - - supermemory automatically identifies the content type based on the input provided. - - - - Type-specific extractors process the content with: - Specialized parsing for - each format - Error handling with retries - Rate limit management - - - - ```typescript - interface ProcessedContent { - content: string; // Extracted text - summary?: string; // AI-generated summary - tags?: string[]; // Extracted tags - categories?: string[]; // Content categories - } - ``` - - - - - Sentence-level splitting - - 2-sentence overlap - - Context preservation - - Semantic coherence - - - -## Technical Specifications - -### Size Limits - -| Content Type | Max Size | -| ------------ | -------- | -| Text/Note | 1MB | -| PDF | 10MB | -| Image | 5MB | -| Video | 100MB | -| Web Page | N/A | -| Google Doc | N/A | -| Notion Page | N/A | -| Tweet | N/A | - -### Processing Time - -| Content Type | Processing Time | -| ------------ | --------------- | -| Text/Note | Almost instant | -| PDF | 1-5 seconds | -| Image | 2-10 seconds | -| Video | 10+ seconds | -| Web Page | 1-3 seconds | -| Google Doc | N/A | -| Notion Page | N/A | -| Tweet | N/A | diff --git a/apps/docs/memory-api/features/content-cleaner.mdx b/apps/docs/memory-api/features/content-cleaner.mdx deleted file mode 100644 index e586c3dc..00000000 --- a/apps/docs/memory-api/features/content-cleaner.mdx +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: "Cleaning and Categorizing" -description: "Document Cleaning Summaries in supermemory" -icon: "washing-machine" ---- - -supermemory provides advanced configuration options to customize your content processing pipeline. At its core is an AI-powered system that can automatically analyze, categorize, and filter your content based on your specific needs. - -## Configuration Schema - -```json -{ - "shouldLLMFilter": true, - "categories": ["feature-request", "bug-report", "positive", "negative"], - "filterPrompt": "Analyze feedback sentiment and identify feature requests", - "includeItems": ["critical", "high-priority"], - "excludeItems": ["spam", "irrelevant"] -} -``` - -## Core Settings - -### shouldLLMFilter -- **Type**: `boolean` -- **Required**: No (defaults to `false`) -- **Description**: Master switch for AI-powered content analysis. Must be enabled to use any of the advanced filtering features. - -### categories -- **Type**: `string[]` -- **Limits**: Each category must be 1-50 characters -- **Required**: No -- **Description**: Define custom categories for content classification. When specified, the AI will only use these categories. If not specified, it will generate 3-5 relevant categories automatically. - -### filterPrompt -- **Type**: `string` -- **Limits**: 1-750 characters -- **Required**: No -- **Description**: Custom instructions for the AI on how to analyze and categorize content. Use this to guide the categorization process based on your specific needs. - -### includeItems & excludeItems -- **Type**: `string[]` -- **Limits**: Each item must be 1-20 characters -- **Required**: No -- **Description**: Fine-tune content filtering by specifying items to explicitly include or exclude during processing. - -## Content Processing Pipeline - -When content is ingested with LLM filtering enabled: - -1. **Initial Processing** - - Content is extracted and normalized - - Basic metadata (title, description) is captured - -2. **AI Analysis** - - Content is analyzed based on your `filterPrompt` - - Categories are assigned (either from your predefined list or auto-generated) - - Tags are evaluated and scored - -3. **Chunking & Indexing** - - Content is split into semantic chunks - - Each chunk is embedded for efficient search - - Metadata and classifications are stored - -## Example Use Cases - -### 1. Customer Feedback System -```json -{ - "shouldLLMFilter": true, - "categories": ["positive", "negative", "neutral"], - "filterPrompt": "Analyze customer sentiment and identify key themes", -} -``` - -### 2. Content Moderation -```json -{ - "shouldLLMFilter": true, - "categories": ["safe", "needs-review", "flagged"], - "filterPrompt": "Identify potentially inappropriate or sensitive content", - "excludeItems": ["spam", "offensive"], - "includeItems": ["user-generated"] -} -``` - -> **Important**: All filtering features (`categories`, `filterPrompt`, `includeItems`, `excludeItems`) require `shouldLLMFilter` to be enabled. Attempting to use these features without enabling `shouldLLMFilter` will result in a 400 error. diff --git a/apps/docs/memory-api/features/filtering.mdx b/apps/docs/memory-api/features/filtering.mdx deleted file mode 100644 index cde6ee4a..00000000 --- a/apps/docs/memory-api/features/filtering.mdx +++ /dev/null @@ -1,266 +0,0 @@ ---- -title: "Filtering" -description: "Learn how to filter content while searching from supermemory" -icon: "list-filter-plus" ---- - -## Container Tag - -Container tag is an identifier for your end users, to group memories together.. - -This can be: -- A user using your product -- An organization using a SaaS - -A project ID, or even a dynamic one like `user_project_etc` - -We recommend using single containerTag in all API requests. - -The graph is built on top of the Container Tags. For example, each user / tag in your supermemory account will have one single graph built for them. - - - -```bash cURL -curl https://api.supermemory.ai/v3/search \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --data '{ - "q": "machine learning", - "containerTags": ["user_123"] - }' -``` - -```typescript Typescript -await client.search.execute({ - q: "machine learning", - containerTags: ["user_123"], -}); -``` - -```python Python -client.search.execute( - q="machine learning", - containerTags=["user_123"] -) -``` - - - -## Metadata - -Sometimes, you might want to add metadata and do advanced filtering based on it. - -Using metadata filtering, you can search based on: - -- AND and OR conditions -- String matching -- Numeric matching -- Date matching -- Time range queries - - - -```bash cURL -curl https://api.supermemory.ai/v3/search \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --data '{ - "q": "machine learning", - "filters": { - "AND": [ - { - "key": "category", - "value": "technology", - "negate": false - }, - { - "filterType": "numeric", - "key": "readingTime", - "value": "5", - "negate": false, - "numericOperator": "<=" - } - ] - } -}' -``` - -```typescript Typescript -await client.search.execute({ - q: "machine learning", - filters: { - AND: [ - { - key: "category", - value: "technology", - negate: false, - }, - { - filterType: "numeric", - key: "readingTime", - value: "5", - negate: false, - numericOperator: "<=", - }, - ], - }, -}); -``` - -```python Python -client.search.execute( - q="machine learning", - filters={ - "AND": [ - { - "key": "category", - "value": "technology", - "negate": false - }, - { - "filterType": "numeric", - "key": "readingTime", - "value": "5", - "negate": false, - "numericOperator": "<=" - } - ] - } -) -``` - - - -## Array Contains Filtering - -You can filter memories by array values using the `array_contains` filter type. This is particularly useful for filtering by participants or other array-based metadata. - -First, create a memory with participants in the metadata: - - - -```bash cURL -curl --location 'https://api.supermemory.ai/v3/memories' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ ---data '{ - "content": "quarterly planning meeting discussion", - "metadata": { - "participants": ["john.doe", "sarah.smith", "mike.wilson"] - } - }' -``` - -```typescript Typescript -await client.memories.create({ - content: "quarterly planning meeting discussion", - metadata: { - participants: ["john.doe", "sarah.smith", "mike.wilson"] - } -}); -``` - -```python Python -client.memories.create( - content="quarterly planning meeting discussion", - metadata={ - "participants": ["john.doe", "sarah.smith", "mike.wilson"] - } -) -``` - - - -Then search using the `array_contains` filter: - - - -```bash cURL -curl --location 'https://api.supermemory.ai/v3/search' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ ---data '{ - "q": "meeting", - "filters": { - "AND": [ - { - "key": "participants", - "value": "john.doe", - "filterType": "array_contains" - } - ] - }, - "limit": 5 - }' -``` - -```typescript Typescript -await client.search.execute({ - q: "meeting", - filters: { - AND: [ - { - key: "participants", - value: "john.doe", - filterType: "array_contains" - } - ] - }, - limit: 5 -}); -``` - -```python Python -client.search.execute( - q="meeting", - filters={ - "AND": [ - { - "key": "participants", - "value": "john.doe", - "filterType": "array_contains" - } - ] - }, - limit=5 -) -``` - - - -## Document - -You can also find chunks within a specific, large document. - -This can be particularly useful for extremely large documents like Books, Podcasts, etc. - - - -```bash cURL -curl https://api.supermemory.ai/v3/search \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --data '{ - "q": "machine learning", - "docId": "doc_123" - }' -``` - -```typescript Typescript -await client.search.execute({ - q: "machine learning", - docId: "doc_123", -}); -``` - -```python Python -client.search.execute( - q="machine learning", - docId="doc_123" -) -``` - - diff --git a/apps/docs/memory-api/features/query-rewriting.mdx b/apps/docs/memory-api/features/query-rewriting.mdx deleted file mode 100644 index 9508297a..00000000 --- a/apps/docs/memory-api/features/query-rewriting.mdx +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: "Query Rewriting" -description: "Query Rewriting in supermemory" -icon: "blend" ---- - -Query Rewriting is a feature that allows you to rewrite queries to make them more accurate. - -![Query Rewriting](/images/query-rewriting.png) - -### Usage - -In supermemory, you can enable query rewriting by setting the `rewriteQuery` parameter to `true` in the search API. - - - -```bash cURL -curl https://api.supermemory.ai/v3/search \ - --request POST \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - --header 'Content-Type: application/json' \ - -d '{ - "q": "What is the capital of France?", - "rewriteQuery": true - }' -``` - -```typescript -await client.search.create({ - q: "What is the capital of France?", - rewriteQuery: true, -}); -``` - -```python -client.search.create( - q="What is the capital of France?", - rewriteQuery=True -) -``` - - - -### Notes and limitations - -- supermemory generates multiple rewrites, and runs the search through all of them. -- The results are then merged and returned to you. -- There is no additional costs associated with query rewriting. -- While query rewriting makes the quality much better, it also **incurs additional latency**. -- All other features like filtering, hybrid search, recency bias, etc. work with rewritten results as well. diff --git a/apps/docs/memory-api/features/reranking.mdx b/apps/docs/memory-api/features/reranking.mdx deleted file mode 100644 index 1df8a9c5..00000000 --- a/apps/docs/memory-api/features/reranking.mdx +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: "Reranking" -description: "Reranked search results in supermemory" -icon: "chart-bar-increasing" ---- - -Reranking is a feature that allows you to rerank search results based on the query. - -![Reranking](/images/rerank.png) - -### Usage - -In supermemory, you can enable answer rewriting by setting the `rerank` parameter to `true` in the search API. - - - -```bash cURL -curl https://api.supermemory.ai/v3/search?q=What+is+the+capital+of+France?&rerank=true \ - --request GET \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' -``` - -```typescript -await client.search.create({ - q: "What is the capital of France?", - rerank: true, -}); -``` - -```python -client.search.create( - q="What is the capital of France?", - rerank=True -) -``` - - - -### Notes and limitations - -- We currently use `bge-reranker-base` model for reranking. -- There is no additional costs associated with reranking. -- While reranking makes the quality much better, it also **incurs additional latency**. -- All other features like filtering, hybrid search, recency bias, etc. work with reranked results as well. diff --git a/apps/docs/memory-api/introduction.mdx b/apps/docs/memory-api/introduction.mdx deleted file mode 100644 index 8ff4547e..00000000 --- a/apps/docs/memory-api/introduction.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: "Introduction - Memory endpoints" -sidebarTitle: "Introduction" -description: "Ingest content at scale, in any format." ---- - -**supermemory** automatically **ingests and processes your data**, and makes it searchable. - - - The Memory engine scales linearly - which means we're **incredibly fast and scalable**, while providing one of the more affordable - - -![supermemory](/images/processing.png) - -It also gives you features like: - -- [Connectors and Syncing](/memory-api/connectors/) -- [Multimodality](/memory-api/features/auto-multi-modal) -- [Advanced Filtering](/memory-api/features/filtering) -- [Reranking](/memory-api/features/reranking) -- [Extracting details from text](/memory-api/features/content-cleaner) -- [Query Rewriting](/memory-api/features/query-rewriting) - -... and lots more\! - - -Check out the following resources to get started: - - - - - Get started in 5 minutes - - - Learn more about the API - - - See what supermemory can do for you - - - Learn more about the SDKs - - \ No newline at end of file diff --git a/apps/docs/memory-api/overview.mdx b/apps/docs/memory-api/overview.mdx deleted file mode 100644 index fc9ce28a..00000000 --- a/apps/docs/memory-api/overview.mdx +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: "Quickstart - 5 mins" -description: "Learn how to integrate supermemory into your application" ---- - -## Authentication - -Head to [supermemory's Developer Platform](https://console.supermemory.ai) built to help you monitor and manage every aspect of the API. - -All API requests require authentication using an API key. Include your API key as follows: - - - -```bash cURL -Authorization: Bearer YOUR_API_KEY -``` - -```typescript Typescript -// npm install supermemory - -const client = new supermemory({ - apiKey: "YOUR_API_KEY", -}); -``` - -```python Python -# pip install supermemory - -client = supermemory( - api_key="YOUR_API_KEY", -) -``` - - - -## Installing the clients - -You can use supermemory through the APIs, or using our SDKs - - - -```bash cURL -https://api.supermemory.ai/v3 -``` - -```bash Typescript -npm i supermemory -``` - -```bash Python -pip install supermemory -``` - - - -## Add your first memory - - - -```bash cURL -curl https://api.supermemory.ai/v3/memories \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - -d '{"content": "This is the content of my first memory."}' -``` - -```typescript Typescript -await client.memory.add({ - content: "This is the content of my first memory.", -}); -``` - -```python Python -client.memory.add( - content="This is the content of my first memory.", -) -``` - - - -This will add a new memory to your supermemory account. - -Try it out in the [API Playground](/api-reference/manage-memories/add-memory). - -## Content Processing - - - When you add content to supermemory, it goes through several processing steps: - -1. **Queued**: Initial state when content is submitted -2. **Extracting**: Content is being extracted from the source -3. **Chunking**: Content is being split into semantic chunks -4. **Embedding**: Generating vector embeddings for search -5. **Indexing**: Adding content to the search index -6. **Done**: Processing complete - - - - The system uses advanced NLP techniques for optimal chunking: - -- Sentence-level splitting for natural boundaries -- Context preservation with overlapping chunks -- Smart handling of long content -- Semantic coherence optimization - - -## Search your memories - - - -```bash cURL -curl https://api.supermemory.ai/v3/search \ - --request POST \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' \ - -d '{"q": "This is the content of my first memory."}' -``` - -```typescript Typescript -await client.search.execute({ - q: "This is the content of my first memory.", -}); -``` - -```python Python -client.search.execute( - q="This is the content of my first memory.", -) -``` - - - -Try it out in the [API Playground](/api-reference/search-memories/search-memories). - -You can do a lot more with supermemory, and we will walk through everything you need to. - -Next, explore the features available in supermemory - - - - Adding memories - - - Searching for items - - - Connecting external sources - - - Explore Features - - diff --git a/apps/docs/memory-api/sdks/python.mdx b/apps/docs/memory-api/sdks/python.mdx deleted file mode 100644 index 2b1f56fc..00000000 --- a/apps/docs/memory-api/sdks/python.mdx +++ /dev/null @@ -1,349 +0,0 @@ ---- -title: 'Python SDK' -sidebarTitle: "Python" -description: 'Learn how to use supermemory with Python' ---- - -## Installation - -```sh -# install from PyPI -pip install --pre supermemory -``` - -## Usage - - -```python -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.execute( - q="documents related to python", -) -print(response.results) -``` - -While you can provide an `api_key` keyword argument, -we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/) -to add `SUPERMEMORY_API_KEY="My API Key"` to your `.env` file -so that your API Key is not stored in source control. - -## Async usage - -Simply import `AsyncSupermemory` instead of `supermemory` and use `await` with each API call: - -```python -import os -import asyncio -from supermemory import AsyncSupermemory - -client = AsyncSupermemory( - api_key=os.environ.get("SUPERMEMORY_API_KEY"), # This is the default and can be omitted -) - - -async def main() -> None: - response = await client.search.execute( - q="documents related to python", - ) - print(response.results) - - -asyncio.run(main()) -``` - -Functionality between the synchronous and asynchronous clients is otherwise identical. - -## Using types - -Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like: - -- Serializing back into JSON, `model.to_json()` -- Converting to a dictionary, `model.to_dict()` - -Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. - -## File uploads - -Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`. - -```python -from pathlib import Path -from supermemory import Supermemory - -client = supermemory() - -client.memories.upload_file( - file=Path("/path/to/file"), -) -``` - -The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically. - -## Handling errors - -When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `supermemory.APIConnectionError` is raised. - -When the API returns a non-success status code (that is, 4xx or 5xx -response), a subclass of `supermemory.APIStatusError` is raised, containing `status_code` and `response` properties. - -All errors inherit from `supermemory.APIError`. - -```python -import supermemory -from supermemory import Supermemory - -client = supermemory() - -try: - client.memories.add( - content="This is a detailed article about machine learning concepts...", - ) -except supermemory.APIConnectionError as e: - print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. -except supermemory.RateLimitError as e: - print("A 429 status code was received; we should back off a bit.") -except supermemory.APIStatusError as e: - print("Another non-200-range status code was received") - print(e.status_code) - print(e.response) -``` - -Error codes are as follows: - -| Status Code | Error Type | -| ----------- | -------------------------- | -| 400 | `BadRequestError` | -| 401 | `AuthenticationError` | -| 403 | `PermissionDeniedError` | -| 404 | `NotFoundError` | -| 422 | `UnprocessableEntityError` | -| 429 | `RateLimitError` | -| >=500 | `InternalServerError` | -| N/A | `APIConnectionError` | - -### Retries - -Certain errors are automatically retried 2 times by default, with a short exponential backoff. -Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, -429 Rate Limit, and >=500 Internal errors are all retried by default. - -You can use the `max_retries` option to configure or disable retry settings: - -```python -from supermemory import Supermemory - -# Configure the default for all requests: -client = supermemory( - # default is 2 - max_retries=0, -) - -# Or, configure per-request: -client.with_options(max_retries=5).memories.add( - content="This is a detailed article about machine learning concepts...", -) -``` - -### Timeouts - -By default requests time out after 1 minute. You can configure this with a `timeout` option, -which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: - -```python -from supermemory import Supermemory - -# Configure the default for all requests: -client = supermemory( - # 20 seconds (default is 1 minute) - timeout=20.0, -) - -# More granular control: -client = supermemory( - timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0), -) - -# Override per-request: -client.with_options(timeout=5.0).memories.add( - content="This is a detailed article about machine learning concepts...", -) -``` - -On timeout, an `APITimeoutError` is thrown. - -Note that requests that time out are [retried twice by default](#retries). - -## Advanced - -### Logging - -We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module. - -You can enable logging by setting the environment variable `SUPERMEMORY_LOG` to `info`. - -```shell -$ export SUPERMEMORY_LOG=info -``` - -Or to `debug` for more verbose logging. - -### How to tell whether `None` means `null` or missing - -In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`: - -```py -if response.my_field is None: - if 'my_field' not in response.model_fields_set: - print('Got json like {}, without a "my_field" key present at all.') - else: - print('Got json like {"my_field": null}.') -``` - -### Accessing raw response data (e.g. headers) - -The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g., - -```py -from supermemory import Supermemory - -client = supermemory() -response = client.memories.with_raw_response.add( - content="This is a detailed article about machine learning concepts...", -) -print(response.headers.get('X-My-Header')) - -memory = response.parse() # get the object that `memories.add()` would have returned -print(memory.id) -``` - -These methods return an [`APIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) object. - -The async client returns an [`AsyncAPIResponse`](https://github.com/supermemoryai/python-sdk/tree/main/src/supermemory/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. - -#### `.with_streaming_response` - -The above interface eagerly reads the full response body when you make the request, which may not always be what you want. - -To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods. - -```python -with client.memories.with_streaming_response.add( - content="This is a detailed article about machine learning concepts...", -) as response: - print(response.headers.get("X-My-Header")) - - for line in response.iter_lines(): - print(line) -``` - -The context manager is required so that the response will reliably be closed. - -### Making custom/undocumented requests - -This library is typed for convenient access to the documented API. - -If you need to access undocumented endpoints, params, or response properties, the library can still be used. - -#### Undocumented endpoints - -To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other -http verbs. Options on the client will be respected (such as retries) when making this request. - -```py -import httpx - -response = client.post( - "/foo", - cast_to=httpx.Response, - body={"my_param": True}, -) - -print(response.headers.get("x-foo")) -``` - -#### Undocumented request params - -If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request -options. - -#### Undocumented response properties - -To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You -can also get all the extra fields on the Pydantic model as a dict with -[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra). - -### Configuring the HTTP client - -You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including: - -- Support for [proxies](https://www.python-httpx.org/advanced/proxies/) -- Custom [transports](https://www.python-httpx.org/advanced/transports/) -- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality - -```python -import httpx -from supermemory import Supermemory, DefaultHttpxClient - -client = supermemory( - # Or use the `SUPERMEMORY_BASE_URL` env var - base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient( - proxy="http://my.test.proxy.example.com", - transport=httpx.HTTPTransport(local_address="0.0.0.0"), - ), -) -``` - -You can also customize the client on a per-request basis by using `with_options()`: - -```python -client.with_options(http_client=DefaultHttpxClient(...)) -``` - -### Managing HTTP resources - -By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting. - -```py -from supermemory import Supermemory - -with supermemory() as client: - # make requests here - ... - -# HTTP client is now closed -``` - -## Versioning - -This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: - -1. Changes that only affect static types, without breaking runtime behavior. -2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_ -3. Changes that we do not expect to impact the vast majority of users in practice. - -We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. - -We are keen for your feedback; please open an [issue](https://www.github.com/supermemoryai/python-sdk/issues) with questions, bugs, or suggestions. - -### Determining the installed version - -If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version. - -You can determine the version that is being used at runtime with: - -```py -import supermemory -print(supermemory.__version__) -``` - -## Requirements - -Python 3.8 or higher. \ No newline at end of file diff --git a/apps/docs/memory-api/sdks/typescript.mdx b/apps/docs/memory-api/sdks/typescript.mdx deleted file mode 100644 index 54cc7137..00000000 --- a/apps/docs/memory-api/sdks/typescript.mdx +++ /dev/null @@ -1,391 +0,0 @@ ---- -title: 'Typescript SDK' -sidebarTitle: "Typescript" -description: 'Learn how to use supermemory with Typescript' ---- - -## Installation - -```sh -npm install supermemory -``` - -## Usage - -```js -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.execute({ q: 'documents related to python' }); - - console.debug(response.results); -} - -main(); -``` - -### Request & Response types - -This library includes TypeScript definitions for all request params and response fields. You may import and use them like so: - - -```ts -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 params: supermemory.MemoryAddParams = { - content: 'This is a detailed article about machine learning concepts...', - }; - const response: supermemory.MemoryAddResponse = await client.memories.add(params); -} - -main(); -``` - -Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors. - -## File uploads - -Request parameters that correspond to file uploads can be passed in many different forms: - -- `File` (or an object with the same structure) -- a `fetch` `Response` (or an object with the same structure) -- an `fs.ReadStream` -- the return value of our `toFile` helper - -```ts -import fs from 'fs'; -import supermemory, { toFile } from 'supermemory'; - -const client = new supermemory(); - -// If you have access to Node `fs` we recommend using `fs.createReadStream()`: -await client.memories.uploadFile({ file: fs.createReadStream('/path/to/file') }); - -// Or if you have the web `File` API you can pass a `File` instance: -await client.memories.uploadFile({ file: new File(['my bytes'], 'file') }); - -// You can also pass a `fetch` `Response`: -await client.memories.uploadFile({ file: await fetch('https://somesite/file') }); - -// Finally, if none of the above are convenient, you can use our `toFile` helper: -await client.memories.uploadFile({ file: await toFile(Buffer.from('my bytes'), 'file') }); -await client.memories.uploadFile({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') }); -``` - -## Handling errors - -When the library is unable to connect to the API, -or if the API returns a non-success status code (i.e., 4xx or 5xx response), -a subclass of `APIError` will be thrown: - - -```ts -async function main() { - const response = await client.memories - .add({ content: 'This is a detailed article about machine learning concepts...' }) - .catch(async (err) => { - if (err instanceof supermemory.APIError) { - console.debug(err.status); // 400 - console.debug(err.name); // BadRequestError - console.debug(err.headers); // {server: 'nginx', ...} - } else { - throw err; - } - }); -} - -main(); -``` - -Error codes are as follows: - -| Status Code | Error Type | -| ----------- | -------------------------- | -| 400 | `BadRequestError` | -| 401 | `AuthenticationError` | -| 403 | `PermissionDeniedError` | -| 404 | `NotFoundError` | -| 422 | `UnprocessableEntityError` | -| 429 | `RateLimitError` | -| >=500 | `InternalServerError` | -| N/A | `APIConnectionError` | - -### Retries - -Certain errors will be automatically retried 2 times by default, with a short exponential backoff. -Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, -429 Rate Limit, and >=500 Internal errors will all be retried by default. - -You can use the `maxRetries` option to configure or disable this: - - -```js -// Configure the default for all requests: -const client = new supermemory({ - maxRetries: 0, // default is 2 -}); - -// Or, configure per-request: -await client.memories.add({ content: 'This is a detailed article about machine learning concepts...' }, { - maxRetries: 5, -}); -``` - -### Timeouts - -Requests time out after 1 minute by default. You can configure this with a `timeout` option: - - -```ts -// Configure the default for all requests: -const client = new supermemory({ - timeout: 20 * 1000, // 20 seconds (default is 1 minute) -}); - -// Override per-request: -await client.memories.add({ content: 'This is a detailed article about machine learning concepts...' }, { - timeout: 5 * 1000, -}); -``` - -On timeout, an `APIConnectionTimeoutError` is thrown. - -Note that requests which time out will be [retried twice by default](#retries). - -## Advanced Usage - -### Accessing raw Response data (e.g., headers) - -The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return. -This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic. - -You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data. -Unlike `.asResponse()` this method consumes the body, returning once it is parsed. - - -```ts -const client = new supermemory(); - -const response = await client.memories - .add({ content: 'This is a detailed article about machine learning concepts...' }) - .asResponse(); -console.debug(response.headers.get('X-My-Header')); -console.debug(response.statusText); // access the underlying Response object - -const { data: response, response: raw } = await client.memories - .add({ content: 'This is a detailed article about machine learning concepts...' }) - .withResponse(); -console.debug(raw.headers.get('X-My-Header')); -console.debug(response.id); -``` - -### Logging - - -All log messages are intended for debugging only. The format and content of log messages may change between releases. - - -#### Log levels - -The log level can be configured in two ways: - -1. Via the `SUPERMEMORY_LOG` environment variable -2. Using the `logLevel` client option (overrides the environment variable if set) - -```ts -import supermemory from 'supermemory'; - -const client = new supermemory({ - logLevel: 'debug', // Show all log messages -}); -``` - -Available log levels, from most to least verbose: - -- `'debug'` - Show debug messages, info, warnings, and errors -- `'info'` - Show info messages, warnings, and errors -- `'warn'` - Show warnings and errors (default) -- `'error'` - Show only errors -- `'off'` - Disable all logging - -At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies. -Some authentication-related headers are redacted, but sensitive data in request and response bodies -may still be visible. - -#### Custom logger - -By default, this library logs to `globalThis.console`. You can also provide a custom logger. -Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue. - -When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages -below the configured level will not be sent to your logger. - -```ts -import supermemory from 'supermemory'; -import pino from 'pino'; - -const logger = pino(); - -const client = new supermemory({ - logger: logger.child({ name: 'supermemory' }), - logLevel: 'debug', // Send all messages to pino, allowing it to filter -}); -``` - -### Making custom/undocumented requests - -This library is typed for convenient access to the documented API. If you need to access undocumented -endpoints, params, or response properties, the library can still be used. - -#### Undocumented endpoints - -To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs. -Options on the client, such as retries, will be respected when making these requests. - -```ts -await client.post('/some/path', { - body: { some_prop: 'foo' }, - query: { some_query_arg: 'bar' }, -}); -``` - -#### Undocumented request params - -To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented -parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you -send will be sent as-is. - -```ts -client.foo.create({ - foo: 'my_param', - bar: 12, - // @ts-expect-error baz is not yet public - baz: 'undocumented option', -}); -``` - -For requests with the `GET` verb, any extra params will be in the query, all other requests will send the -extra param in the body. - -If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request -options. - -#### Undocumented response properties - -To access undocumented response properties, you may access the response object with `// @ts-expect-error` on -the response object, or cast the response object to the requisite type. Like the request params, we do not -validate or strip extra properties from the response from the API. - -### Customizing the fetch client - -By default, this library expects a global `fetch` function is defined. - -If you want to use a different `fetch` function, you can either polyfill the global: - -```ts -import fetch from 'my-fetch'; - -globalThis.fetch = fetch; -``` - -Or pass it to the client: - -```ts -import supermemory from 'supermemory'; -import fetch from 'my-fetch'; - -const client = new supermemory({ fetch }); -``` - -### Fetch options - -If you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.) - -```ts -import supermemory from 'supermemory'; - -const client = new supermemory({ - fetchOptions: { - // `RequestInit` options - }, -}); -``` - -#### Configuring proxies - -To modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy options to requests: - -```ts -import supermemory from 'supermemory'; -import * as undici from 'undici'; - -const proxyAgent = new undici.ProxyAgent('http://localhost:8888'); -const client = new supermemory({ - fetchOptions: { - dispatcher: proxyAgent, - }, -}); -``` - -```ts -import supermemory from 'supermemory'; - -const client = new supermemory({ - fetchOptions: { - proxy: 'http://localhost:8888', - }, -}); -``` - -```ts -import supermemory from 'npm:supermemory'; - -const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } }); -const client = new supermemory({ - fetchOptions: { - client: httpClient, - }, -}); -``` - -## Frequently Asked Questions - -## Semantic versioning - -This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: - -1. Changes that only affect static types, without breaking runtime behavior. -2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_ -3. Changes that we do not expect to impact the vast majority of users in practice. - -We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. - -We are keen for your feedback; please open an [issue](https://www.github.com/supermemoryai/sdk-ts/issues) with questions, bugs, or suggestions. - -## Requirements - -TypeScript >= 4.9 is supported. - -The following runtimes are supported: - -- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more) -- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions. -- Deno v1.28.0 or higher. -- Bun 1.0 or later. -- Cloudflare Workers. -- Vercel Edge Runtime. -- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time). -- Nitro v2.6 or greater. - -Note that React Native is not supported at this time. - -If you are interested in other runtime environments, please open or upvote an issue on GitHub. \ No newline at end of file diff --git a/apps/docs/memory-api/searching/searching-memories.mdx b/apps/docs/memory-api/searching/searching-memories.mdx deleted file mode 100644 index a94c0c71..00000000 --- a/apps/docs/memory-api/searching/searching-memories.mdx +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: "Searching Memories" -description: "Learn how to search for and retrieve content from supermemory" ---- - - -1. **Query Formulation**: - - Use natural language queries - - Include relevant keywords - - Be specific but not too verbose - -2. **Filtering**: - - Use metadata filters for precision - - Combine multiple filters when needed - - Use appropriate thresholds - -3. **Performance**: - - Set appropriate result limits - - Use specific document/chunk filters - - Consider response timing - - -## Basic Search - -To search through your memories, send a POST request to `/search`: - - - -```bash cURL -curl https://api.supermemory.ai/v3/search?q=machine+learning+concepts&limit=10 \ - --request GET \ - --header 'Authorization: Bearer SUPERMEMORY_API_KEY' -``` - -```typescript Typescript -await client.search.execute({ - q: "machine learning concepts", - limit: 10, -}); -``` - -```python Python -client.search.execute( - q="machine learning concepts", - limit=10 -) -``` - - - -The API will return relevant matches with their similarity scores: - -```json -{ - "results": [ - { - "documentId": "doc_xyz789", - "chunks": [ - { - "content": "Machine learning is a subset of artificial intelligence...", - "isRelevant": true, - "score": 0.85 - } - ], - "score": 0.95, - "metadata": { - "source": "web", - "category": "technology" - }, - "title": "Introduction to Machine Learning" - } - ], - "total": 1, - "timing": 123.45 -} -``` - -## Search Parameters - -```json -{ - "q": "search query", // Required: Search query string - "limit": 10, // Optional: Max results (default: 10) - "documentThreshold": 0.5, // Optional: Min document score (0-1) - "chunkThreshold": 0.5, // Optional: Min chunk score (0-1) - "onlyMatchingChunks": false, // Optional: Skip context chunks - "docId": "doc_id", // Optional: Search in specific doc - "userId": "user_123", // Optional: Search in user's space - "includeSummary": false, // Optional: Include doc summaries - "filters": { - // Optional: Metadata filters - "AND": [ - { - "key": "category", - "value": "technology" - } - ] - }, - "categoriesFilter": [ - // Optional: Category filters - "technology", - "science" - ] -} -``` - -## Search Response - -The search response includes: - -```json -{ - "results": [ - { - "documentId": "string", // Document ID - "chunks": [ - { - // Matching chunks - "content": "string", // Chunk content - "isRelevant": true, // Is directly relevant - "score": 0.95 // Similarity score - } - ], - "score": 0.95, // Document score - "metadata": {}, // Document metadata - "title": "string", // Document title - "createdAt": "string", // Creation date - "updatedAt": "string" // Last update date - } - ], - "total": 1, // Total results - "timing": 123.45 // Search time (ms) -} -``` - -## Next Steps - -Explore more advanced features in our [API Reference](/api-reference/search-memories/search-memories). diff --git a/apps/docs/model-enhancement/context-extender.mdx b/apps/docs/model-enhancement/context-extender.mdx deleted file mode 100644 index ba8df808..00000000 --- a/apps/docs/model-enhancement/context-extender.mdx +++ /dev/null @@ -1,233 +0,0 @@ ---- -title: "supermemory Infinite Chat" -description: "Build chat applications with unlimited context using supermemory's intelligent proxy" -tag: "BETA" ---- - -import GettingAPIKey from '/snippets/getting-api-key.mdx'; - -supermemory Infinite Chat is a powerful solution that gives your chat applications unlimited contextual memory. It works as a transparent proxy in front of your existing LLM provider, intelligently managing long conversations without requiring any changes to your application logic. - -Infinite Context Diagram - - - - - - No more token limits - conversations can extend indefinitely - - - Transparent proxying with negligible overhead - - - Save up to 70% on token costs for long conversations - - - Works with any OpenAI-compatible endpoint - - - - - -## Getting Started - -To use the Infinite Chat endpoint, you need to: - -### 1. Get a supermemory API key - - - -### 2. Add supermemory in front of any **OpenAI-Compatible** API URL - - - -```typescript Typescript -import OpenAI from "openai"; - -/** - * Initialize the OpenAI client with supermemory proxy - * @param {string} OPENAI_API_KEY - Your OpenAI API key - * @param {string} SUPERMEMORY_API_KEY - Your supermemory API key - * @returns {OpenAI} - Configured OpenAI client - */ -const client = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, - baseURL: "https://api.supermemory.ai/v3/https://api.openai.com/v1", - headers: { - "x-api-key": process.env.SUPERMEMORY_API_KEY, - "x-sm-user-id": "Your_users_id" - }, -}); -``` - -```python Python -import openai -import os - -# Configure the OpenAI client with supermemory proxy -openai.api_base = "https://api.supermemory.ai/v3/https://api.openai.com/v1" -openai.api_key = os.environ.get("OPENAI_API_KEY") # Your regular OpenAI key -openai.default_headers = { - "x-api-key": os.environ.get("SUPERMEMORY_API_KEY"), # Your supermemory key -} - -# Create a chat completion with unlimited context -response = openai.ChatCompletion.create( - model="gpt-4o-mini", - messages=[{"role": "user", "content": "Your message here"}] -) -``` - - - -## How It Works - - - - All requests pass through supermemory to your chosen LLM provider with zero latency overhead. - - Transparent Proxy Diagram - - - Long conversations are automatically broken down into optimized segments using our proprietary chunking algorithm that preserves semantic coherence. - - - When conversations exceed token limits (20k+), supermemory intelligently retrieves the most relevant context from previous messages. - - - The system intelligently balances token usage, ensuring optimal performance while minimizing costs. - - - -## Performance Benefits - - - Save up to 70% on token costs for long conversations through intelligent context management and caching. - - - - No more 8k/32k/128k token limits - conversations can extend indefinitely with supermemory's advanced retrieval system. - - - - Better context retrieval means more coherent responses even in very long threads, reducing hallucinations and inconsistencies. - - - - The proxy adds negligible latency to your requests, ensuring fast response times for your users. - - -## Pricing - - - -
-
-
-

Free Tier

-

100k tokens stored at no cost

-
-
-

Standard Plan

-

$20/month fixed cost after exceeding free tier

-
-
-

Usage-Based

-

Each thread includes 20k free tokens, then $1 per million tokens thereafter

-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - - -
- Feature - - Free - - Standard -
- Tokens Stored - - 100k - - Unlimited -
- Conversations - - 10 - - Unlimited -
-
-
-
- -## Error Handling - - - supermemory is designed with reliability as the top priority. If any issues occur within the supermemory processing pipeline, the system will automatically fall back to direct forwarding of your request to the LLM provider, ensuring zero downtime for your applications. - - -Each response includes diagnostic headers that provide information about the processing: - -| Header | Description | -| -------------------------------- | ---------------------------------------------------------------------- | -| `x-supermemory-conversation-id` | Unique identifier for the conversation thread | -| `x-supermemory-context-modified` | Indicates whether supermemory modified the context ("true" or "false") | -| `x-supermemory-tokens-processed` | Number of tokens processed in this request | -| `x-supermemory-chunks-created` | Number of new chunks created from this conversation | -| `x-supermemory-chunks-deleted` | Number of chunks removed (if any) | -| `x-supermemory-docs-deleted` | Number of documents removed (if any) | - -If an error occurs, an additional header `x-supermemory-error` will be included with details about what went wrong. Your request will still be processed by the underlying LLM provider even if supermemory encounters an error. - -## Rate Limiting - - - Currently, there are no rate limits specific to supermemory. Your requests are subject only to the rate limits of your underlying LLM provider. - - -## Supported Models - -supermemory works with any OpenAI-compatible API, including: - - - - GPT-3.5, GPT-4, GPT-4o - - - Claude 3 models - - - Any provider with an OpenAI-compatible endpoint - - \ No newline at end of file diff --git a/apps/docs/model-enhancement/getting-started.mdx b/apps/docs/model-enhancement/getting-started.mdx deleted file mode 100644 index 7c3b0cba..00000000 --- a/apps/docs/model-enhancement/getting-started.mdx +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "Getting Started with Model Enhancement" -sidebarTitle: "Quickstart" -description: "Superpower your LLM in one line" ---- - -import GettingAPIKey from '/snippets/getting-api-key.mdx'; - -## Get your supermemory API key - - - -## Get your LLM provider's API key - -Head to your LLM provider's dashboard and get your API key. - -- [OpenAI](https://platform.openai.com/api-keys) -- [Gemini](https://aistudio.google.com/apikey) -- [Anthropic](https://console.anthropic.com/account/keys) -- [Groq](https://console.groq.com/keys) - -## Choose your endpoint - - - -```bash OpenAI -https://api.supermemory.ai/v3/https://api.openai.com/v1/chat/completions -``` - - -```bash Gemini -https://api.supermemory.ai/v3/https://generativelanguage.googleapis.com/v1beta/openai -``` - - -```bash Anthropic -https://api.supermemory.ai/v3/https://api.anthropic.com/v1 -``` - - -```bash Groq -https://api.supermemory.ai/v3/https://api.groq.com/openai/v1 -``` - - -```bash Other provider -https://api.supermemory.ai/v3/ -``` - - - -## Making your first request - - - -```bash cURL -curl https://api.supermemory.ai/v3/https://api.openai.com/v1/chat/completions \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $OPENAI_API_KEY" \ - -H "x-api-key: $SUPERMEMORY_API_KEY" \ - -H 'x-sm-user-id: user_id' \ - -d '{ - "model": "gpt-4o", - "messages": [ - {"role": "user", "content": "What is the capital of France?"} - ] - }' -``` - - -``` -``` - - -```typescript TypeScript -import OpenAI from 'openai'; - -const openai = new OpenAI({ - apiKey: process.env.OPENAI_API_KEY, - baseURL: 'https://api.supermemory.ai/v3/https://api.openai.com/v1', - defaultHeaders: { - 'x-api-key': process.env.SUPERMEMORY_API_KEY, - 'x-sm-user-id': 'your-user-id' - } -}); - -const completion = await openai.chat.completions.create({ - model: "gpt-4o", -/// you can also add user here - user: "user", - messages: [ - { role: "user", content: "What is the capital of France?" } - ] -}); - - console.debug(completion.choices[0].message); -``` - - - - \ No newline at end of file diff --git a/apps/docs/model-enhancement/identifying-users.mdx b/apps/docs/model-enhancement/identifying-users.mdx deleted file mode 100644 index 518f046a..00000000 --- a/apps/docs/model-enhancement/identifying-users.mdx +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "Identifying Users" -description: "Identifying users in supermemory" ---- - -You can enable built-in cross-conversational memory by sending supermemory a `x-sm-user-id`. - -## How supermemory Identifies Users and conversations - -supermemory will find the user ID in the following places (in order of priority): - -### `x-sm-user-id` header - -You can add a default header of x-sm-user-id with any client and model - -### `user` in body - -For models that support the `user` parameter in the body, such as OpenAI, you can also attach it to the body. - -### `userId` in search params - -You can also add `?userId=xyz` in the URL search parameters, incase the models don't support it. - -## Conversation ID - -If a conversation identifier is provided, You do not need to send the entire array of messages to supermemory. - -```typescript -// if you provide conversation ID, You do not need to send all the messages every single time. supermemory automatically backfills it. -const client = new OpenAI({ - baseURL: -"https://api.supermemory.ai/v3/https://api.openai.com/v1", - defaultHeaders: { - "x-supermemory-api-key": - "SUPERMEMORY_API_KEY", - "x-sm-user-id": `dhravya`, - "x-sm-conversation-id": "conversation-id" - }, -}) - -const messages = [ -{"role" : "user", "text": "SOme long thing"}, -// .... 50 other messages -{"role" : "user", "text": "new message"}, -] - -const client.generateText(messages) - -// Next time, you dont need to send more. -const messages2 = [{"role" : "user", "text": "What did we talk about in this conversation, and the one we did last year?"}] - -const client.generateText(messages2) -``` - -## Implementation Examples - -### Google Gemini - -```typescript -const ai = new GoogleGenAI({ apiKey: "YOUR_API_KEY" }); - -async function main() { - const response = await ai.models.generateContent({ - model: "gemini-2.0-flash", - contents: "Explain how AI works in a few words", - config: { - httpOptions: { - headers: { - 'x-sm-user-id': "user_123" - } - } - }, - }); - console.debug(response.text); -} -``` - -### Anthropic - -```typescript -const anthropic = new Anthropic({ - apiKey: 'YOUR_API_KEY', // defaults to process.env["ANTHROPIC_API_KEY"] -}); - -async function main() { - const msg = await anthropic.messages.create({ - model: "claude-sonnet-4-20250514", - max_tokens: 1024, - messages: [{ role: "user", content: "Hello, Claude" }], - }, { - // Using headers - headers: { - 'x-sm-user-id': "user_123" - } - }); - - console.debug(msg); -} -``` - -### OpenAI - -```typescript -const openai = new OpenAI({ - apiKey: "YOUR_API_KEY" -}); - -async function main() { - const completion = await openai.chat.completions.create({ - messages: [ - { role: "user", content: "Hello, Assistant" } - ], - model: "gpt-4o", - user: "user_123" - }); - - console.debug(completion.choices[0].message); -} -``` \ No newline at end of file diff --git a/apps/docs/overview/use-cases.mdx b/apps/docs/overview/use-cases.mdx deleted file mode 100644 index a10f9aae..00000000 --- a/apps/docs/overview/use-cases.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: "Use Cases" -description: "What can you do with supermemory?" -mode: "wide" ---- - -Explore what you can build with supermemory: - - - - Quickly built apps to chat with: - - • Your Twitter bookmarks \ - • Your PDF documents \ - • Your company documentation \ - ...and more\! - - - Search everything with AI: - - • Product recommendations \ - • Document similarity matching \ - • Research paper analysis - - ...and more\! - - - Build agents with infinite context for: - - • Email management \ - • Meeting summarization \ - • Calendar organization \ - ...and more\! - - - Build your own second brain: - - • Organize your notes, ideas, and resources - - • Connect concepts across documents - - • Never lose track of insights or inspiration - - ...and more\! - - - For agencies and creators: - - • Maintain consistent tone and style - • Analyze your brand’s unique voice - • Write with context-aware suggestions - - ...and more\! - - - For clinics, hospitals, and researchers: - - • Securely summarize patient records - - • Extract key info from medical history - - • Support clinical decisions with AI - - ...and more\! - - - For online communities and businesses: - - • Powered by your chat or forum history - - • Instant, accurate answers - - • Reduce support load - - ...and more\! - - - For students and educators: - - • Flashcards and quizzes from your notes - - • Search across textbooks and lectures - - • Personalized study assistants - - ...and more\! - - - For law firms and compliance teams: - - • Search through contracts and case law - - • Extract clauses, obligations, and risks - - • Keep up with regulatory changes - - ...and more\! - - - For companies and teams: - - • Centralize all internal documentation - - • Search across wikis, policies, and emails - - • Onboard new hires faster - - ...and more\! - - \ No newline at end of file diff --git a/apps/docs/overview/why-supermemory.mdx b/apps/docs/overview/why-supermemory.mdx deleted file mode 100644 index c1d651a9..00000000 --- a/apps/docs/overview/why-supermemory.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "Why supermemory?" -description: "Learn the problems and challenges of building a memory layer, and how supermemory solves them!" ---- - -### The problem - -...so you want to build your own memory layer. Let's go through your decision process: - - - - - - Oh no, it's way too expensive. Time to switch. - - Turns out it's painfully slow. Let's try another. - - Great, now it won't scale. Back to square one. - - The maintenance is a nightmare. Need something else. - - - - - - Which model fits your use case - - What are the performance tradeoffs - - How to keep up with new releases - - - - - - - Websites: How do you handle JavaScript? What about rate limits? - - PDFs: OCR keeps failing, text extraction is inconsistent - - Images: Need computer vision models now? - - Audio/Video: Transcription costs add up quickly - - - - - -And in the middle of all this, you're wondering... - -> "When will I actually ship my product?" - -### The solution - -If you're not a fan of reinventing the wheel, you can use supermemory. - - - - - Start for free, scale as you grow - - Simple API, deploy in minutes - - No complex setup or maintenance - - Clear, predictable pricing - - - - Notion, Google Drive, Slack - - Web scraping and PDF processing - - Email and calendar sync - - Custom connector SDK - - - - Enterprise-grade security - - Sub-200ms latency at scale - - Automatic failover and redundancy - - 99.9% uptime guarantee - - - -Stop reinventing the wheel. Focus on building your product while we handle the memory infrastructure. \ No newline at end of file diff --git a/apps/docs/snippets/getting-api-key.mdx b/apps/docs/snippets/getting-api-key.mdx deleted file mode 100644 index 1531f5dc..00000000 --- a/apps/docs/snippets/getting-api-key.mdx +++ /dev/null @@ -1,34 +0,0 @@ -Head to [supermemory's Developer Platform](https://console.supermemory.ai) built to help you monitor and manage every aspect of the API. - - - - - An account will automatically be created on your first login. - - ![Dev Platform Login Pn](/images/dev-platform-login.png) - - - - - ![Dev Platform Api Keys Pn](/images/dev-platform-api-keys.png) - - Click `Create API Key` - - - ![Dev Platform Create Key Pn](/images/dev-platform-create-key.png) - - Click `Create` - - - ![Dev Platform Copy Key Pn](/images/dev-platform-copy-key.png) - - Click to copy - - - - - - -Done\! You can now use your API key to authenticate requests to the supermemory API. - -Next up, let's add your first memory. \ No newline at end of file diff --git a/apps/docs/supermemory-mcp/introduction.mdx b/apps/docs/supermemory-mcp/introduction.mdx deleted file mode 100644 index 0ee96b45..00000000 --- a/apps/docs/supermemory-mcp/introduction.mdx +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: 'About supermemory MCP' -description: 'Carry your memories with you, using supermemory MCP' ---- - -supermemory MCP is a lightweight **consumer-facing** component that allows you to carry your memories with you across any AI platform. It serves as a universal memory layer that enables Large Language Models (LLMs) to maintain persistent context and memories across different applications and sessions, solving the fundamental limitation of AI assistants forgetting everything between conversations. - -## What supermemory MCP is and how it works - -**supermemory MCP** functions as an open-source, universal memory system that bridges the gap between isolated AI applications through the Model Context Protocol (MCP). It operates as a **meta MCP server** that creates individual server instances for each user, providing seamless memory persistence across any MCP-compatible LLM client including ChatGPT, Claude, Windsurf, Cursor, and VS Code. - -The system works by running as an MCP server that communicates with MCP-compatible clients, storing and retrieving contextual information through the robust supermemory API infrastructure. When users interact with any connected AI application, the system automatically captures relevant information and makes it available to all other connected platforms through **semantic search and intelligent retrieval**. - - -It is also a great example of how you can use supermemory to build your own consumer-facing applications. - - Code behind the scenes - - - -### Key consumer benefits - -- **No login requirements**: Access granted via unique, private URLs that serve as both identifier and API key -- **Completely free**: Fully functional hosted service available at no cost -- **One-command setup**: Single CLI installation: `npx install-mcp [URL] --client [CLIENT]` -- **Universal compatibility**: Works seamlessly across multiple LLM clients and platforms - - -### Core workflow process - -1. User interacts with any MCP-compatible AI client -2. The client connects to supermemory MCP server via a unique, private URL -3. During conversations, relevant information is stored using the `addToSupermemory` action -4. When context is needed, the `searchSupermemory` action retrieves relevant memories -5. The AI assistant accesses this persistent context regardless of which platform is being used - -## Building applications with supermemory - -supermemory MCP demonstrates building consumer applications with supermemory through its **API-first architecture**. The system acts as a "customer" of the underlying supermemory API infrastructure, showcasing how developers can leverage the platform to create their own memory-enabled applications. - -### Supported platforms - -- **Claude Desktop**: Direct SSE connection support -- **Cursor IDE**: Global MCP server configuration via `~/.cursor/mcp.json` -- **Windsurf**: Seamless integration for AI-powered development -- **VS Code**: Compatible with various AI coding extensions -- **Cline/Roo-Cline**: Full MCP protocol support -- **Any MCP-compatible application**: Universal compatibility through standard protocol implementation - -## Security and privacy considerations - -### Security model - -- **URL-based authentication**: Random URLs serve as access keys, eliminating traditional login complexity -- **Session isolation**: Complete user data separation through unique URL paths -- **Self-hosting option**: Full control over data and infrastructure for privacy-conscious users -- **No authentication overhead**: Simplified access without traditional username/password systems - -### Privacy features - -- **Data isolation**: User memories completely separated by unique URLs -- **Local control option**: Self-hosting capability for enterprise or sensitive use cases -- **Secure infrastructure**: Built on Cloudflare's enterprise-grade security platform - -## Future developments and ecosystem - -The project represents a **breakthrough in AI memory portability**, with ongoing developments including: - -- **Infinite Chat API**: Enhanced inline memory management with conversation history -- **Expanded client support**: More MCP clients adding SSE connection capabilities -- **Enterprise features**: Advanced security and compliance options for business use -- **Integration expansion**: Potential connections to Google Drive, Notion, OneDrive, and other productivity platforms - -supermemory MCP successfully demonstrates how to build compelling consumer-facing applications using supermemory's infrastructure, achieving massive adoption through exceptional user experience design combined with robust technical architecture. Its success validates the market demand for universal AI memory solutions and provides a compelling template for developers building their own memory-enabled applications. \ No newline at end of file diff --git a/apps/docs/supermemory-mcp/setup.mdx b/apps/docs/supermemory-mcp/setup.mdx deleted file mode 100644 index 23f17967..00000000 --- a/apps/docs/supermemory-mcp/setup.mdx +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: 'Setup and usage' -description: 'How to set up and use supermemory MCP' ---- - -### Hosted setup (recommended) - -1. **Visit** https://mcp.supermemory.ai -2. **Receive** automatically generated unique URL (e.g., `https://mcp.supermemory.ai/TN-IKxAcDdHWTJkMhtGLF/sse`) -3. **Select** your MCP client from the dropdown menu -4. **Copy** the generated installation command -5. **Run** the command: `npx install-mcp [YOUR_URL] --client [CLIENT_NAME]` - -Or follow the client configuration example below. - -### Self-hosted configuration - -For users requiring complete data control: - -1. **Obtain API key** from https://console.supermemory.ai -2. **Create `.env` file** with `SUPERMEMORY_API_KEY=your_key` -3. **Clone repository**: `git clone https://github.com/supermemoryai/supermemory-mcp.git` -4. **Configure MCP client** to connect to local server instance - -### Client configuration example - -1. For Clients that support `url` configuration: -```json -{ - "mcpServers": { - "supermemory": { - "transport": "sse", - "url": "https://mcp.supermemory.ai/[USER_ID]/sse" - } - } -} -``` - -2. Using `supergateway` with `npx`: -```json -{ - "command": "npx", - "args": ["-y", "supergateway", "--sse", "YOUR_URL"] -} -``` - -3. Using `supergateway` with `docker`: - -The equivalent MCP command would be: -```json -{ - "mcpServers": { - "supermachineExampleDocker": { - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "supercorp/supergateway", - "--sse", - "YOUR_SUPERMEMORY_URL" - ] - } - } -} -``` - diff --git a/apps/docs/supermemory-mcp/technology.mdx b/apps/docs/supermemory-mcp/technology.mdx deleted file mode 100644 index 5f64e87d..00000000 --- a/apps/docs/supermemory-mcp/technology.mdx +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: 'Technical implementation details' -description: 'Technical implementation details of supermemory MCP' ---- - -The technical architecture prioritizes **simplicity and user experience** while maintaining robust functionality. Built as what the creators describe as "the simplest thing you'll see" - essentially a React Router application making fetch calls to the supermemory API - the entire system was developed and shipped in approximately 5 hours of actual work time. - -### Architecture components - -- **Backend API**: Built on top of the supermemory API (https://api.supermemory.ai/v3) -- **Transport Layer**: Uses Server-Sent Events (SSE) for real-time communication -- **Dynamic Server Generation**: Creates unique MCP server instances for each user via URL path parameters -- **Session Management**: Maintains complete user isolation through unique URLs -- **Infrastructure**: Hosted on Cloudflare using Durable Objects for persistent, long-running connections - -The system leverages **Cloudflare's infrastructure** with CPU-based billing, making it highly efficient since memory connections spend most time waiting between interactions rather than actively processing, resulting in minimal CPU usage despite potentially running for millions of milliseconds. - -## The two main components explained - -### addToSupermemory action - -This component **stores user information, preferences, and behavioral patterns** with sophisticated triggering mechanisms: - -**Trigger methods:** -- **Explicit commands**: Direct user instructions like "remember this" -- **Implicit detection**: Automatic identification of significant user traits, preferences, or patterns during conversations - -**Data types captured:** -- Technical preferences and details (e.g., "My primary programming language is Python") -- Project information and context (e.g., "I'm currently working on a project named 'Apollo'") -- User behaviors and emotional responses -- Personal facts, preferences, and decision-making patterns -- Rich context including technical details and examples - -### searchSupermemory action - -This component **retrieves relevant information** from stored memories using advanced search capabilities: - -**Activation triggers:** -- Explicit user requests for historical information -- Contextual situations where past user choices would be helpful for current decisions -- Automatic context enhancement based on conversation flow - -**Search capabilities:** -- **Semantic matching**: Finds relevant details across related experiences using vector search -- **Pattern recognition**: Identifies behavioral patterns and preferences -- **Cross-session retrieval**: Accesses memories from previous conversations and platforms -- **Intelligent filtering**: Returns most relevant context based on current conversation needs diff --git a/packages/ai-sdk/README.md b/packages/ai-sdk/README.md index da7fa8ab..8f96d438 100644 --- a/packages/ai-sdk/README.md +++ b/packages/ai-sdk/README.md @@ -26,29 +26,20 @@ Choose **one** of the following approaches (they cannot be used together): The infinite chat provider allows you to connect to various LLM providers with supermemory's context management. ```typescript -import { createSupermemoryInfiniteChat } from '@supermemory/ai-sdk' import { generateText } from 'ai' -// Using a named provider -const supermemory = createSupermemoryInfiniteChat('your-supermemory-api-key', { - providerName: 'openai', - providerApiKey: 'your-openai-api-key', - headers: { - // Optional additional headers - } -}) - // Using a custom provider URL -const supermemory = createSupermemoryInfiniteChat('your-supermemory-api-key', { - providerUrl: 'https://your-custom-provider.com/v1/chat/completions', - providerApiKey: 'your-provider-api-key', +const supermemoryOpenai = createOpenAI({ + baseUrl: 'https://api.supermemory.ai/v3/https://api.openai.com/v1', + apiKey: 'your-provider-api-key', headers: { - // Optional additional headers + 'x-supermemory-api-key': 'supermemory-api-key', + 'x-sm-conversation-id': 'conversation-id' } }) const result = await generateText({ - model: supermemory('gpt-4-turbo'), + model: supermemoryOpenai('gpt-4-turbo'), messages: [ { role: 'user', content: 'Hello, how are you?' } ] @@ -58,35 +49,37 @@ const result = await generateText({ ### Complete Infinite Chat Example ```typescript -import { createSupermemoryInfiniteChat } from '@supermemory/ai-sdk' import { generateText } from 'ai' const supermemoryApiKey = process.env.SUPERMEMORY_API_KEY! const openaiApiKey = process.env.OPENAI_API_KEY! // Initialize infinite chat provider -const supermemory = createSupermemoryInfiniteChat(supermemoryApiKey, { - providerName: 'openai', - providerApiKey: openaiApiKey, - headers: {} +const supermemoryOpenai = createOpenAI({ + baseUrl: 'https://api.supermemory.ai/v3/https://api.openai.com/v1', + apiKey: 'your-provider-api-key', + headers: { + 'x-supermemory-api-key': 'supermemory-api-key', + 'x-sm-conversation-id': 'conversation-id' + } }) async function chat(userMessage: string) { const result = await generateText({ - model: supermemory('gpt-4-turbo'), + model: supermemoryOpenai('gpt-4-turbo'), messages: [ - { - role: 'system', - content: 'You are a helpful assistant with unlimited context.' + { + role: 'system', + content: 'You are a helpful assistant with unlimited context.' }, - { - role: 'user', - content: userMessage + { + role: 'user', + content: userMessage } ] // No tools - infinite chat handles context automatically }) - + return result.text } ``` @@ -126,7 +119,7 @@ const result = await generateText({ ...supermemoryTools('your-supermemory-api-key', { // Optional: specify a base URL for self-hosted instances baseUrl: 'https://api.supermemory.com', - + // Use either projectId OR containerTags, not both projectId: 'your-project-id', // OR @@ -150,13 +143,13 @@ async function chatWithTools(userMessage: string) { const result = await generateText({ model: openai('gpt-4-turbo'), // Use standard provider messages: [ - { - role: 'system', - content: 'You are a helpful assistant with access to user memories.' + { + role: 'system', + content: 'You are a helpful assistant with access to user memories.' }, - { - role: 'user', - content: userMessage + { + role: 'user', + content: userMessage } ], tools: { @@ -166,7 +159,7 @@ async function chatWithTools(userMessage: string) { }, maxToolRoundtrips: 5 }) - + return result.text } ``` @@ -177,10 +170,10 @@ async function chatWithTools(userMessage: string) { interface SupermemoryConfig { // Optional: Base URL for API calls (default: https://api.supermemory.com) baseUrl?: string - + // Container tags for organizing memories (cannot be used with projectId) containerTags?: string[] - + // Project ID for scoping memories (cannot be used with containerTags) projectId?: string } @@ -234,10 +227,10 @@ const fetchResult = await tools.fetchMemory.execute({ For more flexibility, you can import and use individual tools: ```typescript -import { - searchMemoriesTool, - addMemoryTool, - fetchMemoryTool +import { + searchMemoriesTool, + addMemoryTool, + fetchMemoryTool } from '@supermemory/ai-sdk' const searchTool = searchMemoriesTool('your-api-key', { @@ -310,4 +303,4 @@ MIT ## Support -Email our [24/7 Founder/CEO/Support Executive](dhravya@supermemory.com) \ No newline at end of file +Email our [24/7 Founder/CEO/Support Executive](dhravya@supermemory.com) diff --git a/packages/tools/README.md b/packages/tools/README.md index dfbf472c..61f1c042 100644 --- a/packages/tools/README.md +++ b/packages/tools/README.md @@ -7,13 +7,13 @@ This package provides supermemory tools for both AI SDK and OpenAI function call ## Installation ```bash -npm install @supermemory/ai-sdk +npm install @supermemory/tools # or -bun add @supermemory/ai-sdk +bun add @supermemory/tools # or -pnpm add @supermemory/ai-sdk +pnpm add @supermemory/tools # or -yarn add @supermemory/ai-sdk +yarn add @supermemory/tools ``` ## Usage @@ -152,4 +152,4 @@ Adds a new memory to the system. ```env SUPERMEMORY_API_KEY=your_supermemory_api_key SUPERMEMORY_BASE_URL=https://your-custom-url # optional -``` \ No newline at end of file +``` -- cgit v1.2.3