View a markdown version of this page

Get an event - Amazon Bedrock AgentCore
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Get an event

The GetEvent API retrieves a specific raw event by its identifier from short-term memory in AgentCore Memory. This API requires you to specify the memoryId , actorId , sessionId , and eventId as path parameters in the request URL.

import boto3 data_client = boto3.client('bedrock-agentcore') response = data_client.get_event( memoryId="your-memory-id", actorId="your-actor-id", sessionId="your-session-id", eventId="your-event-id" ) event = response['event'] print(f"Event ID: {event['eventId']}") print(f"Timestamp: {event['eventTimestamp']}") print(f"Payload: {event['payload']}")