diff options
| author | Dhravya Shah <[email protected]> | 2025-09-13 22:09:40 -0700 |
|---|---|---|
| committer | Dhravya Shah <[email protected]> | 2025-09-13 22:09:40 -0700 |
| commit | 90fd19f2156e28845d9288ea8ffc2d7d9573b77a (patch) | |
| tree | e630e3943d70b688c42a762c11c745159e1d6771 /apps/docs | |
| parent | Merge branch 'main' of https://github.com/supermemoryai/supermemory (diff) | |
| download | supermemory-90fd19f2156e28845d9288ea8ffc2d7d9573b77a.tar.xz supermemory-90fd19f2156e28845d9288ea8ffc2d7d9573b77a.zip | |
update: Readme
Diffstat (limited to 'apps/docs')
58 files changed, 0 insertions, 3938 deletions
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 -<Accordion title="Section Title" defaultOpen icon="sparkles"> - Content goes here... -</Accordion> -``` - -Example: @creation/supported-types.mdx - -### Notes and Warnings - -For important information: - -```mdx -<Note> - Important information goes here. -</Note> - -<Warning> - Critical warning goes here. -</Warning> -``` - -Example: @creation/adding-memories.mdx - -### Code Examples - -For multi-language code examples: - -```mdx -<CodeGroup> - -```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" -) -``` - -</CodeGroup> -``` - -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" ---- - -<Update label="2025-04-30" description="Major Platform Updates"> - - **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 -</Update> - -<Update label="2025-04-28" description="Google Drive Provider Added"> - - **Google Drive Provider:** Added support for Google Drive provider. -</Update> - -<Update label="2025-04-27" description="More Improvements"> - - **Optional summaries in search:** Choose to include document summaries in your search results. - - **Better document ranking:** Document similarity scoring is now more accurate. -</Update> - -<Update label="2025-04-25" description="Recent Improvements"> - - **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. -</Update> - -<Update label="2025-04-24" description="Query Rewriting & User Profiling"> - - **Query rewriting:** We now rewrite queries for better search results and intent matching. - - **User profiling:** Personalized search results based on user profiles. -</Update> - -<Update label="2025-04-18" description="Ingestion Pipeline Revamp"> - - **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. -</Update> - -<Update label="2025-04-14" description="Weekend Launches"> - - **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!** -</Update> - -<Update label="2025-02-01" description="v0.1.1"> - - 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) -</Update>
\ 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' ---- - -<Warning> -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). -</Warning> - -## 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:[email protected]", - "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 Binary files differdeleted file mode 100644 index 4c3dd878..00000000 --- a/apps/docs/favicon.png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-06-19 at 3.50.20 PM.png b/apps/docs/images/Screenshot 2025-06-19 at 3.50.20 PM.png Binary files differdeleted file mode 100644 index 4e110427..00000000 --- a/apps/docs/images/Screenshot 2025-06-19 at 3.50.20 PM.png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM (2).png b/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM (2).png Binary files differdeleted file mode 100644 index 12141246..00000000 --- a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM (2).png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM (3).png b/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM (3).png Binary files differdeleted file mode 100644 index a278db3e..00000000 --- a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM (3).png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM.png b/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM.png Binary files differdeleted file mode 100644 index 7b265488..00000000 --- a/apps/docs/images/Screenshot 2025-07-05 at 7.16.18 PM.png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM (2).png b/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM (2).png Binary files differdeleted file mode 100644 index 12141246..00000000 --- a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM (2).png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM (3).png b/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM (3).png Binary files differdeleted file mode 100644 index a278db3e..00000000 --- a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM (3).png +++ /dev/null diff --git a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM.png b/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM.png Binary files differdeleted file mode 100644 index 4c853197..00000000 --- a/apps/docs/images/Screenshot 2025-07-05 at 7.16.22 PM.png +++ /dev/null diff --git a/apps/docs/images/connectors-flow.png b/apps/docs/images/connectors-flow.png Binary files differdeleted file mode 100644 index bcee681c..00000000 --- a/apps/docs/images/connectors-flow.png +++ /dev/null diff --git a/apps/docs/images/dev-platform-api-keys.png b/apps/docs/images/dev-platform-api-keys.png Binary files differdeleted file mode 100644 index 011689ca..00000000 --- a/apps/docs/images/dev-platform-api-keys.png +++ /dev/null diff --git a/apps/docs/images/dev-platform-copy-key.png b/apps/docs/images/dev-platform-copy-key.png Binary files differdeleted file mode 100644 index 5e9039cb..00000000 --- a/apps/docs/images/dev-platform-copy-key.png +++ /dev/null diff --git a/apps/docs/images/dev-platform-create-key.png b/apps/docs/images/dev-platform-create-key.png Binary files differdeleted file mode 100644 index 84df9637..00000000 --- a/apps/docs/images/dev-platform-create-key.png +++ /dev/null diff --git a/apps/docs/images/dev-platform-login.png b/apps/docs/images/dev-platform-login.png Binary files differdeleted file mode 100644 index 1ab67e4f..00000000 --- a/apps/docs/images/dev-platform-login.png +++ /dev/null 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 @@ -<svg width="2344" height="969" viewBox="0 0 2344 969" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g clip-path="url(#clip0_2392_147)"> -<rect width="2344" height="969" rx="100" fill="#0F1114"/> -<g opacity="0.4" filter="url(#filter0_f_2392_147)"> -<rect x="-2772.03" y="1936.79" width="7287.1" height="929.709" transform="rotate(-30 -2772.03 1936.79)" fill="#369DFD"/> -</g> -<g filter="url(#filter1_d_2392_147)"> -<path d="M854.654 430.165L832.896 432.517C832.678 430.295 832.003 428.226 830.87 426.31C829.738 424.393 828.039 422.868 825.774 421.736C823.552 420.56 820.677 419.972 817.149 419.972C812.008 419.972 807.5 421.126 803.623 423.435C799.746 425.743 797.546 428.705 797.024 432.321C796.544 435.022 797.198 437.222 798.984 438.92C800.77 440.619 804.08 442.057 808.916 443.233L825.512 446.892C834.66 448.939 841.238 452.25 845.245 456.824C849.296 461.398 850.712 467.387 849.492 474.793C848.447 480.978 845.746 486.423 841.39 491.128C837.034 495.789 831.458 499.426 824.663 502.04C817.911 504.653 810.418 505.96 802.186 505.96C789.684 505.96 780.057 503.368 773.305 498.185C766.597 492.957 763.264 485.77 763.308 476.622L786.569 474.401C786.83 478.931 788.42 482.35 791.339 484.659C794.258 486.924 798.309 488.079 803.492 488.122C809.329 488.166 814.252 486.946 818.259 484.463C822.311 481.937 824.597 478.866 825.12 475.25C825.556 472.549 824.881 470.349 823.095 468.651C821.352 466.952 818.238 465.601 813.751 464.599L797.285 461.006C787.963 458.958 781.32 455.495 777.356 450.616C773.436 445.694 772.107 439.487 773.37 431.994C774.416 425.896 776.964 420.647 781.015 416.247C785.11 411.804 790.359 408.384 796.762 405.989C803.166 403.549 810.331 402.33 818.259 402.33C830.195 402.33 839.19 404.834 845.245 409.844C851.3 414.853 854.436 421.627 854.654 430.165ZM931.376 461.79L941.112 403.636H964.765L948.038 504H925.104L928.109 486.162H927.064C923.927 491.781 919.441 496.377 913.604 499.949C907.81 503.521 901.145 505.307 893.609 505.307C887.032 505.307 881.478 503.848 876.947 500.929C872.417 497.967 869.194 493.676 867.277 488.057C865.404 482.394 865.121 475.555 866.427 467.54L877.143 403.636H900.797L890.734 463.881C889.732 470.241 890.647 475.294 893.479 479.04C896.354 482.786 900.622 484.659 906.285 484.659C909.77 484.659 913.277 483.81 916.805 482.111C920.377 480.412 923.492 477.885 926.149 474.531C928.806 471.134 930.549 466.886 931.376 461.79ZM962.474 541.636L985.605 403.636H1008.87L1006.19 420.233H1007.56C1009.13 417.794 1011.24 415.202 1013.9 412.457C1016.6 409.67 1020.02 407.295 1024.16 405.335C1028.29 403.331 1033.33 402.33 1039.25 402.33C1046.96 402.33 1053.6 404.312 1059.18 408.276C1064.75 412.196 1068.74 418.011 1071.14 425.722C1073.58 433.388 1073.88 442.797 1072.05 453.949C1070.22 464.97 1066.85 474.335 1061.92 482.045C1057 489.756 1051.1 495.636 1044.22 499.688C1037.33 503.739 1029.95 505.764 1022.06 505.764C1016.31 505.764 1011.68 504.806 1008.15 502.889C1004.66 500.973 1002.03 498.664 1000.24 495.963C998.455 493.219 997.126 490.627 996.255 488.188H995.21L986.323 541.636H962.474ZM1000.44 453.818C999.392 460.309 999.37 465.993 1000.37 470.872C1001.42 475.751 1003.49 479.562 1006.58 482.307C1009.67 485.008 1013.72 486.358 1018.73 486.358C1023.96 486.358 1028.53 484.964 1032.45 482.176C1036.42 479.345 1039.71 475.49 1042.32 470.611C1044.98 465.688 1046.85 460.091 1047.94 453.818C1048.94 447.589 1048.94 442.057 1047.94 437.222C1046.94 432.386 1044.91 428.597 1041.86 425.852C1038.81 423.108 1034.68 421.736 1029.45 421.736C1024.35 421.736 1019.8 423.064 1015.79 425.722C1011.83 428.379 1008.54 432.103 1005.93 436.895C1003.31 441.687 1001.48 447.328 1000.44 453.818ZM1124.35 505.96C1114.29 505.96 1105.97 503.869 1099.39 499.688C1092.81 495.462 1088.2 489.494 1085.54 481.784C1082.93 474.03 1082.49 464.904 1084.23 454.406C1085.93 444.082 1089.39 435.022 1094.62 427.224C1099.85 419.384 1106.38 413.285 1114.22 408.929C1122.11 404.529 1130.82 402.33 1140.36 402.33C1146.55 402.33 1152.23 403.331 1157.41 405.335C1162.6 407.295 1166.98 410.345 1170.55 414.483C1174.12 418.621 1176.58 423.892 1177.93 430.295C1179.28 436.655 1179.22 444.235 1177.73 453.034L1176.62 460.287H1094.29L1096.84 444.344H1156.43C1157.22 439.813 1156.96 435.784 1155.65 432.256C1154.34 428.684 1152.16 425.874 1149.12 423.827C1146.07 421.779 1142.25 420.756 1137.68 420.756C1133.02 420.756 1128.66 421.954 1124.61 424.349C1120.61 426.702 1117.23 429.751 1114.48 433.497C1111.74 437.243 1110 441.186 1109.26 445.324L1106.58 460.614C1105.62 466.886 1105.84 472.005 1107.23 475.969C1108.63 479.933 1111.07 482.851 1114.55 484.724C1118.04 486.598 1122.43 487.534 1127.75 487.534C1131.23 487.534 1134.46 487.055 1137.42 486.097C1140.38 485.138 1143.02 483.701 1145.33 481.784C1147.68 479.824 1149.64 477.428 1151.21 474.597L1172.83 477.08C1170.44 482.917 1166.93 488.013 1162.31 492.369C1157.7 496.682 1152.16 500.036 1145.72 502.432C1139.31 504.784 1132.19 505.96 1124.35 505.96ZM1185.75 504L1202.48 403.636H1225.41L1222.6 420.364H1223.65C1226.39 414.57 1230.27 410.105 1235.28 406.969C1240.33 403.789 1245.73 402.199 1251.48 402.199C1252.83 402.199 1254.29 402.264 1255.86 402.395C1257.43 402.482 1258.78 402.634 1259.91 402.852L1256.25 424.611C1255.25 424.262 1253.68 423.957 1251.55 423.696C1249.46 423.391 1247.39 423.239 1245.34 423.239C1241.03 423.239 1237.02 424.175 1233.32 426.048C1229.66 427.878 1226.57 430.426 1224.04 433.693C1221.51 436.96 1219.88 440.728 1219.14 444.997L1209.4 504H1185.75ZM1255.27 504L1272 403.636H1294.67L1291.79 420.69H1293.04C1296.09 414.94 1300.29 410.454 1305.65 407.23C1311 403.963 1317.04 402.33 1323.75 402.33C1330.5 402.33 1335.94 403.985 1340.08 407.295C1344.26 410.562 1346.83 415.027 1347.79 420.69H1348.84C1351.97 415.071 1356.46 410.606 1362.3 407.295C1368.18 403.985 1374.78 402.33 1382.1 402.33C1391.24 402.33 1398.26 405.248 1403.14 411.085C1408.01 416.922 1409.52 425.438 1407.64 436.634L1396.41 504H1372.75L1383.47 440.293C1384.43 434.063 1383.47 429.511 1380.59 426.636C1377.76 423.718 1373.95 422.259 1369.16 422.259C1363.45 422.259 1358.7 424.023 1354.91 427.551C1351.17 431.08 1348.86 435.697 1347.99 441.403L1337.47 504H1314.27L1325.12 439.312C1325.9 434.129 1324.99 429.991 1322.37 426.898C1319.8 423.805 1316.01 422.259 1311 422.259C1307.61 422.259 1304.36 423.13 1301.27 424.872C1298.18 426.615 1295.54 429.054 1293.36 432.19C1291.23 435.283 1289.83 438.877 1289.18 442.972L1278.99 504H1255.27ZM1460.83 505.96C1450.76 505.96 1442.44 503.869 1435.87 499.688C1429.29 495.462 1424.67 489.494 1422.01 481.784C1419.4 474.03 1418.97 464.904 1420.71 454.406C1422.41 444.082 1425.87 435.022 1431.1 427.224C1436.32 419.384 1442.86 413.285 1450.7 408.929C1458.58 404.529 1467.3 402.33 1476.84 402.33C1483.02 402.33 1488.71 403.331 1493.89 405.335C1499.07 407.295 1503.45 410.345 1507.02 414.483C1510.6 418.621 1513.06 423.892 1514.41 430.295C1515.76 436.655 1515.69 444.235 1514.21 453.034L1513.1 460.287H1430.77L1433.32 444.344H1492.91C1493.69 439.813 1493.43 435.784 1492.13 432.256C1490.82 428.684 1488.64 425.874 1485.59 423.827C1482.54 421.779 1478.73 420.756 1474.16 420.756C1469.5 420.756 1465.14 421.954 1461.09 424.349C1457.08 426.702 1453.71 429.751 1450.96 433.497C1448.22 437.243 1446.47 441.186 1445.73 445.324L1443.05 460.614C1442.1 466.886 1442.31 472.005 1443.71 475.969C1445.1 479.933 1447.54 482.851 1451.03 484.724C1454.51 486.598 1458.91 487.534 1464.22 487.534C1467.71 487.534 1470.93 487.055 1473.9 486.097C1476.86 485.138 1479.49 483.701 1481.8 481.784C1484.15 479.824 1486.11 477.428 1487.68 474.597L1509.31 477.08C1506.91 482.917 1503.41 488.013 1498.79 492.369C1494.17 496.682 1488.64 500.036 1482.19 502.432C1475.79 504.784 1468.67 505.96 1460.83 505.96ZM1522.29 504L1539.02 403.636H1561.69L1558.82 420.69H1560.06C1563.11 414.94 1567.31 410.454 1572.67 407.23C1578.03 403.963 1584.06 402.33 1590.77 402.33C1597.52 402.33 1602.97 403.985 1607.1 407.295C1611.29 410.562 1613.86 415.027 1614.81 420.69H1615.86C1619 415.071 1623.48 410.606 1629.32 407.295C1635.2 403.985 1641.8 402.33 1649.12 402.33C1658.27 402.33 1665.28 405.248 1670.16 411.085C1675.04 416.922 1676.54 425.438 1674.67 436.634L1663.43 504H1639.77L1650.49 440.293C1651.45 434.063 1650.49 429.511 1647.62 426.636C1644.78 423.718 1640.97 422.259 1636.18 422.259C1630.47 422.259 1625.73 424.023 1621.94 427.551C1618.19 431.08 1615.88 435.697 1615.01 441.403L1604.49 504H1581.29L1592.14 439.312C1592.93 434.129 1592.01 429.991 1589.4 426.898C1586.83 423.805 1583.04 422.259 1578.03 422.259C1574.63 422.259 1571.38 423.13 1568.29 424.872C1565.2 426.615 1562.56 429.054 1560.39 432.19C1558.25 435.283 1556.86 438.877 1556.2 442.972L1546.01 504H1522.29ZM1727.72 505.96C1717.83 505.96 1709.6 503.782 1703.02 499.426C1696.49 495.07 1691.89 488.95 1689.23 481.065C1686.58 473.181 1686.1 464.033 1687.8 453.622C1689.49 443.342 1692.89 434.347 1697.99 426.636C1703.13 418.926 1709.6 412.958 1717.4 408.733C1725.24 404.464 1734.01 402.33 1743.73 402.33C1753.62 402.33 1761.83 404.529 1768.36 408.929C1774.9 413.285 1779.49 419.405 1782.15 427.29C1784.85 435.174 1785.35 444.366 1783.65 454.864C1782 465.1 1778.58 474.052 1773.39 481.719C1768.25 489.385 1761.78 495.353 1753.99 499.622C1746.19 503.848 1737.43 505.96 1727.72 505.96ZM1729.68 487.011C1735.17 487.011 1739.98 485.53 1744.12 482.568C1748.3 479.562 1751.72 475.533 1754.38 470.48C1757.08 465.384 1758.95 459.721 1760 453.491C1760.96 447.48 1760.98 442.035 1760.06 437.156C1759.15 432.234 1757.19 428.335 1754.18 425.46C1751.22 422.542 1747.1 421.082 1741.83 421.082C1736.34 421.082 1731.49 422.607 1727.26 425.656C1723.08 428.662 1719.66 432.713 1717 437.81C1714.35 442.863 1712.52 448.504 1711.51 454.733C1710.51 460.744 1710.47 466.189 1711.38 471.068C1712.3 475.947 1714.26 479.824 1717.26 482.699C1720.27 485.574 1724.41 487.011 1729.68 487.011ZM1791.94 504L1808.67 403.636H1831.61L1828.8 420.364H1829.84C1832.59 414.57 1836.46 410.105 1841.47 406.969C1846.53 403.789 1851.93 402.199 1857.68 402.199C1859.03 402.199 1860.49 402.264 1862.06 402.395C1863.62 402.482 1864.97 402.634 1866.11 402.852L1862.45 424.611C1861.45 424.262 1859.88 423.957 1857.74 423.696C1855.65 423.391 1853.58 423.239 1851.54 423.239C1847.22 423.239 1843.22 424.175 1839.51 426.048C1835.85 427.878 1832.76 430.426 1830.23 433.693C1827.71 436.96 1826.07 440.728 1825.33 444.997L1815.6 504H1791.94ZM1873.01 541.636C1869.79 541.636 1866.85 541.375 1864.19 540.852C1861.58 540.373 1859.51 539.807 1857.98 539.153L1866.61 520.727C1869.88 521.729 1872.82 522.165 1875.43 522.034C1878.09 521.947 1880.53 521.054 1882.75 519.355C1885.01 517.7 1887.23 514.977 1889.41 511.188L1892.42 505.764L1873.21 403.636H1897.38L1907.84 479.562H1908.88L1944.76 403.636H1970.83L1912.09 516.023C1909.25 521.468 1905.97 526.085 1902.22 529.875C1898.47 533.708 1894.18 536.627 1889.35 538.631C1884.56 540.634 1879.11 541.636 1873.01 541.636Z" fill="white"/> -</g> -<path d="M481.982 251C506.33 251 513.5 270.609 513.5 294.75V379.125H554.473V346.711C554.473 330.963 560.782 315.861 572.013 304.726L578.531 298.263C577.246 295.264 576.536 291.964 576.536 288.5C576.536 274.693 587.825 263.5 601.75 263.5C615.675 263.5 626.964 274.693 626.964 288.5C626.964 302.307 615.675 313.5 601.75 313.5C598.256 313.5 594.928 312.795 591.903 311.522L585.385 317.984C577.701 325.603 573.384 335.936 573.384 346.711V379.125H641.404C645.145 369.963 654.204 363.5 664.786 363.5C678.711 363.5 690 374.693 690 388.5C690 402.307 678.711 413.5 664.786 413.5C654.204 413.5 645.145 407.037 641.404 397.875H513.5V454.125H578.369C582.109 444.963 591.168 438.5 601.75 438.5C615.675 438.5 626.964 449.693 626.964 463.5C626.964 477.307 615.675 488.5 601.75 488.5C591.168 488.5 582.109 482.037 578.368 472.875H513.5V529.125H568.255C584.137 529.125 599.369 535.381 610.599 546.516L642.331 577.978C645.357 576.705 648.685 576 652.179 576C666.104 576 677.393 587.193 677.393 601C677.393 614.807 666.104 626 652.179 626C638.253 626 626.964 614.807 626.964 601C626.964 597.536 627.675 594.236 628.96 591.237L597.227 559.774C589.543 552.155 579.121 547.875 568.255 547.875H513.5V607.25C513.5 631.391 506.33 651 481.982 651C459.211 651 440.457 633.891 438.094 611.859C433.996 612.953 429.662 613.5 425.25 613.5C397.435 613.5 374.821 591.078 374.821 563.5C374.821 557.719 375.846 552.094 377.658 546.937C353.862 538.031 337 515.219 337 488.5C337 463.578 351.735 442.016 373.088 432.016C366.233 423.5 362.214 412.719 362.214 401C362.214 377.016 379.234 357.016 401.927 352.094C400.666 347.797 400.036 343.187 400.036 338.5C400.036 315.141 416.267 295.453 438.094 289.984C440.457 268.109 459.211 251 481.982 251Z" fill="white"/> -</g> -<defs> -<filter id="filter0_f_2392_147" x="-3653.3" y="-2588.03" width="8538.21" height="6211.24" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> -<feFlood flood-opacity="0" result="BackgroundImageFix"/> -<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/> -<feGaussianBlur stdDeviation="440.634" result="effect1_foregroundBlur_2392_147"/> -</filter> -<filter id="filter1_d_2392_147" x="751.242" y="402.199" width="1219.59" height="147.438" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> -<feFlood flood-opacity="0" result="BackgroundImageFix"/> -<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/> -<feOffset dx="-8" dy="4"/> -<feGaussianBlur stdDeviation="2"/> -<feComposite in2="hardAlpha" operator="out"/> -<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.41 0"/> -<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2392_147"/> -<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2392_147" result="shape"/> -</filter> -<clipPath id="clip0_2392_147"> -<rect width="2344" height="969" rx="100" fill="white"/> -</clipPath> -</defs> -</svg> 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 @@ -<svg width="2344" height="969" viewBox="0 0 2344 969" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g clip-path="url(#clip0_2397_133)"> -<rect width="2344" height="969" rx="100" fill="white"/> -<g filter="url(#filter0_d_2397_133)"> -<path d="M854.654 430.165L832.896 432.517C832.678 430.295 832.003 428.226 830.87 426.31C829.738 424.393 828.039 422.868 825.774 421.736C823.552 420.56 820.677 419.972 817.149 419.972C812.008 419.972 807.5 421.126 803.623 423.435C799.746 425.743 797.546 428.705 797.024 432.321C796.544 435.022 797.198 437.222 798.984 438.92C800.77 440.619 804.08 442.057 808.916 443.233L825.512 446.892C834.66 448.939 841.238 452.25 845.245 456.824C849.296 461.398 850.712 467.387 849.492 474.793C848.447 480.978 845.746 486.423 841.39 491.128C837.034 495.789 831.458 499.426 824.663 502.04C817.911 504.653 810.418 505.96 802.186 505.96C789.684 505.96 780.057 503.368 773.305 498.185C766.597 492.957 763.264 485.77 763.308 476.622L786.569 474.401C786.83 478.931 788.42 482.35 791.339 484.659C794.258 486.924 798.309 488.079 803.492 488.122C809.329 488.166 814.252 486.946 818.259 484.463C822.311 481.937 824.597 478.866 825.12 475.25C825.556 472.549 824.881 470.349 823.095 468.651C821.352 466.952 818.238 465.601 813.751 464.599L797.285 461.006C787.963 458.958 781.32 455.495 777.356 450.616C773.436 445.694 772.107 439.487 773.37 431.994C774.416 425.896 776.964 420.647 781.015 416.247C785.11 411.804 790.359 408.384 796.762 405.989C803.166 403.549 810.331 402.33 818.259 402.33C830.195 402.33 839.19 404.834 845.245 409.844C851.3 414.853 854.436 421.627 854.654 430.165ZM931.376 461.79L941.112 403.636H964.765L948.038 504H925.104L928.109 486.162H927.064C923.927 491.781 919.441 496.377 913.604 499.949C907.81 503.521 901.145 505.307 893.609 505.307C887.032 505.307 881.478 503.848 876.947 500.929C872.417 497.967 869.194 493.676 867.277 488.057C865.404 482.394 865.121 475.555 866.427 467.54L877.143 403.636H900.797L890.734 463.881C889.732 470.241 890.647 475.294 893.479 479.04C896.354 482.786 900.622 484.659 906.285 484.659C909.77 484.659 913.277 483.81 916.805 482.111C920.377 480.412 923.492 477.885 926.149 474.531C928.806 471.134 930.549 466.886 931.376 461.79ZM962.474 541.636L985.605 403.636H1008.87L1006.19 420.233H1007.56C1009.13 417.794 1011.24 415.202 1013.9 412.457C1016.6 409.67 1020.02 407.295 1024.16 405.335C1028.29 403.331 1033.33 402.33 1039.25 402.33C1046.96 402.33 1053.6 404.312 1059.18 408.276C1064.75 412.196 1068.74 418.011 1071.14 425.722C1073.58 433.388 1073.88 442.797 1072.05 453.949C1070.22 464.97 1066.85 474.335 1061.92 482.045C1057 489.756 1051.1 495.636 1044.22 499.688C1037.33 503.739 1029.95 505.764 1022.06 505.764C1016.31 505.764 1011.68 504.806 1008.15 502.889C1004.66 500.973 1002.03 498.664 1000.24 495.963C998.455 493.219 997.126 490.627 996.255 488.188H995.21L986.323 541.636H962.474ZM1000.44 453.818C999.392 460.309 999.37 465.993 1000.37 470.872C1001.42 475.751 1003.49 479.562 1006.58 482.307C1009.67 485.008 1013.72 486.358 1018.73 486.358C1023.96 486.358 1028.53 484.964 1032.45 482.176C1036.42 479.345 1039.71 475.49 1042.32 470.611C1044.98 465.688 1046.85 460.091 1047.94 453.818C1048.94 447.589 1048.94 442.057 1047.94 437.222C1046.94 432.386 1044.91 428.597 1041.86 425.852C1038.81 423.108 1034.68 421.736 1029.45 421.736C1024.35 421.736 1019.8 423.064 1015.79 425.722C1011.83 428.379 1008.54 432.103 1005.93 436.895C1003.31 441.687 1001.48 447.328 1000.44 453.818ZM1124.35 505.96C1114.29 505.96 1105.97 503.869 1099.39 499.688C1092.81 495.462 1088.2 489.494 1085.54 481.784C1082.93 474.03 1082.49 464.904 1084.23 454.406C1085.93 444.082 1089.39 435.022 1094.62 427.224C1099.85 419.384 1106.38 413.285 1114.22 408.929C1122.11 404.529 1130.82 402.33 1140.36 402.33C1146.55 402.33 1152.23 403.331 1157.41 405.335C1162.6 407.295 1166.98 410.345 1170.55 414.483C1174.12 418.621 1176.58 423.892 1177.93 430.295C1179.28 436.655 1179.22 444.235 1177.73 453.034L1176.62 460.287H1094.29L1096.84 444.344H1156.43C1157.22 439.813 1156.96 435.784 1155.65 432.256C1154.34 428.684 1152.16 425.874 1149.12 423.827C1146.07 421.779 1142.25 420.756 1137.68 420.756C1133.02 420.756 1128.66 421.954 1124.61 424.349C1120.61 426.702 1117.23 429.751 1114.48 433.497C1111.74 437.243 1110 441.186 1109.26 445.324L1106.58 460.614C1105.62 466.886 1105.84 472.005 1107.23 475.969C1108.63 479.933 1111.07 482.851 1114.55 484.724C1118.04 486.598 1122.43 487.534 1127.75 487.534C1131.23 487.534 1134.46 487.055 1137.42 486.097C1140.38 485.138 1143.02 483.701 1145.33 481.784C1147.68 479.824 1149.64 477.428 1151.21 474.597L1172.83 477.08C1170.44 482.917 1166.93 488.013 1162.31 492.369C1157.7 496.682 1152.16 500.036 1145.72 502.432C1139.31 504.784 1132.19 505.96 1124.35 505.96ZM1185.75 504L1202.48 403.636H1225.41L1222.6 420.364H1223.65C1226.39 414.57 1230.27 410.105 1235.28 406.969C1240.33 403.789 1245.73 402.199 1251.48 402.199C1252.83 402.199 1254.29 402.264 1255.86 402.395C1257.43 402.482 1258.78 402.634 1259.91 402.852L1256.25 424.611C1255.25 424.262 1253.68 423.957 1251.55 423.696C1249.46 423.391 1247.39 423.239 1245.34 423.239C1241.03 423.239 1237.02 424.175 1233.32 426.048C1229.66 427.878 1226.57 430.426 1224.04 433.693C1221.51 436.96 1219.88 440.728 1219.14 444.997L1209.4 504H1185.75ZM1255.27 504L1272 403.636H1294.67L1291.79 420.69H1293.04C1296.09 414.94 1300.29 410.454 1305.65 407.23C1311 403.963 1317.04 402.33 1323.75 402.33C1330.5 402.33 1335.94 403.985 1340.08 407.295C1344.26 410.562 1346.83 415.027 1347.79 420.69H1348.84C1351.97 415.071 1356.46 410.606 1362.3 407.295C1368.18 403.985 1374.78 402.33 1382.1 402.33C1391.24 402.33 1398.26 405.248 1403.14 411.085C1408.01 416.922 1409.52 425.438 1407.64 436.634L1396.41 504H1372.75L1383.47 440.293C1384.43 434.063 1383.47 429.511 1380.59 426.636C1377.76 423.718 1373.95 422.259 1369.16 422.259C1363.45 422.259 1358.7 424.023 1354.91 427.551C1351.17 431.08 1348.86 435.697 1347.99 441.403L1337.47 504H1314.27L1325.12 439.312C1325.9 434.129 1324.99 429.991 1322.37 426.898C1319.8 423.805 1316.01 422.259 1311 422.259C1307.61 422.259 1304.36 423.13 1301.27 424.872C1298.18 426.615 1295.54 429.054 1293.36 432.19C1291.23 435.283 1289.83 438.877 1289.18 442.972L1278.99 504H1255.27ZM1460.83 505.96C1450.76 505.96 1442.44 503.869 1435.87 499.688C1429.29 495.462 1424.67 489.494 1422.01 481.784C1419.4 474.03 1418.97 464.904 1420.71 454.406C1422.41 444.082 1425.87 435.022 1431.1 427.224C1436.32 419.384 1442.86 413.285 1450.7 408.929C1458.58 404.529 1467.3 402.33 1476.84 402.33C1483.02 402.33 1488.71 403.331 1493.89 405.335C1499.07 407.295 1503.45 410.345 1507.02 414.483C1510.6 418.621 1513.06 423.892 1514.41 430.295C1515.76 436.655 1515.69 444.235 1514.21 453.034L1513.1 460.287H1430.77L1433.32 444.344H1492.91C1493.69 439.813 1493.43 435.784 1492.13 432.256C1490.82 428.684 1488.64 425.874 1485.59 423.827C1482.54 421.779 1478.73 420.756 1474.16 420.756C1469.5 420.756 1465.14 421.954 1461.09 424.349C1457.08 426.702 1453.71 429.751 1450.96 433.497C1448.22 437.243 1446.47 441.186 1445.73 445.324L1443.05 460.614C1442.1 466.886 1442.31 472.005 1443.71 475.969C1445.1 479.933 1447.54 482.851 1451.03 484.724C1454.51 486.598 1458.91 487.534 1464.22 487.534C1467.71 487.534 1470.93 487.055 1473.9 486.097C1476.86 485.138 1479.49 483.701 1481.8 481.784C1484.15 479.824 1486.11 477.428 1487.68 474.597L1509.31 477.08C1506.91 482.917 1503.41 488.013 1498.79 492.369C1494.17 496.682 1488.64 500.036 1482.19 502.432C1475.79 504.784 1468.67 505.96 1460.83 505.96ZM1522.29 504L1539.02 403.636H1561.69L1558.82 420.69H1560.06C1563.11 414.94 1567.31 410.454 1572.67 407.23C1578.03 403.963 1584.06 402.33 1590.77 402.33C1597.52 402.33 1602.97 403.985 1607.1 407.295C1611.29 410.562 1613.86 415.027 1614.81 420.69H1615.86C1619 415.071 1623.48 410.606 1629.32 407.295C1635.2 403.985 1641.8 402.33 1649.12 402.33C1658.27 402.33 1665.28 405.248 1670.16 411.085C1675.04 416.922 1676.54 425.438 1674.67 436.634L1663.43 504H1639.77L1650.49 440.293C1651.45 434.063 1650.49 429.511 1647.62 426.636C1644.78 423.718 1640.97 422.259 1636.18 422.259C1630.47 422.259 1625.73 424.023 1621.94 427.551C1618.19 431.08 1615.88 435.697 1615.01 441.403L1604.49 504H1581.29L1592.14 439.312C1592.93 434.129 1592.01 429.991 1589.4 426.898C1586.83 423.805 1583.04 422.259 1578.03 422.259C1574.63 422.259 1571.38 423.13 1568.29 424.872C1565.2 426.615 1562.56 429.054 1560.39 432.19C1558.25 435.283 1556.86 438.877 1556.2 442.972L1546.01 504H1522.29ZM1727.72 505.96C1717.83 505.96 1709.6 503.782 1703.02 499.426C1696.49 495.07 1691.89 488.95 1689.23 481.065C1686.58 473.181 1686.1 464.033 1687.8 453.622C1689.49 443.342 1692.89 434.347 1697.99 426.636C1703.13 418.926 1709.6 412.958 1717.4 408.733C1725.24 404.464 1734.01 402.33 1743.73 402.33C1753.62 402.33 1761.83 404.529 1768.36 408.929C1774.9 413.285 1779.49 419.405 1782.15 427.29C1784.85 435.174 1785.35 444.366 1783.65 454.864C1782 465.1 1778.58 474.052 1773.39 481.719C1768.25 489.385 1761.78 495.353 1753.99 499.622C1746.19 503.848 1737.43 505.96 1727.72 505.96ZM1729.68 487.011C1735.17 487.011 1739.98 485.53 1744.12 482.568C1748.3 479.562 1751.72 475.533 1754.38 470.48C1757.08 465.384 1758.95 459.721 1760 453.491C1760.96 447.48 1760.98 442.035 1760.06 437.156C1759.15 432.234 1757.19 428.335 1754.18 425.46C1751.22 422.542 1747.1 421.082 1741.83 421.082C1736.34 421.082 1731.49 422.607 1727.26 425.656C1723.08 428.662 1719.66 432.713 1717 437.81C1714.35 442.863 1712.52 448.504 1711.51 454.733C1710.51 460.744 1710.47 466.189 1711.38 471.068C1712.3 475.947 1714.26 479.824 1717.26 482.699C1720.27 485.574 1724.41 487.011 1729.68 487.011ZM1791.94 504L1808.67 403.636H1831.61L1828.8 420.364H1829.84C1832.59 414.57 1836.46 410.105 1841.47 406.969C1846.53 403.789 1851.93 402.199 1857.68 402.199C1859.03 402.199 1860.49 402.264 1862.06 402.395C1863.62 402.482 1864.97 402.634 1866.11 402.852L1862.45 424.611C1861.45 424.262 1859.88 423.957 1857.74 423.696C1855.65 423.391 1853.58 423.239 1851.54 423.239C1847.22 423.239 1843.22 424.175 1839.51 426.048C1835.85 427.878 1832.76 430.426 1830.23 433.693C1827.71 436.96 1826.07 440.728 1825.33 444.997L1815.6 504H1791.94ZM1873.01 541.636C1869.79 541.636 1866.85 541.375 1864.19 540.852C1861.58 540.373 1859.51 539.807 1857.98 539.153L1866.61 520.727C1869.88 521.729 1872.82 522.165 1875.43 522.034C1878.09 521.947 1880.53 521.054 1882.75 519.355C1885.01 517.7 1887.23 514.977 1889.41 511.188L1892.42 505.764L1873.21 403.636H1897.38L1907.84 479.562H1908.88L1944.76 403.636H1970.83L1912.09 516.023C1909.25 521.468 1905.97 526.085 1902.22 529.875C1898.47 533.708 1894.18 536.627 1889.35 538.631C1884.56 540.634 1879.11 541.636 1873.01 541.636Z" fill="black"/> -</g> -<path d="M481.982 251C506.33 251 513.5 270.609 513.5 294.75V379.125H554.473V346.711C554.473 330.963 560.782 315.861 572.013 304.726L578.531 298.263C577.246 295.264 576.536 291.964 576.536 288.5C576.536 274.693 587.825 263.5 601.75 263.5C615.675 263.5 626.964 274.693 626.964 288.5C626.964 302.307 615.675 313.5 601.75 313.5C598.256 313.5 594.928 312.795 591.903 311.522L585.385 317.984C577.701 325.603 573.384 335.936 573.384 346.711V379.125H641.404C645.145 369.963 654.204 363.5 664.786 363.5C678.711 363.5 690 374.693 690 388.5C690 402.307 678.711 413.5 664.786 413.5C654.204 413.5 645.145 407.037 641.404 397.875H513.5V454.125H578.369C582.109 444.963 591.168 438.5 601.75 438.5C615.675 438.5 626.964 449.693 626.964 463.5C626.964 477.307 615.675 488.5 601.75 488.5C591.168 488.5 582.109 482.037 578.368 472.875H513.5V529.125H568.255C584.137 529.125 599.369 535.381 610.599 546.516L642.331 577.978C645.357 576.705 648.685 576 652.179 576C666.104 576 677.393 587.193 677.393 601C677.393 614.807 666.104 626 652.179 626C638.253 626 626.964 614.807 626.964 601C626.964 597.536 627.675 594.236 628.96 591.237L597.227 559.774C589.543 552.155 579.121 547.875 568.255 547.875H513.5V607.25C513.5 631.391 506.33 651 481.982 651C459.21 651 440.457 633.891 438.094 611.859C433.996 612.953 429.662 613.5 425.25 613.5C397.435 613.5 374.821 591.078 374.821 563.5C374.821 557.719 375.846 552.094 377.658 546.937C353.862 538.031 337 515.219 337 488.5C337 463.578 351.735 442.016 373.088 432.016C366.233 423.5 362.214 412.719 362.214 401C362.214 377.016 379.234 357.016 401.927 352.094C400.666 347.797 400.036 343.187 400.036 338.5C400.036 315.141 416.267 295.453 438.094 289.984C440.457 268.109 459.21 251 481.982 251Z" fill="black"/> -<g opacity="0.4" filter="url(#filter1_f_2397_133)"> -<rect x="-3176" y="2574.55" width="7287.1" height="929.709" transform="rotate(-30 -3176 2574.55)" fill="#369DFD"/> -</g> -</g> -<defs> -<filter id="filter0_d_2397_133" x="751.242" y="402.199" width="1219.59" height="147.438" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> -<feFlood flood-opacity="0" result="BackgroundImageFix"/> -<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/> -<feOffset dx="-8" dy="4"/> -<feGaussianBlur stdDeviation="2"/> -<feComposite in2="hardAlpha" operator="out"/> -<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.41 0"/> -<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2397_133"/> -<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2397_133" result="shape"/> -</filter> -<filter id="filter1_f_2397_133" x="-4057.27" y="-1950.27" width="8538.21" height="6211.24" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"> -<feFlood flood-opacity="0" result="BackgroundImageFix"/> -<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/> -<feGaussianBlur stdDeviation="440.634" result="effect1_foregroundBlur_2397_133"/> -</filter> -<clipPath id="clip0_2397_133"> -<rect width="2344" height="969" rx="100" fill="white"/> -</clipPath> -</defs> -</svg> diff --git a/apps/docs/images/infinite-context.png b/apps/docs/images/infinite-context.png Binary files differdeleted file mode 100644 index 40ff670c..00000000 --- a/apps/docs/images/infinite-context.png +++ /dev/null diff --git a/apps/docs/images/opts/Connectors.png b/apps/docs/images/opts/Connectors.png Binary files differdeleted file mode 100644 index 615b01ff..00000000 --- a/apps/docs/images/opts/Connectors.png +++ /dev/null diff --git a/apps/docs/images/opts/Memory_API.png b/apps/docs/images/opts/Memory_API.png Binary files differdeleted file mode 100644 index 99550e83..00000000 --- a/apps/docs/images/opts/Memory_API.png +++ /dev/null diff --git a/apps/docs/images/opts/Model_Enhancer.png b/apps/docs/images/opts/Model_Enhancer.png Binary files differdeleted file mode 100644 index e5ffefac..00000000 --- a/apps/docs/images/opts/Model_Enhancer.png +++ /dev/null diff --git a/apps/docs/images/opts/Supermemory_MCP.png b/apps/docs/images/opts/Supermemory_MCP.png Binary files differdeleted file mode 100644 index 0d21e076..00000000 --- a/apps/docs/images/opts/Supermemory_MCP.png +++ /dev/null diff --git a/apps/docs/images/processing.png b/apps/docs/images/processing.png Binary files differdeleted file mode 100644 index dca6e4dd..00000000 --- a/apps/docs/images/processing.png +++ /dev/null diff --git a/apps/docs/images/query-rewriting.png b/apps/docs/images/query-rewriting.png Binary files differdeleted file mode 100644 index 9261c266..00000000 --- a/apps/docs/images/query-rewriting.png +++ /dev/null diff --git a/apps/docs/images/rerank.png b/apps/docs/images/rerank.png Binary files differdeleted file mode 100644 index b40c6461..00000000 --- a/apps/docs/images/rerank.png +++ /dev/null diff --git a/apps/docs/images/sm-header.png b/apps/docs/images/sm-header.png Binary files differdeleted file mode 100644 index f643a5ad..00000000 --- a/apps/docs/images/sm-header.png +++ /dev/null diff --git a/apps/docs/images/transparent-proxy.png b/apps/docs/images/transparent-proxy.png Binary files differdeleted file mode 100644 index 7dd34246..00000000 --- a/apps/docs/images/transparent-proxy.png +++ /dev/null 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 ( - <a className="group flex flex-col h-full rounded-lg overflow-hidden hover:shadow-lg transition-all duration-300 border border-gray-100 dark:border-zinc-800 hover:border-gray-200 dark:hover:border-zinc-700" href={href}> - <div className="overflow-hidden"> - <img - src={imageUrl} - className="w-full h-48 object-cover transform group-hover:scale-105 transition-all duration-500" - alt={title} - /> - </div> - <div className="p-6"> - <h3 className="text-xl font-semibold text-gray-900 dark:text-zinc-50">{title}</h3> - <p className="mt-3 text-gray-600 dark:text-zinc-400">{description}</p> - </div> - </a> - ) -} - -<div className="relative pb-12"> - - <div className="px-4 py-16 lg:py-32 max-w-4xl mx-auto"> - <h1 className="text-5xl font-bold text-center text-gray-900 dark:text-zinc-50 tracking-tight"> - supermemory <span className="text-primary font-medium">[docs]</span> - </h1> - - <p className="max-w-2xl mx-auto px-4 mt-6 text-xl text-center text-gray-600 dark:text-zinc-400 leading-relaxed"> - Meet the memory API for the AI era — <span className="font-medium">scalable</span>, <span className="font-medium">powerful</span>, <span className="font-medium">affordable</span>, and <span className="font-medium">production-ready</span>. - </p> - - <div className="mt-16 lg:mt-20 grid sm:grid-cols-2 gap-8"> - <HeroCard - imageUrl="https://imagedelivery.net/_Zs8NCbSWCQ8-iurXrWjBg/40fe287e-b392-4bd6-9fc5-128ef674ca00/public" - title="Memory APIs" - description="Ingest content at scale, in any format. Search and retrieve information with ease." - href="/memory-api/introduction" - /> - - <HeroCard - imageUrl="https://imagedelivery.net/_Zs8NCbSWCQ8-iurXrWjBg/abcc107d-7271-4acf-a9a2-90ad7a6f2000/public" - title="Connectors" - description="Sync your content with your favorite tools and platforms seamlessly." - href="/memory-api/connectors/overview" - /> - - <HeroCard - imageUrl="https://imagedelivery.net/_Zs8NCbSWCQ8-iurXrWjBg/eda8b2fd-9633-4e93-c6bd-10b44be75e00/public" - title="Model Enhancer" - description="Supercharge your LLM with supermemory's intelligent context management." - href="/model-enhancement/getting-started" - /> - - <HeroCard - imageUrl="https://imagedelivery.net/_Zs8NCbSWCQ8-iurXrWjBg/9af9572c-9f8d-42d8-f7d0-503a5f87a300/public" - title="supermemory MCP" - description="Carry your memories with you, using supermemory MCP integration." - href="/supermemory-mcp/introduction" - /> - </div> - </div> -</div>
\ 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 @@ -<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 206 168"><path fill="#EFEFEF" d="M205.864 66.263h-76.401V0h-24.684v71.897c0 7.636 3.021 14.97 8.391 20.373l62.383 62.777 17.454-17.564-46.076-46.365h58.948v-24.84l-.015-.015ZM12.872 30.517l46.075 46.365H0v24.84h76.4v66.264h24.685V96.089c0-7.637-3.021-14.97-8.39-20.374l-62.37-62.762-17.453 17.564Z"/></svg>
\ 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 @@ -<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 206 168"><path fill="#EFEFEF" d="M205.864 66.263h-76.401V0h-24.684v71.897c0 7.636 3.021 14.97 8.391 20.373l62.383 62.777 17.454-17.564-46.076-46.365h58.948v-24.84l-.015-.015ZM12.872 30.517l46.075 46.365H0v24.84h76.4v66.264h24.685V96.089c0-7.637-3.021-14.97-8.39-20.374l-62.37-62.762-17.453 17.564Z"/></svg>
\ 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. - -<Danger> - Some providers like Google Drive require extensive verification and approval before you can use custom keys. -</Danger> - -### 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. - -<CodeGroup> -```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 <token>' \ - --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 <token>' \ - --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 <token>' \ - --header 'Content-Type: application/json' \ - --data '{ - "onedriveCustomKeyEnabled": true, - "onedriveClientId": "your-onedrive-client-id", - "onedriveClientSecret": "your-onedrive-client-secret" -}' -``` -</CodeGroup> - -<Warning> - 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. -</Warning>
\ 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}` - -<CodeGroup> -```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": "<string>", - "containerTags": ["<string>"], - "metadata": {}, - "documentLimit": 5000 -} -headers = { - "Authorization": "Bearer <token>", - "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 <token>' \ - --header 'Content-Type: application/json' \ - --data '{ - "redirectUrl": "<string>", - "containerTags": [ - "<string>" - ], - "metadata": {}, - "documentLimit": 5000 -}' -``` -</CodeGroup> - -### 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": "<string>", - "authLink": "<string>", - "expiresIn": "<string>", - "redirectsTo": "<string>" -} -``` - -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` - - - -## 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" ---- - -<Accordion title="Best Practices" icon="sparkles"> -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 - -</Accordion> - -## Basic Usage - -To add a memory, send a POST request to `/add` with your content: - -<CodeGroup> - -```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"] -) -``` - -</CodeGroup> - -The API will return a response with an ID and initial status: - -```json -{ - "id": "mem_abc123", - "status": "queued" -} -``` - -<CodeGroup> - -```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"] -) -``` - -</CodeGroup> - -{/\* <Note> -TODO: Supported content types - -</Note> */} - -## 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 - } -} -``` - -{/\* <Note> -TODO: Filtering by metadata - -</Note> */} - -## Partitioning by user - -You can attribute and partition your data by providing a `userId`: - -<CodeGroup> - -```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" - } -) -``` - -</CodeGroup> - -<Note> - When searching, if you provide a `userId`, only memories from that space will - be returned. -</Note> - -## Grouping - -You can group memories by providing an array of `containerTags`: - -<CodeGroup> - -```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"] -) -``` - -</CodeGroup> - -{/\* <Note> -TODO: Processing Statuses - -</Note> */} - -## Checking Status - -Check status using the memory ID: - -<CodeGroup> - -```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") -``` - -</CodeGroup> - -<Warning> - -Memories are deleted after 2 minutes if an irrecoverable error occurs. - -</Warning> - -## File Uploads - -For file uploads, use the dedicated file upload endpoint. You can include `containerTags` directly in the form data: - -<CodeGroup> - -```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 - ) -``` - -</CodeGroup> - -### Adding Additional Metadata to Files - -If you need to add additional metadata (like title or description) after upload, you can use the PATCH endpoint: - -<CodeGroup> - -```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' - } - } -) -``` - -</CodeGroup> - -<Note> - 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. -</Note> - -## 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. - -<Tabs> - <Tab title="How It Works"> - The content detection system analyzes: - - URL patterns and domains - - File extensions and MIME types - - Content structure and metadata - - Headers and response types - </Tab> - <Tab title="Best Practices"> - <Accordion title="Content Type Best Practices" defaultOpen icon="sparkles"> - 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 - </Accordion> - - </Tab> -</Tabs> - -### Quick Implementation - -All you need to do is pass the content to the `/memories` endpoint: - -<CodeGroup> - -```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" -) -``` - -</CodeGroup> - -<Note> - supermemory uses [Markdowner](https://md.dhr.wtf) to extract content from - URLs. -</Note> - -## Supported Content Types - -supermemory supports a wide range of content formats to ensure versatility in memory creation: - -<Grid cols={2}> - <Card title="Text Content" icon="document-text"> - - `note`: Plain text notes and documents - - Directly processes raw text content - - Automatically chunks content for optimal retrieval - - Preserves formatting and structure - </Card> - - <Card title="Web Content" icon="globe"> - - `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 - - </Card> - - <Card title="Document Types" icon="document"> - - `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 - - </Card> - - <Card title="Media Types" icon="photo"> - - `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 - - </Card> -</Grid> - -## Processing Pipeline - -<Steps> - <Step title="Content Detection"> - supermemory automatically identifies the content type based on the input provided. - </Step> - -<Step title="Content Extraction"> - Type-specific extractors process the content with: - Specialized parsing for - each format - Error handling with retries - Rate limit management -</Step> - - <Step title="AI Enhancement"> - ```typescript - interface ProcessedContent { - content: string; // Extracted text - summary?: string; // AI-generated summary - tags?: string[]; // Extracted tags - categories?: string[]; // Content categories - } - ``` - </Step> - - <Step title="Chunking & Indexing"> - - Sentence-level splitting - - 2-sentence overlap - - Context preservation - - Semantic coherence - </Step> -</Steps> - -## 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. - -<CodeGroup> - -```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"] -) -``` - -</CodeGroup> - -## 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 - -<CodeGroup> - -```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": "<=" - } - ] - } -) -``` - -</CodeGroup> - -## 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: - -<CodeGroup> - -```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"] - } -) -``` - -</CodeGroup> - -Then search using the `array_contains` filter: - -<CodeGroup> - -```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 -) -``` - -</CodeGroup> - -## Document - -You can also find chunks within a specific, large document. - -This can be particularly useful for extremely large documents like Books, Podcasts, etc. - -<CodeGroup> - -```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" -) -``` - -</CodeGroup> 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. - - - -### Usage - -In supermemory, you can enable query rewriting by setting the `rewriteQuery` parameter to `true` in the search API. - -<CodeGroup> - -```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 -) -``` - -</CodeGroup> - -### 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. - - - -### Usage - -In supermemory, you can enable answer rewriting by setting the `rerank` parameter to `true` in the search API. - -<CodeGroup> - -```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 -) -``` - -</CodeGroup> - -### 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. - -<Info> - The Memory engine scales linearly - which means we're **incredibly fast and scalable**, while providing one of the more affordable -</Info> - - - -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: - - -<CardGroup cols={2}> - <Card title="Quickstart" icon="zap" href="/memory-api/overview"> - Get started in 5 minutes - </Card> - <Card title="API Reference" icon="unplug" href="/api-reference"> - Learn more about the API - </Card> - <Card title="Use Cases" icon="brain" href="/overview/use-cases"> - See what supermemory can do for you - </Card> - <Card title="SDKs" icon="code" href="/memory-api/sdks/"> - Learn more about the SDKs - </Card> -</CardGroup>
\ 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: - -<CodeGroup> - -```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", -) -``` - -</CodeGroup> - -## Installing the clients - -You can use supermemory through the APIs, or using our SDKs - -<CodeGroup> - -```bash cURL -https://api.supermemory.ai/v3 -``` - -```bash Typescript -npm i supermemory -``` - -```bash Python -pip install supermemory -``` - -</CodeGroup> - -## Add your first memory - -<CodeGroup> - -```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.", -) -``` - -</CodeGroup> - -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 - -<Accordion title="Processing steps" icon="sparkles"> - 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 - </Accordion> - -<Accordion title="Advanced Chunking" icon="sparkles"> - 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 - </Accordion> - -## Search your memories - -<CodeGroup> - -```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.", -) -``` - -</CodeGroup> - -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 - -<CardGroup cols={2}> - <Card title="Adding memories" icon="plus" href="/memory-api/creation"> - Adding memories - </Card> - <Card - title="Searching and filtering" - icon="search" - href="/memory-api/searching" - > - Searching for items - </Card> - <Card - title="Connectors and Syncing" - icon="plug" - href="/memory-api/connectors" - > - Connecting external sources - </Card> - <Card title="Features" icon="sparkles" href="/memory-api/features"> - Explore Features - </Card> -</CardGroup> 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 - -<Warning> -All log messages are intended for debugging only. The format and content of log messages may change between releases. -</Warning> - -#### 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" ---- - -<Accordion title="Best Practices" defaultOpen icon="sparkles"> -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 - </Accordion> - -## Basic Search - -To search through your memories, send a POST request to `/search`: - -<CodeGroup> - -```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 -) -``` - -</CodeGroup> - -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. - -<img - src="/images/infinite-context.png" - alt="Infinite Context Diagram" - className="rounded-lg shadow-lg" -/> - -<Tabs> - <Tab title="Key Features"> - <CardGroup cols={2}> - <Card title="Unlimited Context" icon="infinity" color="#4F46E5"> - No more token limits - conversations can extend indefinitely - </Card> - <Card title="Zero Latency" icon="bolt" color="#10B981"> - Transparent proxying with negligible overhead - </Card> - <Card title="Cost Efficient" icon="coins" color="#F59E0B"> - Save up to 70% on token costs for long conversations - </Card> - <Card title="Provider Agnostic" icon="plug" color="#6366F1"> - Works with any OpenAI-compatible endpoint - </Card> - </CardGroup> - </Tab> -</Tabs> - -## Getting Started - -To use the Infinite Chat endpoint, you need to: - -### 1. Get a supermemory API key - -<GettingAPIKey /> - -### 2. Add supermemory in front of any **OpenAI-Compatible** API URL - -<CodeGroup> - -```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"}] -) -``` - -</CodeGroup> - -## How It Works - -<Steps> - <Step title="Transparent Proxying"> - All requests pass through supermemory to your chosen LLM provider with zero latency overhead. - - <img - src="/images/transparent-proxy.png" - alt="Transparent Proxy Diagram" - className="my-4 rounded-md shadow" - /> - </Step> - <Step title="Intelligent Chunking"> - Long conversations are automatically broken down into optimized segments using our proprietary chunking algorithm that preserves semantic coherence. - </Step> - <Step title="Smart Retrieval"> - When conversations exceed token limits (20k+), supermemory intelligently retrieves the most relevant context from previous messages. - </Step> - <Step title="Automatic Token Management"> - The system intelligently balances token usage, ensuring optimal performance while minimizing costs. - </Step> -</Steps> - -## Performance Benefits - -<Accordion title="Reduced Token Usage" defaultOpen icon="coins"> - Save up to 70% on token costs for long conversations through intelligent context management and caching. -</Accordion> - -<Accordion title="Unlimited Context" icon="infinity"> - No more 8k/32k/128k token limits - conversations can extend indefinitely with supermemory's advanced retrieval system. -</Accordion> - -<Accordion title="Improved Response Quality" icon="sparkles"> - Better context retrieval means more coherent responses even in very long threads, reducing hallucinations and inconsistencies. -</Accordion> - -<Accordion title="Zero Performance Penalty" icon="bolt"> - The proxy adds negligible latency to your requests, ensuring fast response times for your users. -</Accordion> - -## Pricing - -<Tabs> - <Tab title="Plans"> - <div className="mt-4"> - <div className="grid grid-cols-1 md:grid-cols-3 gap-4"> - <div className="p-4 border rounded-lg"> - <h3 className="text-lg font-bold">Free Tier</h3> - <p className="text-sm text-gray-600 dark:text-gray-300">100k tokens stored at no cost</p> - </div> - <div className="p-4 border rounded-lg"> - <h3 className="text-lg font-bold">Standard Plan</h3> - <p className="text-sm text-gray-600 dark:text-gray-300">$20/month fixed cost after exceeding free tier</p> - </div> - <div className="p-4 border rounded-lg"> - <h3 className="text-lg font-bold">Usage-Based</h3> - <p className="text-sm text-gray-600 dark:text-gray-300">Each thread includes 20k free tokens, then $1 per million tokens thereafter</p> - </div> - </div> - </div> - </Tab> - <Tab title="Comparison"> - <div className="mt-4"> - <table className="min-w-full divide-y divide-gray-200"> - <thead> - <tr> - <th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> - Feature - </th> - <th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> - Free - </th> - <th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> - Standard - </th> - </tr> - </thead> - <tbody className="divide-y divide-gray-200"> - <tr> - <td className="px-6 py-4 whitespace-nowrap text-sm"> - Tokens Stored - </td> - <td className="px-6 py-4 whitespace-nowrap text-sm"> - 100k - </td> - <td className="px-6 py-4 whitespace-nowrap text-sm"> - Unlimited - </td> - </tr> - <tr> - <td className="px-6 py-4 whitespace-nowrap text-sm"> - Conversations - </td> - <td className="px-6 py-4 whitespace-nowrap text-sm"> - 10 - </td> - <td className="px-6 py-4 whitespace-nowrap text-sm"> - Unlimited - </td> - </tr> - </tbody> - </table> - </div> - </Tab> -</Tabs> - -## Error Handling - -<Note> - 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. -</Note> - -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 - -<Info> - Currently, there are no rate limits specific to supermemory. Your requests are subject only to the rate limits of your underlying LLM provider. -</Info> - -## Supported Models - -supermemory works with any OpenAI-compatible API, including: - -<CardGroup cols={3}> - <Card title="OpenAI" icon="openai"> - GPT-3.5, GPT-4, GPT-4o - </Card> - <Card title="Anthropic" icon="user-astronaut"> - Claude 3 models - </Card> - <Card title="Other Providers" icon="plug"> - Any provider with an OpenAI-compatible endpoint - </Card> -</CardGroup>
\ 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 - -<GettingAPIKey /> - -## 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 - -<CodeGroup> - -```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/<your-provider's-openai-endpoint> -``` - -</CodeGroup> - -## Making your first request - -<CodeGroup> - -```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); -``` - -</CodeGroup> - -
\ 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: - -<CardGroup cols="3"> - <Card title="Chat with ____" icon="message-circle"> - Quickly built apps to chat with: - - • Your Twitter bookmarks \ - • Your PDF documents \ - • Your company documentation \ - ...and more\! - </Card> - <Card title="Smart Search" icon="search"> - Search everything with AI: - - • Product recommendations \ - • Document similarity matching \ - • Research paper analysis - - ...and more\! - </Card> - <Card title="Assistants & Agents" icon="chart-line"> - Build agents with infinite context for: - - • Email management \ - • Meeting summarization \ - • Calendar organization \ - ...and more\! - </Card> - <Card title="Second Brain" icon="brain"> - Build your own second brain: - - • Organize your notes, ideas, and resources - - • Connect concepts across documents - - • Never lose track of insights or inspiration - - ...and more\! - </Card> - <Card title="Content Writing & Brand Voice" icon="pencil-line"> - For agencies and creators: - - • Maintain consistent tone and style - • Analyze your brand’s unique voice - • Write with context-aware suggestions - - ...and more\! - </Card> - <Card title="Healthcare & Medical Records" icon="hospital"> - For clinics, hospitals, and researchers: - - • Securely summarize patient records - - • Extract key info from medical history - - • Support clinical decisions with AI - - ...and more\! - </Card> - <Card title="Community & Support Chatbots" icon="users"> - For online communities and businesses: - - • Powered by your chat or forum history - - • Instant, accurate answers - - • Reduce support load - - ...and more\! - </Card> - <Card title="Education & Study Tools" icon="book"> - For students and educators: - - • Flashcards and quizzes from your notes - - • Search across textbooks and lectures - - • Personalized study assistants - - ...and more\! - </Card> - <Card title="Legal & Compliance Search" icon="scale"> - For law firms and compliance teams: - - • Search through contracts and case law - - • Extract clauses, obligations, and risks - - • Keep up with regulatory changes - - ...and more\! - </Card> - <Card title="Enterprise Knowledge Hubs" icon="briefcase-business"> - For companies and teams: - - • Centralize all internal documentation - - • Search across wikis, policies, and emails - - • Onboard new hires faster - - ...and more\! - </Card> -</CardGroup>
\ 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: - -<Steps> - <Step title="Let's choose a vector database"> - <Card title="Found a vector database?"> - - 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. - </Card> - </Step> - <Step title="Now for the embedding model"> - <Card title="Unless you have a PhD in AI, good luck figuring out:"> - - Which model fits your use case - - What are the performance tradeoffs - - How to keep up with new releases - </Card> - </Step> - <Step title="Time to build the memory layer"> - <CardGroup cols="1"> - <Card title="So many types of content"> - - 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 - </Card> - </CardGroup> - </Step> -</Steps> - -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. - -<CardGroup cols="1"> - <Card title="Affordable & Easy to Use" icon="banknote"> - - Start for free, scale as you grow - - Simple API, deploy in minutes - - No complex setup or maintenance - - Clear, predictable pricing - </Card> - <Card title="Simple Connectors" icon="plug"> - - Notion, Google Drive, Slack - - Web scraping and PDF processing - - Email and calendar sync - - Custom connector SDK - </Card> - <Card title="Production Ready" icon="activity"> - - Enterprise-grade security - - Sub-200ms latency at scale - - Automatic failover and redundancy - - 99.9% uptime guarantee - </Card> -</CardGroup> - -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. - -<Accordion title="Getting an API Key" icon="sparkles"> - <Steps> - <Step title="Create an account" icon="circle-user"> - An account will automatically be created on your first login. - -  - </Step> - <Step title="Create an API Key" icon="key"> - <Steps> - <Step title="Navigate to API Keys"> -  - - Click `Create API Key` - </Step> - <Step title="Choose Name and Expiry (Optional)"> -  - - Click `Create` - </Step> - <Step title="Copy New Key"> -  - - Click <Icon icon="clipboard" /> to copy - </Step> - </Steps> - </Step> - </Steps> -</Accordion> - -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. -<Card title="supermemory MCP code" icon="github" href="https://github.com/supermemoryai/supermemory-mcp"> - Code behind the scenes -</Card> - - -### 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 |