skill: fix namespace move, profile ids, status codes and dreamingStatus in v5 skill

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
MaheshtheDev 2026-10-24 00:01:56 +00:00
parent 4caf812253
commit 593838bcb6
4 changed files with 18 additions and 12 deletions

View file

@ -158,7 +158,7 @@ Agents must pick the right removal path:
| "Delete that conversation" / remove a whole file or URL | `documentDelete` | Source document permanently; extracted memories are soft-forgotten | `documentId` from `documentList` |
| User is vague ("forget what you know about my job") | `searchMemories` first → then `memoryForget` | Same as memoryForget | Search first, then use `memoryId` |
**Do not confuse IDs:** `memoryId` ≠ `documentId`. In hybrid results, only an item containing `memory` has a forgettable memory ID; an item containing `chunk` has a chunk ID. Static/dynamic profile entries are `{ id, memory }`, so their `id` is a forgettable memory ID.
**Do not confuse IDs:** `memoryId` ≠ `documentId`. In hybrid results, only an item containing `memory` has a forgettable memory ID; an item containing `chunk` has a chunk ID. Static/dynamic profile entries are `{ id, memory }`; their `id` is a forgettable memory ID unless it starts with `aggregated_`, which marks a summary synthesized from several memories.
**Soft vs hard delete:** `memoryForget` hides a fact from profile/search but leaves source documents. `documentDelete` permanently removes the underlying source and soft-forgets its extracted memories.
@ -180,7 +180,7 @@ const tools = supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
The aggregate includes destructive tools. Select only the operations the agent needs, and expose `documentDelete` or `memoryForget` only when the agent is authorized to remove data.
**Python:** there is no v5 Python tools package yet. Call the Python SDK (`pip install supermemory`) from your own function-calling handlers.
**Python:** the v5 Python integration is `supermemory-agent-framework` 2.x (tools and middleware for Microsoft Agent Framework). `supermemory-openai-sdk`, `supermemory-pipecat`, and `supermemory-cartesia` still require `supermemory<5`, so for other frameworks call the Python SDK (`pip install supermemory`) from your own function-calling handlers.
**For Chatbots**: Use middleware (`withSupermemory`) for automatic context injection, or pass tools to the model for explicit memory control

View file

@ -28,7 +28,7 @@ Every content route is scoped to one namespace in the path: `/ns/{namespace}/...
- `POST`, `PATCH`, and `PUT` options go in the JSON body (or as form fields on file uploads). List pagination (`page`, `limit`, `sort`, `order`) is the exception and stays in the query string.
- `DELETE` options such as `moveTo` go in the query string; bulk deletes send `ids` in the JSON body.
Options sent in the wrong place return `400`.
Most routes reject options sent in the wrong place with `400`. `DELETE /ns/{namespace}` does not: it ignores a JSON body, so a `moveTo` sent in the body permanently deletes the namespace instead of moving it. Always send `moveTo` in the query string.
## Endpoints
@ -198,12 +198,16 @@ curl -X POST https://api.supermemory.ai/ns/documentation/search \
"category": "security",
"rating": 4.5
},
"similarity": 0.87,
"isLatest": true,
"isInference": false,
"system": { "createdAt": "...", "updatedAt": "..." }
},
{
"id": "mem_789",
"memory": "The API supports OAuth 2.0 for authorization",
"metadata": {},
"similarity": 0.82,
"isLatest": true,
"isInference": false,
"system": { "createdAt": "...", "updatedAt": "..." }
@ -298,7 +302,7 @@ To find memories by meaning, call `DELETE /ns/{namespace}/memories/semantic` wit
| `GET /ns/{namespace}` | Read a namespace's `supportingContext` |
| `PATCH /ns/{namespace}` | Set `supportingContext` (send `null` to clear) |
| `DELETE /ns/{namespace}` | Permanently delete a namespace and its content |
| `DELETE /ns/{namespace}?moveTo={target}` | Move content to another namespace, then remove the source (`202`, returns `operationId`) |
| `DELETE /ns/{namespace}?moveTo={target}` | Move content to another namespace, then remove the source (`202`, returns `operationId`). `moveTo` must be in the query string; in a JSON body it is ignored and the namespace is deleted |
| `GET/PATCH /organization` | Read or set `organizationalContext` (PATCH needs an org admin) |
---
@ -313,9 +317,10 @@ To find memories by meaning, call `DELETE /ns/{namespace}/memories/semantic` wit
| 202 | Accepted | Async operation queued (for example a namespace move) |
| 400 | Bad Request | Invalid request parameters, or an option in the wrong place |
| 401 | Unauthorized | Missing or invalid API key |
| 402 | Payment Required | Processing credits, search quota, or plan limits exhausted |
| 403 | Forbidden | Caller lacks permission (for example a non-admin updating `/organization`) |
| 404 | Not Found | Resource not found in this namespace |
| 409 | Conflict | Document still processing, or a sync already running |
| 409 | Conflict | Namespace busy or being merged, file-path conflict on ingest, organization-level profile bucket change, or a connector sync already running |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server error occurred |
@ -462,7 +467,7 @@ curl -X POST https://api.supermemory.ai/ns/docs/document \
# Returns: { "id": "report_2026", "status": "queued" }
# Later, read the document and check system.status
# Later, read the document: system.status tracks indexing, system.dreamingStatus tracks memory generation
curl https://api.supermemory.ai/ns/docs/document/report_2026 \
-H "Authorization: Bearer YOUR_API_KEY"
```

View file

@ -242,7 +242,7 @@ const recommendations = generateRecommendations(profile);
**Slow Processing**
- Large PDFs (100 pages) take 1-2 minutes
- Videos take 5-10 minutes
- Check document status with `client.list(namespace, "documents")` and read `system.status` on each item
- Check document status with `client.list(namespace, "documents")`: `system.status` tracks indexing and `system.dreamingStatus` tracks memory generation, which can finish minutes later under the default `dreaming: "dynamic"`
## Support

View file

@ -197,7 +197,7 @@ const [{ profile }, { results }] = await Promise.all([
]);
```
Every profile entry carries an `id`, so it can be passed to `memories.forget()`.
Every profile entry carries an `id`. Pass it to `memories.forget()` unless it starts with `aggregated_`: those entries are summaries synthesized from several memories and don't map to one memory.
### `search()` - Semantic Search
@ -223,8 +223,9 @@ const response = await client.search(namespace, {
// memory?: string, // Present on memory results
// chunk?: string, // Present on chunk results
// metadata: object,
// isLatest?: boolean,
// isInference?: boolean,
// similarity: number, // 0-1 relevance score
// isLatest: boolean,
// isInference: boolean, // false for chunks
// system: { ... }, // Lifecycle fields
// included?: { document?, related?: { parents, children, siblings } }
// }>,
@ -299,7 +300,7 @@ Retrieve stored items in one namespace with optional filtering and pagination.
const response = await client.list(namespace, "documents" | "chunks" | "memories", {
page?: number, // Optional: 1-based page number (default 1)
limit?: number, // Optional: items per page (default 10, max 100)
sort?: "createdAt" | "updatedAt", // Optional: default "createdAt"
sort?: "createdAt" | "updatedAt" | "position", // Optional: default "createdAt"; chunks accept "createdAt" or "position"
order?: "asc" | "desc", // Optional: default "desc"
filter?: Filter // Optional: typed filter
});
@ -325,7 +326,7 @@ documents.forEach(doc => {
});
```
There is no separate processing list: read `system.status` on each document (`queued`, `extracting`, `chunking`, `embedding`, `indexing`, `done`, `failed`).
There is no separate processing list: read `system.status` on each document (`queued`, `extracting`, `chunking`, `embedding`, `indexing`, `done`, `failed`). Memory generation is tracked separately in `system.dreamingStatus` (`dreaming`, then `done`). Under the default `dreaming: "dynamic"`, `status` can reach `done` minutes before `dreamingStatus` does, so wait on `dreamingStatus` before reading memories or profiles. TypeScript types it from `supermemory` 5.0.2; the Python 5.0.0 models don't expose it yet, so read it from the raw HTTP response there.
**Paginated listing:**
```typescript