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.

Endpoint

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

Replace {WorkspaceId} with your actual workspace ID.

Path parameters

event_idstringRequired

Event ID

Location: Path

Response fields

request_idstring

Request ID

eventsarray

Events

events[].created_atinteger

Creation time

events[].event_idstring

Event ID

events[].event_typestring

Event type

events[].memory_library_idstring

Memory library ID

events[].resource_idstring

Resource ID

events[].resource_typestring

Resource type: observation, skill, user_profile, custom_observation, or custom_skill

events[].statusstring

Event status: PENDING, RUNNING, SUCCEEDED, FAILED, or UNRECORDED

events[].updated_atinteger

Update time

events[].user_idstring

Sub-user ID

events[].resultarray

Execution result. The extraction result is returned after the task succeeds

events[].result[].memory_typestring

Memory type: observation, skill, or user_profile

events[].result[].contentstring

New content for ADD or UPDATE, and previous content for DELETE

events[].result[].namestring

User profile attribute name. Returned only for applicable profile results

events[].result[].eventstring

Operation type: ADD, UPDATE, or DELETE

events[].result[].memory_node_idstring

Memory node ID for observation or skill results. Not returned for user_profile results

events[].result[].old_contentstring

Previous 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.