Long-term memory API
Complete API directory for long-term memory: common request information, a full API overview, and usage limits. See each API's dedicated page for request parameters, responses, and sample code.
This document is the directory overview of all long-term memory (Memory) APIs. For feature introduction and usage guides, see Memory and Long-term memory API.
Common request information
| Parameter | Description |
|---|---|
| Base URL | https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory/. Replace {WorkspaceId} with your actual workspace ID |
| Authentication | Add Authorization: Bearer $DASHSCOPE_API_KEY to the request header. To obtain an API Key, see Get API Key |
| Content-Type | application/json |
For protocol conventions, common request/response formats, and pagination, see API overview. For authentication details, see Authentication. For error responses, see Error codes.
API overview
ImportantMemory begins commercial billing at 10:00 (UTC+8) on August 20, 2026. Add and Search calls are both available in Pro and Lite versions: for Add, the version corresponds to memory extraction models of different quality; for Search, the version determines whether Rerank is enabled. For more information, see Billing.
Memory management:
The type of a memory node (memory_type) is either factual memory (observation) or skill memory (skill). Which type is extracted on write is determined by the memory rule that project_id points to. If you pass profile_schema, a user profile is extracted as well and is read through the user profile APIs listed below.
| API name | HTTP method | Path | Description |
|---|---|---|---|
| AddMemory | POST | /add | Add a memory synchronously and return the extraction result in the response |
| AddMemoryAsync | POST | /add-async | Submit a memory extraction task asynchronously |
| GetEvent | GET | /events/{event_id} | Get asynchronous task event details |
| ListMemory | GET | /memory_nodes | List memory nodes by page |
| SearchMemory | POST | /memory_nodes/search | Search memory nodes by similarity, factual memories only by default |
| GetMemoryNode | GET | /memory_nodes/{memory_node_id} | Get a memory node |
| GetSkillExport | GET | /skill/export/{memory_node_id} | Export a skill memory node |
| UpdateMemory | PATCH | /memory_nodes/{memory_node_id} | Update the content of a memory node |
| DeleteMemory | DELETE | /memory_nodes/{memory_node_id} | Delete a memory node |
User profile:
| API name | HTTP method | Path | Description |
|---|---|---|---|
| CreateProfileSchema | POST | /profile_schemas | Create a profile schema |
| ListProfileSchemas | GET | /profile_schemas | List profile schemas |
| GetProfileSchema | GET | /profile_schemas/{profile_schema_id} | Get profile schema details |
| UpdateProfileSchema | PATCH | /profile_schemas/{profile_schema_id} | Update a profile schema |
| GetUserProfile | GET | /profile_schemas/{profile_schema_id}/user_profile | Get a user profile |
Usage limits
Throttling (per Alibaba Cloud account):
| API | Limit |
|---|---|
| All APIs | 3,000 QPM in total |
| add API | 120 QPM |
| search API | 300 QPM |
Generated memory fragments and user profiles currently have no expiration date. To request a quota increase, submit a ticket. For more information, see Rate limits.