Skip to content

Lists events in an AgentCore Memory resource based on specified criteria

Description

Lists events in an AgentCore Memory resource based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.

To use this operation, you must have the bedrock-agentcore:ListEvents permission.

Usage

bedrockagentcore_list_events(memoryId, sessionId, actorId,
  includePayloads, filter, maxResults, nextToken)

Arguments

  • memoryId

    [required] The identifier of the AgentCore Memory resource for which to list events.

  • sessionId

    [required] The identifier of the session for which to list events.

  • actorId

    [required] The identifier of the actor for which to list events.

  • includePayloads

    Specifies whether to include event payloads in the response. Set to true to include payloads, or false to exclude them.

  • filter

    Filter criteria to apply when listing events.

  • maxResults

    The maximum number of results to return in a single call. The default value is 20.

  • nextToken

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Value

A list with the following syntax:

list(
  events = list(
    list(
      memoryId = "string",
      actorId = "string",
      sessionId = "string",
      eventId = "string",
      eventTimestamp = as.POSIXct(
        "2015-01-01"
      ),
      payload = list(
        list(
          conversational = list(
            content = list(
              text = "string"
            ),
            role = "ASSISTANT"|"USER"|"TOOL"|"OTHER"
          ),
          blob = list(),
          json = list(
            content = list()
          )
        )
      ),
      branch = list(
        rootEventId = "string",
        name = "string"
      ),
      metadata = list(
        list(
          stringValue = "string"
        )
      )
    )
  ),
  nextToken = "string"
)

Request syntax

svc$list_events(
  memoryId = "string",
  sessionId = "string",
  actorId = "string",
  includePayloads = TRUE|FALSE,
  filter = list(
    branch = list(
      name = "string",
      includeParentBranches = TRUE|FALSE
    ),
    eventMetadata = list(
      list(
        left = list(
          metadataKey = "string"
        ),
        operator = "EQUALS_TO"|"EXISTS"|"NOT_EXISTS",
        right = list(
          metadataValue = list(
            stringValue = "string"
          )
        )
      )
    )
  ),
  maxResults = 123,
  nextToken = "string"
)