Skip to main content

events

Creates, updates, deletes, gets or lists an events resource.

Overview

Nameevents
TypeResource
Idaws.bedrock_agentcore.events

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
actor_idstringThe identifier of the actor associated with the event. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-/]*(?::[a-zA-Z0-9-/]+)[a-zA-Z0-9-_/]</code>)
branchobjectContains information about a branch in an AgentCore Memory resource. Branches allow for organizing events into different conversation threads or paths.
event_idstringThe unique identifier of the event. (pattern: <code>[0-9]+#[a-fA-F0-9]+</code>)
event_timestampstring (date-time)The timestamp when the event occurred.
memory_idstringThe identifier of the AgentCore Memory resource containing the event. (pattern: <code>(arn:(aws|aws-cn|aws-us-gov):bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:memory/)?[a-zA-Z][a-zA-Z0-9-_]{0,99}-[a-zA-Z0-9]{10}</code>)
metadataobjectMetadata associated with an event.
payloadarrayThe content payload of the event.
session_idstringThe identifier of the session containing the event. (pattern: <code>[a-zA-Z0-9][a-zA-Z0-9-_]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_eventselectmemory_id, session_id, actor_id, event_id, regionRetrieves information about a specific event in an AgentCore Memory resource. To use this operation, you must have the bedrock-agentcore:GetEvent permission.
list_eventsselectmemory_id, session_id, actor_id, regionLists 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.
create_eventinsertmemory_id, region, actorId, eventTimestamp, payloadCreates an event in an AgentCore Memory resource. Events represent interactions or activities that occur within a session and are associated with specific actors. To use this operation, you must have the bedrock-agentcore:CreateEvent permission. This operation is subject to request rate limiting.
delete_eventdeletememory_id, session_id, event_id, actor_id, regionDeletes an event from an AgentCore Memory resource. When you delete an event, it is permanently removed. To use this operation, you must have the bedrock-agentcore:DeleteEvent permission.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
actor_idstringThe identifier of the actor associated with the event to delete.
event_idstringThe identifier of the event to delete.
memory_idstringThe identifier of the AgentCore Memory resource from which to delete the event.
regionstringAWS region (default: us-east-1)
session_idstringThe identifier of the session containing the event to delete.

SELECT examples

Retrieves information about a specific event in an AgentCore Memory resource. To use this operation, you must have the bedrock-agentcore:GetEvent permission.

SELECT
actor_id,
branch,
event_id,
event_timestamp,
memory_id,
metadata,
payload,
session_id
FROM aws.bedrock_agentcore.events
WHERE memory_id = '{{ memory_id }}' -- required
AND session_id = '{{ session_id }}' -- required
AND actor_id = '{{ actor_id }}' -- required
AND event_id = '{{ event_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an event in an AgentCore Memory resource. Events represent interactions or activities that occur within a session and are associated with specific actors. To use this operation, you must have the bedrock-agentcore:CreateEvent permission. This operation is subject to request rate limiting.

INSERT INTO aws.bedrock_agentcore.events (
actorId,
sessionId,
eventTimestamp,
payload,
branch,
clientToken,
metadata,
extractionMode,
extractionConfig,
memory_id,
region
)
SELECT
'{{ actorId }}' /* required */,
'{{ sessionId }}',
'{{ eventTimestamp }}' /* required */,
'{{ payload }}' /* required */,
'{{ branch }}',
'{{ clientToken }}',
'{{ metadata }}',
'{{ extractionMode }}',
'{{ extractionConfig }}',
'{{ memory_id }}',
'{{ region }}'
RETURNING
event
;

DELETE examples

Deletes an event from an AgentCore Memory resource. When you delete an event, it is permanently removed. To use this operation, you must have the bedrock-agentcore:DeleteEvent permission.

DELETE FROM aws.bedrock_agentcore.events
WHERE memory_id = '{{ memory_id }}' --required
AND session_id = '{{ session_id }}' --required
AND event_id = '{{ event_id }}' --required
AND actor_id = '{{ actor_id }}' --required
AND region = '{{ region }}' --required
;