create_event¶
Operation¶
create_event
async
¶
create_event(input: CreateEventInput, plugins: list[Plugin] | None = None) -> CreateEventOutput
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateEventInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateEventOutput
|
An instance of |
Input¶
CreateEventInput
dataclass
¶
Dataclass for CreateEventInput structure.
Attributes¶
actor_id
class-attribute
instance-attribute
¶
actor_id: str | None = None
The identifier of the actor associated with this event. An actor represents an entity that participates in sessions and generates events.
branch
class-attribute
instance-attribute
¶
branch: Branch | None = None
The branch information for this event. Branches allow for organizing events into different conversation threads or paths.
client_token
class-attribute
instance-attribute
¶
client_token: str | None = None
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, AgentCore ignores the request, but does not return an error.
event_timestamp
class-attribute
instance-attribute
¶
event_timestamp: datetime | None = None
The timestamp when the event occurred. If not specified, the current time is used.
extraction_mode
class-attribute
instance-attribute
¶
extraction_mode: ExtractionMode | None = None
Controls long-term memory extraction for this event. When set to SKIP,
the event is stored in short-term memory but is excluded from long-term
memory extraction. If not specified, the event is processed for
extraction as usual.
memory_id
class-attribute
instance-attribute
¶
memory_id: str | None = None
The identifier of the AgentCore Memory resource in which to create the event.
metadata
class-attribute
instance-attribute
¶
metadata: dict[str, MetadataValue] | None = None
The key-value metadata to attach to the event.
payload
class-attribute
instance-attribute
¶
payload: list[PayloadType] | None = None
The content payload of the event. This can include conversational data or binary content.
session_id
class-attribute
instance-attribute
¶
session_id: str | None = None
The identifier of the session in which this event occurs. A session represents a sequence of related events.