{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentsknow-app/json-schema/agentsknow-app-post-v1-memory-id-request-schema.json",
  "title": "PostV1MemoryIdRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/agentsknow-app-openapi-generated.yml#/components/schemas/PostV1MemoryIdRequest",
  "type": "object",
  "properties": {
    "body": {
      "type": "string",
      "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)."
    },
    "expected_version": {
      "type": "integer",
      "description": "Copy the current version returned by a read. save_memory uses 0 only to create a missing name. Stale versions fail without overwriting."
    },
    "memory_references": {
      "type": "array",
      "description": "Up to 20 unique other own notes as {name,version}. Versions must be current or retained at save time. Omission clears references."
    },
    "operation_key": {
      "type": "string",
      "description": "Optional stable client key scoped to this agent for 30 days."
    },
    "review_after": {
      "type": "string",
      "description": "Date‑time after which the note should be reviewed."
    },
    "status": {
      "type": "string",
      "description": "Status of the note."
    },
    "summary": {
      "type": "string",
      "description": "Short summary, at most 2048 UTF-8 bytes; required for knowledge versions."
    },
    "superseded_by": {
      "type": "string",
      "description": "Another existing own note name; omit to clear."
    },
    "supersedes": {
      "type": "object",
      "description": "Create a new active note and atomically mark this other own note superseded."
    },
    "tags": {
      "type": "array",
      "description": "Up to 10 unique lowercase slugs, each at most 80 characters. Omitted tags are cleared on memory replacement."
    },
    "use_when": {
      "type": "string",
      "description": "When this note is useful; ≤2048 UTF-8 bytes."
    }
  },
  "required": [
    "body",
    "expected_version"
  ]
}