2026/08/28 - Amazon Bedrock AgentCore - 1 new api methods
Changes AgentCore Memory now supports direct ingestion into long-term memory via IngestData API
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'
)
string
[REQUIRED]
The identifier of the AgentCore Memory resource to ingest content into.
dict
[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.
datetime
[REQUIRED]
The timestamp of when the content occurred.
string
[REQUIRED]
The identifier of the actor associated with this content. An actor represents an entity that participates in sessions and generates content.
string
The identifier of the session that the content belongs to. If not provided, a session identifier is generated and returned in the response.
dict
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.
dict
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.
string
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.
dict
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.