mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-27 06:15:15 +00:00
Fixes v5 profile and bucket docs.
- **The default `preferences` bucket can't be replaced.** It's always part of the effective set. Custom buckets are added alongside it, `deleteBuckets` can't remove it, and defining a bucket named `preferences` only overrides its description.
- **No `[Summary]`/`[Recent]` labels in v5.** Only v4 adds them. Summaries are now told apart by an `aggregated_` id, and individual `dynamic` entries keep their `[YYYY-MM-DD]` date. Example responses are updated, and the migration snippet calls out the change.
- **Name clashes.** A namespace bucket with an org bucket's name returns `409`; the docs said the org's definition silently wins.
- **Smaller fixes:**
- `filterPrompt` → `organizationalContext`.
- An invalid `organization.update` example (stray `},`).
- OAuth redirect URIs now use `/v3/connections/auth/callback/{provider}`.
- The v4 `include` example in the migration snippet.
- Broken anchors and links.
Checked against the current API and the published SDKs (TS 5.0.1, Python 5.0.0). Legacy v3/v4 docs are unchanged apart from factual fixes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
208 lines
7.2 KiB
Text
208 lines
7.2 KiB
Text
---
|
|
title: "Customizing for your use case"
|
|
sidebarTitle: "Customizing"
|
|
description: "Configure Supermemory's behavior for your specific application"
|
|
icon: "/icons/hugeicons/settings-02.svg"
|
|
---
|
|
|
|
Configure how Supermemory processes and retrieves content for your specific use case.
|
|
|
|
## Organizational Context
|
|
|
|
Tell Supermemory what your organization does and what content matters during ingestion. This steers what gets extracted into memories across every namespace. In v3/v4 this field was called `filterPrompt`.
|
|
|
|
```typescript
|
|
// Example: Brand guidelines assistant
|
|
await supermemory.organization.update({
|
|
organizationalContext: `You are ingesting content for Brand.ai's brand guidelines system.
|
|
|
|
Index:
|
|
- Official brand values and mission statements
|
|
- Approved tone of voice guidelines
|
|
- Logo usage and visual identity docs
|
|
- Approved messaging and taglines
|
|
|
|
Skip:
|
|
- Draft documents and work-in-progress
|
|
- Outdated brand materials (pre-2024)
|
|
- Internal discussions about brand changes
|
|
- Competitor analysis docs`,
|
|
});
|
|
```
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="Personal assistant">
|
|
```typescript
|
|
organizationalContext: `Personal AI assistant. Prioritize recent content, action items,
|
|
and personal context. Exclude spam and duplicates.`
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Customer support">
|
|
```typescript
|
|
organizationalContext: `Customer support agent. Prioritize verified solutions, official docs,
|
|
and resolved tickets. Exclude internal discussions and PII.`
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Legal assistant">
|
|
```typescript
|
|
organizationalContext: `Legal research assistant. Prioritize precedents, current regulations,
|
|
and approved contract language. Exclude privileged communications.`
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Finance agent">
|
|
```typescript
|
|
organizationalContext: `Financial analysis assistant. Prioritize latest reports, verified data,
|
|
and regulatory filings. Exclude speculative data and MNPI.`
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Healthcare">
|
|
```typescript
|
|
organizationalContext: `Healthcare information assistant. Prioritize evidence-based guidelines
|
|
and FDA-approved info. Exclude PHI and outdated recommendations.`
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Developer docs">
|
|
```typescript
|
|
organizationalContext: `Developer documentation assistant. Prioritize current APIs, working
|
|
examples, and best practices. Exclude deprecated APIs and test fixtures.`
|
|
```
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
The value replaces the existing context in full. Send `null` to clear it. The legacy `shouldLLMFilter`, `categories`, `includeItems`, and `excludeItems` settings are not part of the v5 organization resource.
|
|
|
|
---
|
|
|
|
## Supporting Context
|
|
|
|
Guide memory extraction for a specific namespace. Organizational context is org-wide; supporting context is per namespace. In v3/v4 this field was called `entityContext`.
|
|
|
|
```typescript
|
|
await supermemory.add("session_abc123", {
|
|
content: "User asked about logo variations for dark backgrounds...",
|
|
supportingContext: `Design exploration conversation between john@acme.com and Brand.ai assistant.
|
|
Focus on John's design preferences and brand requirements.`,
|
|
});
|
|
```
|
|
|
|
<Accordion title="Update supporting context only">
|
|
Set the supporting context for a namespace without uploading content.
|
|
|
|
```typescript
|
|
await supermemory.namespaces.update("session_abc123", {
|
|
supportingContext: `Design exploration conversation between john@acme.com and Brand.ai assistant.
|
|
Focus on John's design preferences and brand requirements.`,
|
|
});
|
|
```
|
|
</Accordion>
|
|
|
|
<Note>
|
|
Supporting context persists on the namespace and combines with the org-level organizational context.
|
|
</Note>
|
|
|
|
---
|
|
|
|
<Note>
|
|
The Chunk size and Connector branding sections below use the legacy settings resource. Their `client.settings.update(...)` examples require a legacy SDK that exposes `settings`; SDK 5.x users should call `PATCH /v3/settings` directly with an org admin or owner credential. These options are not fields on the v5 organization resource.
|
|
</Note>
|
|
|
|
## Chunk size
|
|
|
|
Control how documents are split into searchable pieces. Smaller chunks = more precise retrieval but less context per result.
|
|
|
|
```typescript
|
|
await client.settings.update({
|
|
chunkSize: 512 // -1 for default
|
|
});
|
|
```
|
|
|
|
| Use Case | Chunk Size | Why |
|
|
|----------|------------|-----|
|
|
| Citations & references | `256-512` | Precise source attribution |
|
|
| Q&A / Support | `512-1024` | Balanced context |
|
|
| Long-form analysis | `1024-2048` | More context per chunk |
|
|
| Default | `-1` | Supermemory's optimized default |
|
|
|
|
<Note>
|
|
Smaller chunks generate more memories per document. Larger chunks provide more context but may reduce precision.
|
|
</Note>
|
|
|
|
---
|
|
|
|
## Connector branding
|
|
|
|
Show "Log in to **YourApp**" instead of "Log in to Supermemory" when users connect external services. See [Connectors Overview](/connectors/overview) for the full list of supported integrations.
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="Google Drive">
|
|
1. Create OAuth credentials in [Google Cloud Console](https://console.cloud.google.com/)
|
|
2. Redirect URI: `https://api.supermemory.ai/v3/connections/auth/callback/google-drive`
|
|
|
|
```typescript
|
|
await client.settings.update({
|
|
googleDriveCustomKeyEnabled: true,
|
|
googleDriveClientId: "your-client-id.apps.googleusercontent.com",
|
|
googleDriveClientSecret: "your-client-secret"
|
|
});
|
|
```
|
|
</Accordion>
|
|
<Accordion title="Notion">
|
|
1. Create integration at [Notion Developers](https://developers.notion.com/)
|
|
2. Redirect URI: `https://api.supermemory.ai/v3/connections/auth/callback/notion`
|
|
|
|
```typescript
|
|
await client.settings.update({
|
|
notionCustomKeyEnabled: true,
|
|
notionClientId: "your-notion-client-id",
|
|
notionClientSecret: "your-notion-client-secret"
|
|
});
|
|
```
|
|
</Accordion>
|
|
<Accordion title="OneDrive">
|
|
1. Register app in [Azure Portal](https://portal.azure.com/)
|
|
2. Redirect URI: `https://api.supermemory.ai/v3/connections/auth/callback/onedrive`
|
|
|
|
```typescript
|
|
await client.settings.update({
|
|
onedriveCustomKeyEnabled: true,
|
|
onedriveClientId: "your-azure-app-id",
|
|
onedriveClientSecret: "your-azure-client-secret"
|
|
});
|
|
```
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
---
|
|
|
|
## API reference
|
|
|
|
```typescript
|
|
// Read organization settings
|
|
const { organizationalContext, namespaceCount } = await supermemory.organization.get();
|
|
|
|
// Update organization context
|
|
await supermemory.organization.update({ organizationalContext: "..." });
|
|
|
|
// Read and update one namespace
|
|
const ns = await supermemory.namespaces.get("session_abc123");
|
|
await supermemory.namespaces.update("session_abc123", {
|
|
supportingContext: "...",
|
|
});
|
|
```
|
|
|
|
<Note>
|
|
Organization settings are organization-wide and require an organization administrator. Changes apply to new content only—existing memories aren't reprocessed.
|
|
</Note>
|
|
|
|
---
|
|
|
|
## Next steps
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Add memories" icon="/icons/hugeicons/plus-sign.svg" href="/ingestion/add-memories">
|
|
See your custom settings in action
|
|
</Card>
|
|
<Card title="Connectors" icon="/icons/hugeicons/plug-01.svg" href="/connectors/overview">
|
|
Set up automatic syncing from external platforms
|
|
</Card>
|
|
</CardGroup>
|