aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/ai-sdk/overview.mdx
diff options
context:
space:
mode:
authornexxeln <[email protected]>2025-12-14 01:19:52 +0000
committernexxeln <[email protected]>2025-12-14 01:19:52 +0000
commitc42248ff350294de5d11f7cba03a819683c5247a (patch)
treed23904b418d53e03a1508f2bcb989ea24ea52d07 /apps/docs/ai-sdk/overview.mdx
parentfix: another react vulnerability (#615) (diff)
downloadsupermemory-mintlify/custom-github-oauth-docs-80548.tar.xz
supermemory-mintlify/custom-github-oauth-docs-80548.zip
Diffstat (limited to 'apps/docs/ai-sdk/overview.mdx')
-rw-r--r--apps/docs/ai-sdk/overview.mdx15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/docs/ai-sdk/overview.mdx b/apps/docs/ai-sdk/overview.mdx
index f084aba9..667ae5c7 100644
--- a/apps/docs/ai-sdk/overview.mdx
+++ b/apps/docs/ai-sdk/overview.mdx
@@ -26,7 +26,7 @@ import { withSupermemory } from "@supermemory/tools/ai-sdk"
import { openai } from "@ai-sdk/openai"
// Wrap your model with Supermemory - profiles are automatically injected
-const modelWithMemory = withSupermemory(openai("gpt-4"), "user-123")
+const modelWithMemory = withSupermemory(openai("gpt-5"), "user-123")
const result = await generateText({
model: modelWithMemory,
@@ -35,6 +35,19 @@ const result = await generateText({
// The model automatically has the user's profile context!
```
+<Note>
+ **Memory saving is disabled by default.** The middleware only retrieves existing memories. To automatically save new memories from conversations, enable it explicitly:
+
+ ```typescript
+ const modelWithMemory = withSupermemory(openai("gpt-5"), "user-123", {
+ addMemory: "always"
+ })
+ ```
+</Note>
+
+```typescript
+```
+
## Memory Tools
Add memory capabilities to AI agents with search, add, and fetch operations.