docs: align vibe-coding prompt + install guide with canonical API#976
Conversation
A survey of 52 hackathon projects integrating Supermemory found that
the patterns most frequently broken by AI codegen — wrong auth header,
deprecated containerTags plural, legacy /v3/search, and missing
containerTag scoping — were being actively recommended by these two
docs.
vibe-coding.mdx (the prompt users copy-paste into Claude/Cursor):
- Added a CANONICAL API SURFACE + DO NOT USE block before STEP 1 so
the agent sees the rules before any code example
- All x-supermemory-api-key → Authorization: Bearer
- containerTags: [userId] → containerTag: userId
- Repaired ~10 broken code fences (STEPs 3-8 were malformed; the
USER-ONLY APP example was empty)
- Note that rerank/rewriteQuery/filters are v4-search-only
- Note that client.memories.update/delete/forget are real but most
apps don't need them — memories are auto-extracted from documents
install.md (same prompt, separate doc):
- All 8 x-supermemory-api-key occurrences → Authorization: Bearer
with Content-Type where needed
Files in apps/docs/{memory-router,ai-sdk/infinite-chat,
model-enhancement,supermemory-mcp}/ are intentionally untouched —
those endpoints route off x-sm-user-id / x-sm-project so the headers
are required there.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @Dhravya's task in 1m 28s —— View job Review Complete
Overview: Aligns documentation with the canonical API by updating auth headers, fixing Issues found:
Score: 9/10 Clean documentation update that addresses real codegen failure modes. The CANONICAL API SURFACE + DO NOT USE blocks are a smart addition for AI context. One bug in the file upload example needs fixing before merge. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | 816bc49 | May 19 2026, 10:24 PM |
There was a problem hiding this comment.
Overview: Aligns documentation with the canonical API by updating auth headers, fixing containerTag singularity, and repairing broken code fences.
Issues found:
apps/docs/install.mdline 245: IncorrectContent-Type: application/jsonheader on aFormDatafile upload — this will break the request. The same example invibe-coding.mdxcorrectly omits this header.
Score: 9/10
Clean documentation update that addresses real codegen failure modes. The CANONICAL API SURFACE + DO NOT USE blocks are a smart addition for AI context. One bug in the file upload example needs fixing before merge.
| headers: { | ||
| 'Authorization': `Bearer ${process.env.SUPERMEMORY_API_KEY}`, | ||
| 'Content-Type': 'application/json', | ||
| }, |
There was a problem hiding this comment.
Bug: Setting Content-Type: application/json when the body is a FormData object will break file uploads. The fetch API automatically sets Content-Type: multipart/form-data with the correct boundary when passing FormData as the body.
Note that vibe-coding.mdx correctly omits this header for the same file upload example.
| headers: { | |
| 'Authorization': `Bearer ${process.env.SUPERMEMORY_API_KEY}`, | |
| 'Content-Type': 'application/json', | |
| }, | |
| headers: { | |
| 'Authorization': `Bearer ${process.env.SUPERMEMORY_API_KEY}`, | |
| }, |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | 816bc49 | Commit Preview URL Branch Preview URL |
May 19 2026, 10:25 PM |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Summary
A survey of 52 hackathon projects integrating Supermemory found the same handful of AI-codegen failure modes over and over: deprecated
containerTagsplural array, legacy/v3/search, missingcontainerTagscoping (every user's data lands in one bucket), and inconsistent auth headers. Two of our own docs — `vibe-coding.mdx` (the prompt users paste into Claude/Cursor) and `install.md` (the same prompt as a separate doc) — were actively recommending those patterns.This PR aligns both with the canonical API.
`apps/docs/vibe-coding.mdx`
`apps/docs/install.md`
Intentionally not touched
`apps/docs/{memory-router,ai-sdk/infinite-chat,model-enhancement,supermemory-mcp}/` continue to use `x-sm-user-id` / `x-sm-project` — those endpoints actually route off those headers, so the docs are correct as-is. Same for any `x-supermemory-api-key` references in those subtrees.
Companion PR
supermemoryai/skills#2 applies the same canonical-surface + anti-patterns treatment to the Supermemory Claude Code skill, which is the higher-leverage fix (every Claude Code session that uses the skill loads it into context).
Test plan
🤖 Generated with Claude Code