The following quotas and limits apply to Memory Storage regions, memory stores, writes, searches, memory consolidation (Dream), asynchronous tasks, Scope, SDK and CLI versions, and agent plugins.
Service availability and resource limits
Regions
Memory Storage is available only in the China (Beijing) and China (Hangzhou) regions.
Memory store limits
|
Item |
Limit |
|
Memory store name characters |
Letters, digits, and underscores only |
|
Memory store name length |
Up to 32 characters |
|
Memory store description length |
Up to 1,024 bytes in UTF-8 |
|
|
Up to 4,096 characters |
After you create a memory store, wait for index initialization to complete before you write or search data.
extractInstructions specifies custom memory extraction instructions at the memory store level. The instructions are injected into the extraction prompt and affect subsequent long-term memory extraction in the memory store. You can set the instructions when you call CreateMemoryStore or modify them by calling UpdateMemoryStore. To clear the instructions, pass an empty string. If you omit the field, the existing instructions remain unchanged.
Memory operation limits
Scope rules
|
Operation |
Scope requirement |
Wildcard |
|
Add memories |
|
No |
|
Search long-term memories |
|
Allowed for |
|
Query short-term memories |
All four Scope levels are required. |
No |
|
Get a long-term memory |
All four Scope levels are required. |
No |
|
Update a long-term memory |
All four Scope levels are required. |
No |
|
Delete a long-term memory |
All four Scope levels are required. |
No |
|
List long-term memories |
Specify Scope by level. |
Yes |
|
List Scope values ( |
Specify Scope by level. |
Yes |
|
Query extraction tasks ( |
Specify Scope by level. |
Yes |
|
Query request audits |
Specify Scope by level. |
Yes |
Wildcards must follow the Scope hierarchy. After you use * at a level, all subsequent levels must also use * or be left empty. For example, app-001/user-001/*/* is valid, but app-001/*/agent-001/* is not.
File memory and file view limits
|
Item |
Limit or behavior |
|
Scope |
All four levels, |
|
File path |
The canonical path must start with |
|
File content |
Valid UTF-8 text only |
|
File size |
Up to 100 KiB (102,400 bytes) per file |
|
Current files in a Scope |
Up to 2,000 files by default |
|
File list pagination |
|
|
Concurrent writes |
|
|
Historical version redaction |
Irreversible. Redaction clears only the selected historical versions and does not modify the current file. |
|
File views |
Read-only. Maintain memories by using structured interfaces such as the SDK or CLI. |
If the file content, path, or file count exceeds the corresponding limit, the service returns PAYLOAD_TOO_LARGE, VALIDATION_ERROR, or QUOTA_EXCEEDED, respectively. If a concurrent write digest does not match, the service returns SHA_MISMATCH. Read the latest file before you decide whether to retry.
Memory write limits
|
Item |
Limit |
|
|
Up to 20 |
|
Total |
Up to 32,000 bytes in UTF-8 |
|
|
Up to 32,000 bytes in UTF-8 |
|
|
Up to 256 characters |
|
|
Up to 16 |
|
|
Up to 64 characters |
|
|
Up to 1,024 characters |
Provide at least one of messages or text. The wildcard * is not allowed in the Scope when you add memories.
Asynchronous write visibility
AddMemories.sync defaults to false, which enables asynchronous writes. Asynchronous writes become visible as follows:
-
Raw messages are written first and can be queried immediately as short-term memories.
-
Long-term memory extraction runs in the background.
-
After long-term memory extraction and index refresh are complete, the memories can be retrieved by calling
SearchMemories.
To view extraction results immediately after a write in a test, set sync to true. A brief index refresh delay can still occur before long-term memories become searchable after a synchronous write completes. You can also call GetMemoryTask and pass the requestId returned by AddMemories to query the asynchronous extraction task status and the IDs of the extracted memory units.
Search defaults
|
Parameter |
Default |
Description |
|
|
|
Maximum number of results to return. The default is 10 and the maximum is 50. Relevance filtering or semantic deduplication can result in fewer than topK results. |
|
|
|
Specifies whether to enable reranking. |
|
|
|
Specifies whether to include short-term source evidence in the |
|
|
|
Relevance threshold in the range |
When you search long-term memories, appId and tenantId are required. You can use the wildcard * for agentId and runId.
Short-term memory queries
ListMemoryStoreMessages queries raw session messages. All four Scope levels, appId, tenantId, agentId, and runId, are required. Wildcards are not supported.
Use this API to:
-
View raw session messages.
-
Replay a specific session.
-
Troubleshoot long-term memory extraction.
Memory consolidation (Dream) limits
Memory consolidation (Dream) is an asynchronous task that further refines and merges stored memories, and extracts skills and profiles. The related APIs are CreateMemoryDreamTask, GetMemoryDreamTask, ListMemoryDreamTasks, ListMemoryDreamActions, ApplyMemoryDreamActions, and CancelMemoryDreamTask.
CreateMemoryDreamTask limits
|
Item |
Limit |
|
|
Required. Up to 20. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Up to 4,000 bytes in UTF-8 |
|
|
Up to 100 per request |
Enum values
|
Field |
Values |
|
|
|
|
|
|
|
|
|
|
|
|
|
Task status (task |
|
|
Action type ( |
|
|
Action status (action |
|
When applyMode=proposal, the task generates actions in the proposed state. Call ApplyMemoryDreamActions to explicitly apply the actions. When safe_auto is used, the service automatically applies safe actions that meet the confidence thresholds. EMIT_SKILL and EMIT_PROFILE actions are written directly by the Dream task and do not require manual application.
Asynchronous tasks and list pagination
|
API |
Default limit |
Maximum limit |
|
|
50 |
100 |
|
|
100 |
100 |
|
|
50 |
100 |
|
|
100 |
100 |
Extraction task status values for ListMemoryTasks.status or task.status returned by GetMemoryTask are queued / running / completed / failed / needs_reconcile.
GetMemoryTask and ListMemoryTasks depend on the task index. After the first write, the service requires some time to build the task index. During this period, these APIs may return 409 CONFLICT with the message ingest task index is still building, please retry shortly. Retry later.
CLI, SDKs, and plugins
CLI pagination
Memory-related CLI list commands return only one page of results and do not automatically retrieve subsequent pages. To retrieve the next page, use the nextToken from the response.
Example:
tablestore-agent-cli memory list-units \
--store agent_memory \
--app-id app-001 \
--next-token <token>
Automatic Tablestore instance creation
If ots_endpoint and ots_instance_name are not configured, the CLI automatically creates and reuses a managed Tablestore instance in the China (Beijing) or China (Hangzhou) region when you run the doctor command or perform an operation. Instance creation requires some time, and the result is written to the local configuration file.
If you later manually configure an instance endpoint and name, the CLI uses the explicitly configured instance.
SDK and CLI versions
|
SDK or tool |
Version requirement |
|
Python SDK |
|
|
Node.js SDK |
|
|
Agent Storage SDK for Python |
|
|
Agent Storage SDK for TypeScript |
|
|
Agent Storage SDK for Go |
|
|
CLI |
|
Agent plugin notes
The Hermes and OpenClaw plugins search across agents and sessions in the current tenant by default, using agentId=* and runId=*. If your business does not allow memories to be shared across agents or sessions, use the SDK to control the search Scope or modify the plugin configuration.
Rolling upgrade and rollback limits
The following three switches are disabled by default and operate independently:
-
memory_unit_v2_write_enabled=false: The service does not generate or accept V2 write fields. -
memory_unit_v2_projection_enabled=false: The service retains the legacy byte format for file projections. -
search_session_affinity_mode=off: The service retains the legacy single-lane search behavior and response fields.
Use a server-first rollout. First, upgrade all replicas to a version that can read V2 columns and recognize contextScope and the new response fields, while keeping the switches disabled. After all legacy replicas are removed, clients can start sending contextScope. Then, change the mode to shadow and then on. Legacy servers strictly reject unknown fields. If clients send contextScope before all replicas are upgraded, the mixed-version cluster returns an HTTP 400 error.
Do not enable V2 writes or V2 file projections in a mixed-version cluster. After any V2 row is written, do not roll back directly to a legacy parser or writer that does not recognize V2 columns. A legacy whole-row write can overwrite or discard new fields. To roll back application behavior, return to a compatible version that can read V2 data with all new switches disabled, instead of returning to a pre-V2 binary.