Remember per-customer chat history with Amazon Bedrock AgentCore
Go to WorkflowDescription
Quick Overview
This workflow uses the n8n chat trigger and Amazon Bedrock AgentCore to run a support assistant that keeps long-term, per-customer memory across separate chat sessions, then formats the agent response into a safe plain-text reply.
How it works
Receives each incoming message from the n8n chat interface as a separate execution.
Sets the agent name, resolves a customer identifier (defaulting to the chat session ID), and passes through the user’s message.
Sends the message to Amazon Bedrock AgentCore with managed memory enabled, scoping long-term memory by actor ID (customer) and continuity by session ID.
Parses and normalizes the AgentCore response (including optionally fenced JSON) and returns a plain-text output for the chat.
Setup
Create and select an Amazon Bedrock AgentCore API credential (AWS access key, secret, region, and execution role ARN).
Update the customer identifier mapping so customerId matches your real user ID (or keep the default chat session ID for testing).
Optionally customize the AgentCore system prompt and agent name to match your support policy and tone.