Skip to content

ingest_data

Operation

ingest_data

ingest_data(request: IngestDataInput | IngestDataInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[IngestDataInputDict]) -> IngestDataOutput

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.

Parameters:

Name Type Description Default
request IngestDataInput | IngestDataInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[IngestDataInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
IngestDataOutput

An instance of IngestDataOutput.

ingest_data async

ingest_data(request: IngestDataInput | IngestDataInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[IngestDataInputDict]) -> IngestDataOutput

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.

Parameters:

Name Type Description Default
request IngestDataInput | IngestDataInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
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
**kwargs Unpack[IngestDataInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
IngestDataOutput

An instance of IngestDataOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

IngestDataInputDict

Bases: TypedDict

Dictionary form of IngestDataInput.

Attributes

actor_id instance-attribute
actor_id: Required[str]

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

client_token instance-attribute
client_token: str | 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.

This field is autopopulated if not provided.

content_timestamp instance-attribute
content_timestamp: Required[datetime]

The timestamp of when the content occurred.

extraction_config instance-attribute
extraction_config: ExtractionConfig | ExtractionConfigDict | None

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

memory_id instance-attribute
memory_id: Required[str]

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

metadata instance-attribute

The key-value metadata to attach to the content.

session_id instance-attribute
session_id: str | None

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

source instance-attribute

The content to ingest. Only inline content is supported.

IngestDataInput dataclass

Bases: _SerdeShape

Dataclass for IngestDataInput structure.

Attributes

actor_id class-attribute instance-attribute
actor_id: str | None = ...

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

client_token class-attribute instance-attribute
client_token: str | 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.

This field is autopopulated if not provided.

content_timestamp class-attribute instance-attribute
content_timestamp: datetime | None = ...

The timestamp of when the content occurred.

extraction_config class-attribute instance-attribute
extraction_config: ExtractionConfig | None = ...

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

memory_id class-attribute instance-attribute
memory_id: str | None = ...

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

metadata class-attribute instance-attribute
metadata: dict[str, MetadataValue] | None = ...

The key-value metadata to attach to the content.

session_id class-attribute instance-attribute
session_id: str | None = ...

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

source class-attribute instance-attribute
source: ContentSource | None = ...

The content to ingest. Only inline content is supported.

Output

IngestDataOutput dataclass

Bases: _SerdeShape

Dataclass for IngestDataOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

session_id instance-attribute
session_id: str

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.