mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-11 03:37:56 +00:00
## Stack context This is the second PR in the V5 documentation stack, on top of the versioned API reference. ## What and why Add an agent-oriented V3/V4 to V5 migration guide covering document ingestion and updates, content management, search, profiles, forgetting, namespaces, organization settings, typed filters, and rollout verification. Shared snippets keep the comprehensive guide and focused topic pages consistent. ```mermaid flowchart LR Legacy[Legacy integration inventory] --> Mapping[Domain migration guidance] Mapping --> V5[V5 requests and response readers] V5 --> Verify[Side-by-side verification and rollout] ``` ## Validation - Verified all 11 migration navigation entries resolve to authored pages. - Verified all imports across 23 migration and snippet files resolve. - `git diff --check` passed. - Mintlify build validation passed against the local generated V5 OpenAPI snapshot. ## Impact Documentation only. The guide explicitly covers changed defaults, removed operations, partial failures, namespace isolation, and rollback-oriented side-by-side testing.
75 lines
2.2 KiB
Text
75 lines
2.2 KiB
Text
V5 returns a maintained profile directly and gives profile bucket definitions their own namespace-scoped resource.
|
|
|
|
### Remove search behavior from profile calls
|
|
|
|
<CodeGroup>
|
|
```bash Legacy
|
|
POST /v4/profile
|
|
{"containerTag":"user_1","q":"work preferences","threshold":0.6,"include":{}}
|
|
```
|
|
|
|
```bash V5
|
|
POST /ns/user_1/profile
|
|
{"filter":{"field":"region","operator":"eq","value":"us-west"},"buckets":["work"]}
|
|
```
|
|
</CodeGroup>
|
|
|
|
Remove legacy `q`, `threshold`, and `include`. If the caller needs query-ranked results, issue a separate V5 search request. Move `containerTag` to the path and rename `filters` to singular `filter`.
|
|
|
|
### Read the V5 profile shape
|
|
|
|
```json
|
|
{
|
|
"profile": {
|
|
"static": ["The user works in design"],
|
|
"dynamic": ["The user is preparing a launch"],
|
|
"buckets": { "work": ["Prefers concise project updates"] }
|
|
}
|
|
}
|
|
```
|
|
|
|
`static` and `dynamic` are always returned and cannot be disabled. Omit `buckets` in the request to return every effective custom bucket; pass up to 50 names to narrow only the bucket section.
|
|
|
|
### Read bucket definitions
|
|
|
|
<CodeGroup>
|
|
```bash Legacy
|
|
POST /v4/profile/buckets
|
|
{"containerTag":"user_1"}
|
|
```
|
|
|
|
```bash V5
|
|
GET /ns/user_1/profile/buckets
|
|
```
|
|
</CodeGroup>
|
|
|
|
The response changes from key/description objects to a map:
|
|
|
|
```json
|
|
{"buckets":{"work":"Professional preferences and ongoing work"}}
|
|
```
|
|
|
|
### Add or edit namespace buckets
|
|
|
|
```bash
|
|
PUT /ns/user_1/profile/buckets
|
|
{"buckets":{"work":"Professional preferences and ongoing work"}}
|
|
```
|
|
|
|
Send one to 50 name-to-description entries. Existing namespace names are updated, new names are added, and omitted namespace buckets remain unchanged.
|
|
|
|
### Delete namespace buckets
|
|
|
|
```bash
|
|
DELETE /ns/user_1/profile/buckets
|
|
{"buckets":["work"]}
|
|
```
|
|
|
|
Names must be unique. Organization-owned buckets can appear in the effective GET response but cannot be changed or removed through namespace PUT or DELETE calls.
|
|
|
|
### Verification
|
|
|
|
- Confirm every profile response contains `static`, `dynamic`, and `buckets`.
|
|
- Compare omitted buckets with one-name and multi-name narrowing.
|
|
- Add, edit, and delete a namespace bucket without replacing omitted buckets.
|
|
- Attempt to mutate an inherited organization bucket and expect the documented error.
|