docs: fix drift in Memory Operations - #271
Draft
jack-arturo wants to merge 1 commit into
Draft
Conversation
- POST /memory/batch takes {"memories": [...]}, not a bare JSON array
- oversized batches return 400, not 413; add the real 503 row
- qdrant response field is stored/failed/queued/unconfigured, never "ok"
- error envelope is {status, code, message}, not {error, field}
- repin memory.py source-note permalink to automem@8ff266e
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EiTAbgmncBDToAzqj71wka
Deploying automem-website with
|
| Latest commit: |
01735bf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://17c34fbb.automem-website.pages.dev |
| Branch Preview URL: | https://docs-audit-reference-api-mem-pelr.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
reference/api/memory-operations. Two of these are copy-pasteable examples that fail against the current API.POST /memory/batchbody is a bare JSON array — "Send the request body as a JSON array (not an object)", with both the schema block and the curl example showing[...]if not isinstance(payload, dict): abort(400, "JSON body with 'memories' array required"), then readspayload.get("memories", []). The documented request returns 400.{"memories": [...]}; the surrounding sentence now states the object requirement, the exact 400 message, and the non-empty constraint.413 Payload Too Largewhen batch exceeds 500abort(400, "Batch size limit is 500 memories per request"). No code path returns 413.503is reachable (FalkorDB unavailable) but was undocumented.413row replaced with the real503row; the400row now enumerates every validation trigger including the >500 case. Added a note that validation is all-or-nothing (every entry is validated before any write)."qdrant": "ok"in both thePOST /memoryandPOST /memory/batchsuccess responsesqdrant_resultis only ever"stored","failed","queued","unconfigured", ornull."ok"does not exist. The example also paired"ok"with"embedding_status": "queued", whose real partner is"queued"."queued". Added a correlation table for the five realembedding_status/qdrantpairs, plus theenrichmentqueued/disabledvalues.{"error": "...", "field": "field_name"}; batch validation errors are{"error": "...", "index": 2}@app.errorhandler(Exception)returns{"status": "error", "code": <int>, "message": <description>}for everyHTTPExceptionand a generic 500 otherwise. Neithererrornorfieldnorindexis ever emitted.message, and that unhandled exceptions collapse to a generic 500.memory.pyatebcf5f168ff266e.git diff --stat ebcf5f16..8ff266e -- automem/api/memory.pyThe three
mcp-automemsource-note links (src/index.ts,src/automem-client.ts,src/types.tsat538721c) were not repinned — all three files are byte-identical between538721cand946f9e5, so those permalinks are still accurate.Spot-checked and confirmed correct, left untouched:
/memory/by-taglimitdefault 20 clamped to 1–200 andoffsetdefault 0;CLASSIFICATION_MODELdefaultgpt-4o-mini;RECALL_RELATION_LIMITdefault 5;DELETE /memory/:idreturning 404 for a missing memory; thesummarized/original_length/summarized_lengthresponse fields; and the hierarchical tag-prefix behavior.Verified against: automem@8ff266e62e65cb2e81719a765b05f64a2361a127
Verified against: mcp-automem@946f9e5ed1385b632efd2e5b250d064bcc4295e8
Questions
"2025-01") for five of five memory types. The shipped memory policy inmcp-automemexplicitly forbids date-stamped tags ("no date-stamped tags"; uset_valid/t_invalidinstead), and a prior audit flagged the same contradiction onbest-practices/context-engineering. Left alone here because it spans several pages and reads like a deliberate policy change that hasn't propagated — worth a single coordinated fix rather than a per-page edit.POST /memoryis documented as returning201 Created, which matches the code, but the endpoint usesMERGEon the memory id. Storing with an explicitidthat already exists therefore updates in place while still reporting201. Intentional?Unverified
src/automem-client.tsthis pass — the538721cpin is current, so the numbers were taken as previously verified rather than re-checked.tag_prefixes— both are performance characterizations with no single code anchor.Follow-ups
None — all discrepancies found on this page are fixed above, and the count is at the 5-fix cap.
Generated by Claude Code