Skip to content

BedrockAgentCoreClient.create_event

rboto-bedrock-agentcore==0.4.0 · Service index · Types

Model summary (excerpt): 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.

Install and imports

python -m pip install "rboto[bedrock-agentcore]==0.4.0"
from rboto import BedrockAgentCoreClient
from collections.abc import Sequence
from rboto_bedrock_agentcore.types import (
    Branch,
    CreateEventOutput,
    ExtractionConfig,
    ExtractionMode,
    MetadataValue,
    PayloadType,
)

Signature

async def create_event(
    *,
    memory_id: str,
    actor_id: str,
    event_timestamp: str,
    payload: Sequence[PayloadType],
    session_id: str | None = None,
    branch: Branch | None = None,
    client_token: str | None = None,
    metadata: dict[str, MetadataValue] | None = None,
    extraction_mode: ExtractionMode | None = None,
    extraction_config: ExtractionConfig | None = None,
) -> CreateEventOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
memory_id Yes The identifier of the AgentCore Memory resource in which to create the event.
actor_id Yes The identifier of the actor associated with this event. An actor represents an entity that participates in sessions and generates events.
event_timestamp Yes The timestamp when the event occurred. If not specified, the current time is used.
payload Yes The content payload of the event. This can include conversational data, JSON data, or binary content.
session_id No The identifier of the session in which this event occurs. A session represents a sequence of related events.
branch No The branch information for this event. Branches allow for organizing events into different conversation threads or paths.
client_token No 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.
metadata No The key-value metadata to attach to the event.
extraction_mode No 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.
extraction_config No The extraction configuration for long-term memory records. Use this parameter to specify namespace variable keys and their values for namespace substitution during extraction.

Output

CreateEventOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
event EventOutput | None Always present EventOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

Branch, CreateEventOutput, ExtractionConfig, ExtractionMode, MetadataValue, PayloadType

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock_agentcore.exceptions:

AccessDeniedError, InvalidInputError, ResourceNotFoundError, RetryableConflictError, ServiceError, ServiceQuotaExceededError, ThrottledError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model