Amazon Bedrock AgentCore

2026/08/28 - Amazon Bedrock AgentCore - 1 new api methods

Changes  AgentCore Memory now supports direct ingestion into long-term memory via IngestData API

IngestData (new) Link ΒΆ

Submits content directly for ingestion to generate long-term memory records in a AgentCore Memory resource.

To use this operation, you must have the bedrock-agentcore:IngestData permission.

See also: AWS API Documentation

Request Syntax

client.ingest_data(
    memoryId='string',
    source={
        'inline': {
            'payload': [
                {
                    'conversational': {
                        'content': {
                            'text': 'string'
                        },
                        'role': 'ASSISTANT'|'USER'|'TOOL'|'OTHER'
                    },
                    'json': {
                        'content': {...}|[...]|123|123.4|'string'|True|None
                    }
                },
            ]
        }
    },
    contentTimestamp=datetime(2015, 1, 1),
    actorId='string',
    sessionId='string',
    extractionConfig={
        'namespaceVariables': {
            'string': 'string'
        }
    },
    metadata={
        'string': {
            'stringValue': 'string'
        }
    },
    clientToken='string'
)
type memoryId:

string

param memoryId:

[REQUIRED]

The identifier of the AgentCore Memory resource to ingest content into.

type source:

dict

param source:

[REQUIRED]

The content to ingest. Only inline content is supported.

  • inline (dict) --

    The content included directly in the request.

    • payload (list) -- [REQUIRED]

      The list of content payload items to ingest.

      • (dict) --

        A single content payload item to ingest. A payload item contains either conversational or JSON content.

        • conversational (dict) --

          The conversational content for this payload item.

          • content (dict) -- [REQUIRED]

            The content of the conversation message.

            • text (string) --

              The text content of the memory item.

          • role (string) -- [REQUIRED]

            The role of the participant in the conversation (for example, "user" or "assistant").

        • json (dict) --

          The JSON content for this payload item.

          • content (:ref:`document<document>`) -- [REQUIRED]

            The JSON content of the payload. Accepts any JSON value, including objects, arrays, strings, numbers, booleans, and null. The maximum size is 100 KB.

type contentTimestamp:

datetime

param contentTimestamp:

[REQUIRED]

The timestamp of when the content occurred.

type actorId:

string

param actorId:

[REQUIRED]

The identifier of the actor associated with this content. An actor represents an entity that participates in sessions and generates content.

type sessionId:

string

param sessionId:

The identifier of the session that the content belongs to. If not provided, a session identifier is generated and returned in the response.

type extractionConfig:

dict

param extractionConfig:

The extraction configuration for long-term memory records. Use this parameter to specify namespace variable keys and their values for namespace substitution during extraction.

  • namespaceVariables (dict) --

    A map of namespaceKeys to their values. The service substitutes these values into namespaceTemplates during long-term memory extraction to control namespace hierarchy.

    • (string) --

      The name of the namespace variable key. The name cannot be a built-in variable name ( actorId, sessionId, or memoryStrategyId).

      • (string) --

        The value of a namespace variable key.

type metadata:

dict

param metadata:

The key-value metadata to attach to the content.

  • (string) --

    • (dict) --

      Value associated with the eventMetadata key.

      • stringValue (string) --

        Value associated with the eventMetadata key.

type clientToken:

string

param clientToken:

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.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'sessionId': 'string'
}

Response Structure

  • (dict) --

    • sessionId (string) --

      The identifier of the session that the service ingested the content into. This value echoes the session identifier from the request, or the identifier that the service generated when you did not provide one.