Get Event

Updated at:

Query the execution status and results of async add-memory events

Queries an event generated by Add Memory Async to retrieve its execution status and extraction result.

Method and endpoint

GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory/events/{event_id}

Replace {WorkspaceId} with your actual workspace ID.

Request parameters

ParameterTypeRequiredLocationDescription
event_idstringYesPathEvent ID

Response

FieldTypeDescription
request_idstringRequest ID
eventsarrayEvents
events[].created_atintegerCreation time
events[].event_idstringEvent ID
events[].event_typestringEvent type
events[].memory_library_idstringMemory library ID
events[].resource_idstringResource ID
events[].resource_typestringResource type: observation, skill, user_profile, custom_observation, or custom_skill
events[].statusstringEvent status: PENDING, RUNNING, SUCCEEDED, FAILED, or UNRECORDED
events[].updated_atintegerUpdate time
events[].user_idstringSub-user ID
events[].resultarrayExecution result. The extraction result is returned after the task succeeds
events[].result[].memory_typestringMemory type: observation, skill, or user_profile
events[].result[].contentstringNew content for ADD or UPDATE, and previous content for DELETE
events[].result[].namestringUser profile attribute name. Returned only for applicable profile results
events[].result[].eventstringOperation type: ADD, UPDATE, or DELETE
events[].result[].memory_node_idstringMemory node ID for observation or skill results. Not returned for user_profile results
events[].result[].old_contentstringPrevious content. Returned only when event is UPDATE

Request example

curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory/events/07c054c438584f279ff7db7c3243fa51' \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

{
  "request_id": "bb499327-79c6-9a65-9f2d-c0c6abda6419",
  "events": [
    {
      "created_at": 1784602119,
      "event_id": "07c054c438584f279ff7db7c3243fa51",
      "event_type": "ADD_ASYNC",
      "memory_library_id": "memory_library_001",
      "resource_id": "project_001",
      "resource_type": "observation",
      "status": "SUCCEEDED",
      "updated_at": 1784602150,
      "user_id": "user_001",
      "result": [
        {
          "memory_type": "observation",
          "content": "The user wants to visit Africa",
          "event": "DELETE",
          "memory_node_id": "3127d7445a57442d9f700d534b1b14e3"
        }
      ]
    }
  ]
}

ImportantIf status is PENDING or RUNNING, the task is still running. Query the event again later.