For the complete documentation index, see llms.txt.
Skip to main content
Version: 8.11 (unreleased)

Amazon Bedrock AgentCore Long-Term Memory connector

Use the Amazon Bedrock AgentCore Long-Term Memory connector to retrieve persistent knowledge, such as facts, preferences, and summaries, from AWS Bedrock AgentCore Long-Term Memory in your BPMN process.

About this connector​

The Amazon Bedrock AgentCore Long-Term Memory connector is an outbound connector that reads memory records from an AgentCore Memory resource. It can search for records with a natural language query, or list all records in a namespace.

Prerequisites​

To use the Amazon Bedrock AgentCore Long-Term Memory connector, you need the following:

  • An AWS account with an access key and secret key, a configured default credentials chain (hybrid/Self-Managed only), or a saved AWS credential.
  • An AgentCore Memory resource created in your AWS account.
  • IAM permissions to execute the RetrieveMemoryRecords and ListMemoryRecords actions.

Learn more about Amazon Bedrock AgentCore Long-Term Memory in the official documentation.

note

Use secrets to store credentials and avoid exposing sensitive information from the process. See managing secrets.

Use this connector​

New to using an outbound connector? Learn how to add and use this type of connector, apply element templates, use connector secrets, handle results and errors, and more.

Configuration​

Authentication​

PropertyTypeRequiredDescriptionExample
AWS credentialConfigurationNoSelect a saved AWS credential with an optional default region, or enter the authentication details and a region in the fields below. Learn more about credentials.
AuthenticationDropdownYes, if no AWS credential is set

The AWS authentication strategy:

  • Credentials (SaaS/Self-Managed): Use this option if you have a valid pair of access and secret keys provided by your AWS account administrator.

  • Default Credentials Chain (hybrid/Self-Managed only): Use this option if your system is configured for implicit authentication, such as role-based authentication, credentials supplied through environment variables, or files on the target host. This approach uses the Default Credential Provider Chain to resolve the required credentials.

Access keyStringYes, if Authentication is CredentialsThe access key of an IAM user with permissions to read memory records.
Secret keyStringYes, if Authentication is CredentialsThe secret key of the IAM user with the access key above.

Memory​

PropertyTypeRequiredDescriptionExample
Memory IDStringYesThe identifier of the AgentCore Memory resource you want to query.
NamespaceStringYesA namespace prefix to scope memory records. AWS requires it to organize and isolate memory records.customer/12345

Region​

PropertyTypeRequiredDescriptionExample
RegionStringYes, if no AWS credential is setThe AWS region where your AgentCore Memory resource is deployed.us-east-1
RegionStringYes, if the credential has no default regionOverrides the default region of the selected AWS credential. Shown when an AWS credential is selected.

Operations​

Select the operation in the Operation dropdown. Retrieve Memory Records is selected by default. The properties that apply depend on the operation.

Retrieve memory records​

Perform a semantic search to find relevant memory records based on a natural language query.

Input parameters​

PropertyTypeRequiredDescriptionExample
Search queryStringYesSemantic search query to find relevant memory records (up to 10,000 characters).
Memory strategy IDStringNoLimits the search to memories created by a specific extraction strategy.
Max resultsNumberNoMaximum number of results to return (1–100). Defaults to 10.10
Pagination tokenStringNoPagination token from a previous response to fetch the next page.

Output​

The operation returns the response structure described below.

List memory records​

List all memory records within the configured namespace.

Input parameters​

PropertyTypeRequiredDescriptionExample
Memory strategy IDStringNoFilter memory records by a specific extraction strategy.
Max resultsNumberNoMaximum number of results to return (1–100). Defaults to 20.20
Pagination tokenStringNoPagination token from a previous response to fetch the next page.

Output​

The operation returns the response structure described below.

Response​

Both operations use the following response structure:

FieldDescription
recordsA list of memory record entries. Each entry contains the fields described below.
resultCountThe number of records returned.
nextTokenA token for retrieving additional results in subsequent requests. null if no more results.

Each record in the records list contains:

FieldDescription
memoryRecordIdUnique identifier for the memory record.
contentThe text content of the memory record.
memoryStrategyIdThe extraction strategy that created this record.
namespacesList of namespaces associated with the record.
createdAtTimestamp when the record was created.
scoreRelevance score (only present for retrieve operations).
metadataKey-value metadata associated with the record.

The connector returns only records that have text content, and resultCount counts only these records. In metadata, the connector includes only entries with string values.

To continue reading, pass the nextToken value of a response into the Pagination token field of the next call.

Use the Result variable to store the response in a process variable, or the Result expression to map specific fields into process variables. For example, to extract the content from all records:

= {
memories: records.content,
count: resultCount
}

Example response​

The following is an example of the connector response:

{
"records": [
{
"memoryRecordId": "mem-abc123",
"content": "Customer prefers email communication over phone calls.",
"memoryStrategyId": "preference-extraction",
"namespaces": ["customer/12345"],
"createdAt": "2024-01-15T10:30:00Z",
"score": 0.95,
"metadata": {
"source": "support-ticket",
"confidence": "high"
}
},
{
"memoryRecordId": "mem-def456",
"content": "Customer is located in the Pacific timezone.",
"memoryStrategyId": "fact-extraction",
"namespaces": ["customer/12345"],
"createdAt": "2024-01-10T14:20:00Z",
"score": 0.87,
"metadata": {
"source": "profile-update"
}
}
],
"resultCount": 2,
"nextToken": null
}

Troubleshooting​

To learn about general error handling in Camunda, see BPMN errors and failing jobs.

AGENTCORE_MEMORY_FAILED​

The connector throws an error with the code AGENTCORE_MEMORY_FAILED when AgentCore Memory returns an error. The error message contains the details from AWS.