Get Memory

Updated at:

Reads a single memory with its body. An archived but undeleted store can still be read; a deleted memory returns 404.

Prerequisites

Endpoint and authentication have been configured. For details, see API overview and authentication.

Endpoint

GET /memory_stores/{memory_store_id}/memories/{memory_id}

Path parameters

FieldRequiredTypeDescription
memory_store_idYesstringMemory store ID
memory_idYesstringMemory ID

Request example

curl "$AGENTSTUDIO_URL/memory_stores/memstore_xxx/memories/mem_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response

{
  "id": "mem_xxx",
  "type": "memory",
  "memory_store_id": "memstore_xxx",
  "path": "/notes/project.md",
  "content": "# Project Conventions\nThe default development environment is staging.\n",
  "content_sha256": "e3b0c44b98fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "content_size_bytes": 47,
  "memory_version_id": "memver_xxx",
  "created_at": "2026-09-17T08:00:00Z",
  "updated_at": "2026-09-17T08:00:00Z"
}

Response fields

FieldTypeDescription
idstringMemory ID, in the format mem_xxx
typestringFixed value: memory
memory_store_idstringID of the memory store the memory belongs to
pathstringPath within the memory store, starting with /
contentstringBody content, UTF-8 text; returned when view=full or when reading a single memory
content_sha256stringSHA256 hash of the body content, usable as an optimistic lock for conditional updates
content_size_bytesintegerSize of the body content in UTF-8 bytes
memory_version_idstringCurrent version ID, in the format memver_xxx
created_atstringCreation time, ISO 8601 UTC
updated_atstringLast update time, ISO 8601 UTC

Error codes

HTTP statusError codeDescription
401InvalidApiKeyAPI key missing, invalid, or expired
403permission_errorInsufficient identity or resource access permissions
404not_found_errorResource does not exist or does not belong to the current workspace