---
title: "Memory Architecture for AI Agents: Integrating Twilio Conversations and Amazon Bedrock"
description: "Building a reliable AI agent for customer service requires a memory architecture that separates data by what it is about and where it comes from. The post proposes four tiers: customer memory in Twilio Conversation Memory for persistent profiles and preferences across channels, short-term and episodic memory in AWS AgentCore for call context and learned problem-solving, organizational context from systems of record accessed via real-time tool calls, and organizational rules from knowledge bases. Twilio’s memory layer normalizes identifiers across voice, SMS, and chat, and stores observations, summaries, and developer-defined traits. AgentCore’s short-term memory tracks the immediate conversation, while episodic memory records how the agent solved past problems per customer. This separation prevents stale copies of data like flight status, and protects against lock-in by keeping customer memory at the communication layer, agnostic to the agent runtime."
---

# Memory Architecture for AI Agents: Integrating Twilio Conversations and Amazon Bedrock

[Twilio](https://yomu.fyi/company/twilio) · Safdar Jaffari · Nov 18, 2026

**Type:** Explainer

## Summary

Building a reliable AI agent for customer service requires a memory architecture that separates data by what it is about and where it comes from. The post proposes four tiers: customer memory in Twilio Conversation Memory for persistent profiles and preferences across channels, short-term and episodic memory in AWS AgentCore for call context and learned problem-solving, organizational context from systems of record accessed via real-time tool calls, and organizational rules from knowledge bases. Twilio’s memory layer normalizes identifiers across voice, SMS, and chat, and stores observations, summaries, and developer-defined traits. AgentCore’s short-term memory tracks the immediate conversation, while episodic memory records how the agent solved past problems per customer. This separation prevents stale copies of data like flight status, and protects against lock-in by keeping customer memory at the communication layer, agnostic to the agent runtime.

## Context

Building an AI agent that handles a flight disruption (e.g., Owl Air Flight 103 cancellation) requires integrating context from multiple sources: the customer’s persistent profile, the current call history, real-time business data, and static policies. The post addresses how to compartmentalize these data types across Twilio Conversations and Amazon Bedrock AgentCore to avoid stale or conflicting copies.

## Approach / What changed

A four-tier memory architecture that separates customer memory (Twilio Conversation Memory), short-term and episodic memory (AWS AgentCore), organizational context (systems of record accessed via tool calls), and organizational rules (knowledge bases).

## Takeaways

- Customer memory (Twilio Conversation Memory) stores persistent profile data such as preferences, observations, and traits, and is agnostic to the AI agent runtime, enabling sharing across AI and human agents.
- To avoid stale data, never copy business records (e.g., flight status) into memory; instead, access them via real-time tool calls to systems of record.
- When integrating Twilio and AgentCore, put traits and Recall results in the system prompt and save only customer/agent utterances and tool results as events to prevent a feedback loop.

## FAQ

### How do Twilio Conversation Memory and AWS AgentCore memory differ?

Customer memory (Twilio Conversation Memory) stores persistent profile data such as preferences, observations, summaries, and traits. It is agnostic to the AI agent runtime, so a preference gathered by an AI agent is available to a human agent later. Short-term memory (AWS AgentCore) tracks the immediate conversation turns and tool results for the current call.

### How do I prevent conflicting customer profiles between Twilio and AgentCore?

To avoid a split-brain scenario, send events for short-term memory, enable only the episodic strategy, and leave user preference, semantic, and summary strategies off. Put traits and Recall results in the system prompt, and save only what the customer and agent actually said, plus tool results, as events.

### When should I use a real-time tool call instead of storing data in memory?

If an out-of-date answer misleads the customer about money or logistics (e.g., flight times, refunds), it must be a real-time tool call. Data that changes frequently belongs in the backend. A loyalty tier can safely live in Customer Memory for speed if synced from the system of record.

**Tags:** [AI Agents](https://yomu.fyi/topic/ai-agents), [Amazon Bedrock](https://yomu.fyi/topic/amazon-bedrock), [Customer Experience](https://yomu.fyi/topic/customer-experience), [Memory Architecture](https://yomu.fyi/topic/memory-architecture), [Twilio](https://yomu.fyi/topic/twilio)

- Source: [Twilio](https://www.twilio.com/en-us/blog/developers/tutorials/integrations/memory-architecture-ai-agents-conversations-amazon-bedrock)
- Source URL: https://www.twilio.com/en-us/blog/developers/tutorials/integrations/memory-architecture-ai-agents-conversations-amazon-bedrock
- Ingested by Yomu: 2026-11-19T06:01:14.124Z

[Read original post](https://www.twilio.com/en-us/blog/developers/tutorials/integrations/memory-architecture-ai-agents-conversations-amazon-bedrock)
