Service address, protocol, request format, and response structure
Through the Memory API, you can programmatically write memories, search memories, and manage profile templates. All endpoints are served via the workspace-dedicated domain.
All endpoints return a unified JSON structure.
Success:
Error:
Provide
List endpoints support pagination:
Service address
{workspaceId} is your workspace ID, in the format llm-xxxxxxxxxxxx. View it on the console's Workspace Management page. See Obtain APP ID and Workspace ID. The workspace-dedicated domain accepts only API keys that belong to the same workspace.
All endpoints use the same base URL with the /memory/ path prefix.
When you use the Python SDK (agentscope-runtime), set the MEMORY_SERVICE_ENDPOINT environment variable to the base URL (without a trailing /):
Protocol
- All endpoints use HTTPS only
- Request and response bodies are JSON in UTF-8
- Write and search use
POST; list usesGET; update usesPATCH; delete usesDELETE
Common headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $DASHSCOPE_API_KEY, see Authentication |
Content-Type | Yes | application/json |
Response format
All endpoints return a unified JSON structure.
Success:
request_id to help locate the relevant logs quickly. See Error codes.
Pagination
List endpoints support pagination:
| Parameter | Description |
|---|---|
page_size | Page size |
page_num | Page number, starting from 1 |
Memory begins commercial billing on August 20, 2026. Add and Search calls distinguish Pro and Lite plan versions. See Billing.