Skip to content

CreateEventInput

Source code in docs_src/capo_opensearchmemory/types/create_event_input.py
class CreateEventInput(TypedDict, closed=True):
    space_id: "capo_opensearchmemory.types.space_id.SpaceId"
    """<p>The ID of the space that owns the event, for example <code>sp-02864597b164</code>.</p>"""
    actor_id: "capo_opensearchmemory.types.actor_id.ActorId"
    """<p>The ID of the actor (end user or agent) that the event belongs to.</p>"""
    session_id: NotRequired["capo_opensearchmemory.types.session_id.SessionId"]
    """<p>The session the event belongs to. Send every event of one conversation with the same session ID, so that <code>SUMMARY</code> strategies summarize the conversation as one session. If you omit it, the service generates a session ID and returns it.</p>"""
    event_timestamp: NotRequired[
        "capo_opensearchmemory.types.event_timestamp.EventTimestamp"
    ]
    """<p>When the event occurred. The default is the time that the service receives the request.</p>"""
    payload: "capo_opensearchmemory.types.event_payload.EventPayload"
    """<p>The event content. Set exactly one union member.</p>"""
    metadata: NotRequired["capo_opensearchmemory.types.metadata_map.MetadataMap"]
    """<p>Metadata tags to store with the event. Memories derived from the event carry the same tags. Keys that begin with <code>x-amz-</code>, the keys <code>documentS3Source</code> and <code>documentS3Url</code>, and other keys that the service uses internally are reserved: a request that sets one fails with <code>ValidationException</code>, and the message names the key.</p> <p>A space can use at most 50 distinct metadata keys across all of its events and memories. A request that would add a key beyond that fails with <code>ValidationException</code>. Reuse an existing key instead.</p>"""
    client_token: NotRequired["capo_opensearchmemory.types.client_token.ClientToken"]
    """<p>A unique, case-sensitive identifier that makes the request idempotent. Within 2 hours of the first request, a retry with the same token and the same request, including the same <code>sessionId</code>, returns the same event. If you omit <code>sessionId</code>, the service generates a new one on each attempt, so a retry fails with <code>ConflictException</code>. Reusing the token with different request content also fails with <code>ConflictException</code>. <code>eventTimestamp</code> isn't compared. After 2 hours, the token starts a new event.</p>"""
    infer: NotRequired["bool"]
    """<p>Specifies whether to extract memories from this event. The default is <code>true</code>. Set it to <code>false</code> to store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns for <code>SearchEvents</code>. A document submitted as a <code>blob</code> is still extracted.</p>"""

actor_id instance-attribute

actor_id: ActorId

The ID of the actor (end user or agent) that the event belongs to.

client_token instance-attribute

client_token: NotRequired[ClientToken]

A unique, case-sensitive identifier that makes the request idempotent. Within 2 hours of the first request, a retry with the same token and the same request, including the same sessionId, returns the same event. If you omit sessionId, the service generates a new one on each attempt, so a retry fails with ConflictException. Reusing the token with different request content also fails with ConflictException. eventTimestamp isn't compared. After 2 hours, the token starts a new event.

event_timestamp instance-attribute

event_timestamp: NotRequired[EventTimestamp]

When the event occurred. The default is the time that the service receives the request.

infer instance-attribute

infer: NotRequired[bool]

Specifies whether to extract memories from this event. The default is true. Set it to false to store the event without extraction: the service skips strategies that infer memories, and still indexes the event's turns for SearchEvents. A document submitted as a blob is still extracted.

metadata instance-attribute

metadata: NotRequired[MetadataMap]

Metadata tags to store with the event. Memories derived from the event carry the same tags. Keys that begin with x-amz-, the keys documentS3Source and documentS3Url, and other keys that the service uses internally are reserved: a request that sets one fails with ValidationException, and the message names the key.

A space can use at most 50 distinct metadata keys across all of its events and memories. A request that would add a key beyond that fails with ValidationException. Reuse an existing key instead.

payload instance-attribute

payload: EventPayload

The event content. Set exactly one union member.

session_id instance-attribute

session_id: NotRequired[SessionId]

The session the event belongs to. Send every event of one conversation with the same session ID, so that SUMMARY strategies summarize the conversation as one session. If you omit it, the service generates a session ID and returns it.

space_id instance-attribute

space_id: SpaceId

The ID of the space that owns the event, for example sp-02864597b164.