docs: fix drift in Memory Operations - #306
Draft
jack-arturo wants to merge 1 commit into
Draft
Conversation
Correct the POST /memory/batch request envelope and oversize-batch status code, the validation error response shape, the delete_memory MCP tool schema, and the tagging convention table. Verified against automem@42ba8b61b7d0b24ecaeb7feb4ceef59f09fc7cd0 and mcp-automem@92c2e33cb932b71d0df35fdc250778c6a51257af Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WdXojbwftVqDeiYvUDZ3JZ
Deploying automem-website with
|
| Latest commit: |
da0beb0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9f76f091.automem-website.pages.dev |
| Branch Preview URL: | https://docs-audit-reference-api-mem-hvgv.automem-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated docs-accuracy audit of
docs/reference/api/memory-operations. Five proven discrepancies, capped at the per-PR limit.Supersedes stale #271 (opened 2026-07-29, never merged).
POST /memory/batchtakes a bare JSON array — "Send the request body as a JSON array (not an object)", with a matchingcurl -d '[...]'examplestore_batch()callsabort(400, "JSON body with 'memories' array required")when the payload is not a dict, then readspayload.get("memories", []). Every documented batch call fails with 400 as written{"memories": [...]}in the schema block, the sentence, and the curl exampleautomem@42ba8b6:automem/api/memory.py#L1135413 Payload Too Largeabort(400, "Batch size limit is 500 memories per request"). The string413does not appear anywhere in theautomempackageautomem@42ba8b6:automem/api/memory.py#L1142{"error": "...", "index": 2}app.pyreturns{"status": "error", "code": <int>, "message": <description>}for everyHTTPException. Neithererrornorindexis ever a response keyautomem@42ba8b6:app.py#L471delete_memorytakesmemory_id(Required: Yes) and nothing elsememory_idXORtags, wheretagsbulk-deletes every memory matching any tag (exact, case-insensitive, no dry-run). Neither parameter is unconditionally requiredmcp-automem@92c2e33:src/index.ts#L1331YYYY-MMdate tags (["ecommerce", "cursor", "2025-01", "decision"]); the MCP example tags2025-01lang/prefixes, platform tags, or date-stamped tags" and "NO platform tag, NO [YYYY-MM]"mcp-automem@92c2e33:src/memory-policy/shared.ts#L433,mcp-automem@92c2e33:src/memory-policy/shared.ts#L876Verified against: automem@42ba8b61b7d0b24ecaeb7feb4ceef59f09fc7cd0
Verified against: mcp-automem@92c2e33cb932b71d0df35fdc250778c6a51257af
Checked and correct, left untouched: the
POST /memory201 response body (every field matchesmemory.py:718-732), the batch 201 response body,GET /memory/by-taglimit clamp (1–200, default 20) and offset, theDETACH DELETE+ 404-on-missing behavior,gpt-4o-minias the classification fallback, and the client retry contract (25s timeout, 3 retries at 500ms/1s/2s).Questions
POST /memoryoptional-field table listsupdated_atandlast_accessedas accepted request fields. They are certainly returned in the response; I could not conclusively trace them as inbound fields on the single-store path, and getting it wrong either way would be worse than leaving it, so I did not touch the row.GET /memory/:idalso returns 503 when the graph is unavailable and 500 on a query failure. The status-code table lists only 404 and 401 — plausibly a deliberate simplification to the codes a caller acts on, so left as-is.Unverified
_normalize_tag_list,_compute_tag_prefixes,_normalize_timestamp) that are wired through the app-helper runtime rather than defined inautomem/api/memory.py. Names look right but I could not pin each to a definition site within this pass.Follow-ups
store_memoryoptional-parameter table omitstype,confidence,id,t_valid,t_invalid, and thememoriesbatch parameter, all of which the tool accepts.automem/api/memory.pyatebcf5f1and the threemcp-automemfiles at538721c; both are valid permalinks but several audits behind./recallin a page otherwise scoped to memory CRUD; it is documented in full on the Recall Operations page.Generated by Claude Code