apps/docs/concepts/customization.mdx
Configure how Supermemory processes and retrieves content for your specific use case.
Tell Supermemory what content matters during ingestion. This helps filter and prioritize what gets indexed.
// Example: Brand guidelines assistant
await client.settings.update({
shouldLLMFilter: true,
filterPrompt: `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`
});
Guide memory extraction for a specific container tag. Filter prompts are org-wide; entity context is per container.
await client.add({
content: "User asked about logo variations for dark backgrounds...",
containerTag: "session_abc123",
entityContext: `Design exploration conversation between [email protected] and Brand.ai assistant.
Focus on John's design preferences and brand requirements.`
});
await client.containerTags.update("session_abc123", {
entityContext: `Design exploration conversation between [email protected] and Brand.ai assistant.
Focus on John's design preferences and brand requirements.`
});
Control how documents are split into searchable pieces. Smaller chunks = more precise retrieval but less context per result.
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 |
Show "Log in to YourApp" instead of "Log in to Supermemory" when users connect external services. See 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/google-drive/callback````typescript
await client.settings.update({
googleDriveCustomKeyEnabled: true,
googleDriveClientId: "your-client-id.apps.googleusercontent.com",
googleDriveClientSecret: "your-client-secret"
});
```
```typescript
await client.settings.update({
notionCustomKeyEnabled: true,
notionClientId: "your-notion-client-id",
notionClientSecret: "your-notion-client-secret"
});
```
```typescript
await client.settings.update({
onedriveCustomKeyEnabled: true,
onedriveClientId: "your-azure-app-id",
onedriveClientSecret: "your-azure-client-secret"
});
```
// Get current settings
const settings = await client.settings.get();
// Update settings
await client.settings.update({
shouldLLMFilter: true,
filterPrompt: "...",
chunkSize: 512
});