{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-event-input-schema.json",
  "title": "CreateEventInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-events-api-openapi.yml#/components/schemas/CreateEventInput",
  "type": "object",
  "properties": {
    "memoryId": {
      "type": "string",
      "description": "The identifier of the AgentCore Memory resource in which to create the event."
    },
    "actorId": {
      "type": "string",
      "description": "The identifier of the actor associated with this event. An actor represents an entity that participates in sessions and generates events."
    },
    "sessionId": {
      "type": "string",
      "description": "The identifier of the session in which this event occurs. A session represents a sequence of related events."
    },
    "eventTimestamp": {
      "type": "string",
      "description": "The timestamp when the event occurred. If not specified, the current time is used."
    },
    "payload": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PayloadType"
      },
      "description": "The content payload of the event. This can include conversational data, JSON data, or binary content."
    },
    "branch": {
      "$ref": "#/$defs/Branch"
    },
    "clientToken": {
      "type": "string",
      "description": "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": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/MetadataValue"
      },
      "description": "The key-value metadata to attach to the event."
    },
    "extractionMode": {
      "type": "string",
      "enum": [
        "SKIP"
      ],
      "description": "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."
    },
    "extractionConfig": {
      "$ref": "#/$defs/ExtractionConfig"
    }
  },
  "required": [
    "memoryId",
    "actorId",
    "eventTimestamp",
    "payload"
  ],
  "$defs": {
    "Branch": {
      "type": "object",
      "properties": {
        "rootEventId": {
          "type": "string",
          "description": "The identifier of the root event for this branch."
        },
        "name": {
          "type": "string",
          "description": "The name of the branch."
        }
      },
      "required": [
        "name"
      ]
    },
    "Content": {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "The text content of the memory item."
        }
      },
      "description": "Exactly one member is set."
    },
    "Conversational": {
      "type": "object",
      "properties": {
        "content": {
          "$ref": "#/$defs/Content"
        },
        "role": {
          "type": "string",
          "enum": [
            "ASSISTANT",
            "USER",
            "TOOL",
            "OTHER"
          ],
          "description": "The role of the participant in the conversation (for example, \"user\" or \"assistant\")."
        }
      },
      "required": [
        "content",
        "role"
      ]
    },
    "ExtractionConfig": {
      "type": "object",
      "properties": {
        "namespaceVariables": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A map of namespaceKeys to their values. The service substitutes these values into namespaceTemplates during long-term memory extraction to control namespace hierarchy."
        }
      }
    },
    "MemoryJsonData": {
      "type": "object",
      "properties": {
        "content": {
          "type": "object",
          "description": "The JSON content of the payload. Accepts any JSON value, including objects, arrays, strings, numbers, booleans, and null. The maximum size is 100 KB."
        }
      },
      "required": [
        "content"
      ]
    },
    "MetadataValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "Value associated with the eventMetadata key."
        }
      },
      "description": "Exactly one member is set."
    },
    "PayloadType": {
      "type": "object",
      "properties": {
        "conversational": {
          "$ref": "#/$defs/Conversational"
        },
        "blob": {
          "type": "object",
          "description": "The binary content of the payload."
        },
        "json": {
          "$ref": "#/$defs/MemoryJsonData"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}