aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/memory-api
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2026-01-18 16:55:32 -0800
committerGitHub <[email protected]>2026-01-18 16:55:32 -0800
commit87b361c26bf5fc16049cd2727825891aa14b8e8b (patch)
treec2f9f4f6223a7c1734578b772a16490ba2eb8b96 /apps/docs/memory-api
parentAdd Claude Code GitHub Workflow (#681) (diff)
downloadsupermemory-87b361c26bf5fc16049cd2727825891aa14b8e8b.tar.xz
supermemory-87b361c26bf5fc16049cd2727825891aa14b8e8b.zip
docs changes (#678)
Co-authored-by: Claude Opus 4.5 <[email protected]>
Diffstat (limited to 'apps/docs/memory-api')
-rw-r--r--apps/docs/memory-api/connectors/managing-resources.mdx1
-rw-r--r--apps/docs/memory-api/features/filtering.mdx4
-rw-r--r--apps/docs/memory-api/ingesting.mdx12
-rw-r--r--apps/docs/memory-api/introduction.mdx2
-rw-r--r--apps/docs/memory-api/sdks/anthropic-claude-memory.mdx4
-rw-r--r--apps/docs/memory-api/sdks/openai-plugins.mdx2
-rw-r--r--apps/docs/memory-api/sdks/overview.mdx6
-rw-r--r--apps/docs/memory-api/sdks/python.mdx16
-rw-r--r--apps/docs/memory-api/sdks/typescript.mdx26
-rw-r--r--apps/docs/memory-api/track-progress.mdx18
10 files changed, 46 insertions, 45 deletions
diff --git a/apps/docs/memory-api/connectors/managing-resources.mdx b/apps/docs/memory-api/connectors/managing-resources.mdx
index f9e0f424..24cab0ec 100644
--- a/apps/docs/memory-api/connectors/managing-resources.mdx
+++ b/apps/docs/memory-api/connectors/managing-resources.mdx
@@ -2,6 +2,7 @@
title: 'Managing Connection Resources'
sidebarTitle: 'Managing Resources'
description: 'Get and configure resources for connections that support resource management'
+icon: 'folder-sync'
---
<Note>
diff --git a/apps/docs/memory-api/features/filtering.mdx b/apps/docs/memory-api/features/filtering.mdx
index 3873e606..e7e3a14d 100644
--- a/apps/docs/memory-api/features/filtering.mdx
+++ b/apps/docs/memory-api/features/filtering.mdx
@@ -168,7 +168,7 @@ curl --location 'https://api.supermemory.ai/v3/documents' \
```
```typescript Typescript
-await client.memories.create({
+await client.documents.create({
content: "quarterly planning meeting discussion",
metadata: {
participants: ["john.doe", "sarah.smith", "mike.wilson"]
@@ -177,7 +177,7 @@ await client.memories.create({
```
```python Python
-client.memories.create(
+client.documents.create(
content="quarterly planning meeting discussion",
metadata={
"participants": ["john.doe", "sarah.smith", "mike.wilson"]
diff --git a/apps/docs/memory-api/ingesting.mdx b/apps/docs/memory-api/ingesting.mdx
index 79468eaf..301fb66a 100644
--- a/apps/docs/memory-api/ingesting.mdx
+++ b/apps/docs/memory-api/ingesting.mdx
@@ -104,7 +104,7 @@ const client = new Supermemory({
})
async function addContent() {
- const result = await client.memories.add({
+ const result = await client.add({
content: "Machine learning is a subset of artificial intelligence...",
containerTags: ["ai-research"],
metadata: {
@@ -127,7 +127,7 @@ import os
client = Supermemory(api_key=os.environ.get("SUPERMEMORY_API_KEY"))
-result = client.memories.add(
+result = client.add(
content="Machine learning is a subset of artificial intelligence...",
container_tags=["ai-research"],
metadata={
@@ -205,7 +205,7 @@ const client = new Supermemory({
})
// Method 1: Using SDK uploadFile method (RECOMMENDED)
-const result = await client.memories.uploadFile({
+const result = await client.documents.uploadFile({
file: fs.createReadStream('/path/to/document.pdf'),
containerTags: 'research_project' // String, not array!
})
@@ -234,7 +234,7 @@ from supermemory import Supermemory
client = Supermemory(api_key="your_api_key")
# Method 1: Using SDK upload_file method (RECOMMENDED)
-result = client.memories.upload_file(
+result = client.documents.upload_file(
file=open('document.pdf', 'rb'),
container_tags='research_project' # String parameter name
)
@@ -699,7 +699,7 @@ Process large volumes efficiently with rate limiting and error recovery.
async function ingestWithRetry(doc: Document, maxRetries: number) {
for (let attempt = 1; attempt <= maxRetries; attempt++) {
try {
- return await client.memories.add({
+ return await client.add({
content: doc.content,
customId: doc.id,
containerTags: ["batch_import_user_123"], // CORRECTED: Array
@@ -787,7 +787,7 @@ Process large volumes efficiently with rate limiting and error recovery.
async def ingest_with_retry(doc: Dict[str, Any], max_retries: int):
for attempt in range(1, max_retries + 1):
try:
- return await client.memories.add(
+ return await client.add(
content=doc['content'],
custom_id=doc['id'],
container_tags=["batch_import_user_123"], # CORRECTED: List
diff --git a/apps/docs/memory-api/introduction.mdx b/apps/docs/memory-api/introduction.mdx
index ca4fa705..24a46f8b 100644
--- a/apps/docs/memory-api/introduction.mdx
+++ b/apps/docs/memory-api/introduction.mdx
@@ -37,7 +37,7 @@ Check out the following resources to get started:
<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/">
+ <Card title="SDKs" icon="code" href="/integrations/supermemory-sdk">
Learn more about the SDKs
</Card>
</CardGroup> \ No newline at end of file
diff --git a/apps/docs/memory-api/sdks/anthropic-claude-memory.mdx b/apps/docs/memory-api/sdks/anthropic-claude-memory.mdx
index 5e6c5866..10bc195b 100644
--- a/apps/docs/memory-api/sdks/anthropic-claude-memory.mdx
+++ b/apps/docs/memory-api/sdks/anthropic-claude-memory.mdx
@@ -357,11 +357,11 @@ The Claude Memory Tool is ideal for:
## Next Steps
<CardGroup cols={2}>
- <Card title="OpenAI SDK Tools" icon="sparkles" href="/memory-api/sdks/openai-plugins">
+ <Card title="OpenAI SDK Tools" icon="sparkles" href="/integrations/openai">
Use memory tools with OpenAI function calling
</Card>
- <Card title="AI SDK Integration" icon="triangle" href="/ai-sdk/overview">
+ <Card title="AI SDK Integration" icon="triangle" href="/integrations/ai-sdk">
Integrate with Vercel AI SDK
</Card>
diff --git a/apps/docs/memory-api/sdks/openai-plugins.mdx b/apps/docs/memory-api/sdks/openai-plugins.mdx
index 635e0008..d95dad47 100644
--- a/apps/docs/memory-api/sdks/openai-plugins.mdx
+++ b/apps/docs/memory-api/sdks/openai-plugins.mdx
@@ -574,7 +574,7 @@ npm run lint
## Next Steps
<CardGroup cols={2}>
- <Card title="AI SDK Integration" icon="triangle" href="/ai-sdk/overview">
+ <Card title="AI SDK Integration" icon="triangle" href="/integrations/ai-sdk">
Use with Vercel AI SDK for streamlined development
</Card>
diff --git a/apps/docs/memory-api/sdks/overview.mdx b/apps/docs/memory-api/sdks/overview.mdx
index 32ffdd32..30ace8a2 100644
--- a/apps/docs/memory-api/sdks/overview.mdx
+++ b/apps/docs/memory-api/sdks/overview.mdx
@@ -3,18 +3,18 @@ title: "Overview"
---
<Columns cols={2}>
- <Card title="Native Python and Typescript/JS SDKs" icon="code" href="/memory-api/sdks/native">
+ <Card title="Native Python and Typescript/JS SDKs" icon="code" href="/integrations/supermemory-sdk">
<br/>
```pip install supermemory```
```npm install supermemory```
</Card>
- <Card title="AI SDK plugin" icon="triangle" href="/ai-sdk/overview">
+ <Card title="AI SDK plugin" icon="triangle" href="/integrations/ai-sdk">
Easy to use with Vercel AI SDK
</Card>
- <Card title="OpenAI SDK plugins" icon="sparkles" href="/memory-api/sdks/openai-plugins">
+ <Card title="OpenAI SDK plugins" icon="sparkles" href="/integrations/openai">
Use supermemory with the python and javascript OpenAI SDKs
</Card>
diff --git a/apps/docs/memory-api/sdks/python.mdx b/apps/docs/memory-api/sdks/python.mdx
index 52b6b3af..0888f2b0 100644
--- a/apps/docs/memory-api/sdks/python.mdx
+++ b/apps/docs/memory-api/sdks/python.mdx
@@ -78,7 +78,7 @@ from supermemory import Supermemory
client = Supermemory()
-client.memories.upload_file(
+client.documents.upload_file(
file=Path("/path/to/file"),
)
```
@@ -101,7 +101,7 @@ from supermemory import Supermemory
client = Supermemory()
try:
- client.memories.add(
+ client.add(
content="This is a detailed article about machine learning concepts...",
)
except supermemory.APIConnectionError as e:
@@ -146,7 +146,7 @@ client = Supermemory(
)
# Or, configure per-request:
-client.with_options(max_retries=5).memories.add(
+client.with_options(max_retries=5).documents.add(
content="This is a detailed article about machine learning concepts...",
)
```
@@ -171,7 +171,7 @@ client = Supermemory(
)
# Override per-request:
-client.with_options(timeout=5.0).memories.add(
+client.with_options(timeout=5.0).documents.add(
content="This is a detailed article about machine learning concepts...",
)
```
@@ -214,12 +214,12 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
from supermemory import Supermemory
client = Supermemory()
-response = client.memories.with_raw_response.add(
+response = client.documents.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
+memory = response.parse() # get the object that `documents.add()` would have returned
print(memory.id)
```
@@ -234,7 +234,7 @@ The above interface eagerly reads the full response body when you make the reque
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(
+with client.documents.with_streaming_response.add(
content="This is a detailed article about machine learning concepts...",
) as response:
print(response.headers.get("X-My-Header"))
@@ -346,4 +346,4 @@ print(supermemory.__version__)
## Requirements
-Python 3.8 or higher. \ No newline at end of file
+Python 3.8 or higher.
diff --git a/apps/docs/memory-api/sdks/typescript.mdx b/apps/docs/memory-api/sdks/typescript.mdx
index dd656a25..d6670b10 100644
--- a/apps/docs/memory-api/sdks/typescript.mdx
+++ b/apps/docs/memory-api/sdks/typescript.mdx
@@ -41,10 +41,10 @@ const client = new Supermemory({
});
async function main() {
- const params: supermemory.MemoryAddParams = {
+ const params: Supermemory.AddParams = {
content: 'This is a detailed article about machine learning concepts...',
};
- const response: supermemory.MemoryAddResponse = await client.memories.add(params);
+ const response: Supermemory.AddResponse = await client.add(params);
}
main();
@@ -68,17 +68,17 @@ 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') });
+await client.documents.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') });
+await client.documents.uploadFile({ file: new File(['my bytes'], 'file') });
// You can also pass a `fetch` `Response`:
-await client.memories.uploadFile({ file: await fetch('https://somesite/file') });
+await client.documents.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') });
+await client.documents.uploadFile({ file: await toFile(Buffer.from('my bytes'), 'file') });
+await client.documents.uploadFile({ file: await toFile(new Uint8Array([0, 1, 2]), 'file') });
```
## Handling errors
@@ -90,7 +90,7 @@ a subclass of `APIError` will be thrown:
```ts
async function main() {
- const response = await client.memories
+ const response = await client.documents
.add({ content: 'This is a detailed article about machine learning concepts...' })
.catch(async (err) => {
if (err instanceof supermemory.APIError) {
@@ -135,7 +135,7 @@ const client = new Supermemory({
});
// Or, configure per-request:
-await client.memories.add({ content: 'This is a detailed article about machine learning concepts...' }, {
+await client.add({ content: 'This is a detailed article about machine learning concepts...' }, {
maxRetries: 5,
});
```
@@ -152,7 +152,7 @@ const client = new Supermemory({
});
// Override per-request:
-await client.memories.add({ content: 'This is a detailed article about machine learning concepts...' }, {
+await client.add({ content: 'This is a detailed article about machine learning concepts...' }, {
timeout: 5 * 1000,
});
```
@@ -175,13 +175,13 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
```ts
const client = new Supermemory();
-const response = await client.memories
+const response = await client.documents
.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
+const { data: response, response: raw } = await client.documents
.add({ content: 'This is a detailed article about machine learning concepts...' })
.withResponse();
console.debug(raw.headers.get('X-My-Header'));
@@ -388,4 +388,4 @@ The following runtimes are supported:
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
+If you are interested in other runtime environments, please open or upvote an issue on GitHub.
diff --git a/apps/docs/memory-api/track-progress.mdx b/apps/docs/memory-api/track-progress.mdx
index e14d7739..65c0462f 100644
--- a/apps/docs/memory-api/track-progress.mdx
+++ b/apps/docs/memory-api/track-progress.mdx
@@ -105,20 +105,20 @@ Track specific document processing status.
<CodeGroup>
```typescript Typescript
-const memory = await client.memories.get("doc_abc123");
+const memory = await client.documents.get("doc_abc123");
console.log(`Status: ${memory.status}`);
// Poll for completion
while (memory.status !== 'done') {
await new Promise(r => setTimeout(r, 2000));
- memory = await client.memories.get("doc_abc123");
+ memory = await client.documents.get("doc_abc123");
console.log(`Status: ${memory.status}`);
}
```
```python Python
-memory = client.memories.get("doc_abc123")
+memory = client.documents.get("doc_abc123")
print(f"Status: {memory['status']}")
@@ -126,7 +126,7 @@ print(f"Status: {memory['status']}")
import time
while memory['status'] != 'done':
time.sleep(2)
- memory = client.memories.get("doc_abc123")
+ memory = client.documents.get("doc_abc123")
print(f"Status: {memory['status']}")
```
@@ -178,7 +178,7 @@ async function waitForProcessing(documentId: string, maxWaitMs = 300000) {
const pollInterval = 2000; // 2 seconds
while (Date.now() - startTime < maxWaitMs) {
- const doc = await client.memories.get(documentId);
+ const doc = await client.documents.get(documentId);
if (doc.status === 'done') {
return doc;
@@ -205,7 +205,7 @@ async function trackBatch(documentIds: string[]) {
// Initial check
for (const id of documentIds) {
- const doc = await client.memories.get(id);
+ const doc = await client.documents.get(id);
statuses.set(id, doc.status);
}
@@ -215,7 +215,7 @@ async function trackBatch(documentIds: string[]) {
for (const id of documentIds) {
if (statuses.get(id) !== 'done' && statuses.get(id) !== 'failed') {
- const doc = await client.memories.get(id);
+ const doc = await client.documents.get(id);
statuses.set(id, doc.status);
}
}
@@ -236,7 +236,7 @@ Handle processing failures gracefully:
```typescript
async function addWithRetry(content: string, maxRetries = 3) {
for (let attempt = 1; attempt <= maxRetries; attempt++) {
- const { id } = await client.memories.add({ content });
+ const { id } = await client.add({ content });
try {
const result = await waitForProcessing(id);
@@ -253,4 +253,4 @@ async function addWithRetry(content: string, maxRetries = 3) {
}
}
}
-``` \ No newline at end of file
+```