curl -sS -X POST "$BMA_BASE_URL/v1/memory_stores" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{}'{
"id": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"description": "<string>",
"metadata": {},
"name": "<string>",
"type": "memory_store",
"updated_at": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Create a Memory Store
curl -sS -X POST "$BMA_BASE_URL/v1/memory_stores" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{}'{
"id": "<string>",
"archived_at": "<string>",
"created_at": "<string>",
"description": "<string>",
"metadata": {},
"name": "<string>",
"type": "memory_store",
"updated_at": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}主體
The name of the memory store, 1 to 255 characters long, without control characters. Names don't have to be unique in a workspace.
In a session, the store's directory under /mnt/memory/ is based on this name. The name is lowercased and every run of characters other than ASCII letters and digits becomes one hyphen. The session's memory store resource gives the exact path in mount_path.
See the memory guide to learn more about how agents access memory stores.
回應
Success.
A memory_store: a named container for agent memories, scoped to a workspace. Attach a store to a session via resources[] to mount it as a directory the agent can read and write.
When the memory store was archived, in RFC 3339, or null if it hasn't been.
Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
See the memory guide to learn more about archiving.