Multichannel AI Agent: Shared Memory Across Messaging Platforms
In the world of AI-powered chatbots, a common challenge is maintaining context and continuity across different messaging platforms. Users often experience frustration when switching between WhatsApp and Instagram, only to find that the chatbot has no memory of their previous interactions. To address this, we built a multichannel AI agent that leverages Amazon Bedrock AgentCore, unified identity, and DynamoDB message buffering to ensure seamless communication across platforms.
Introduction
Imagine sending a video on WhatsApp and later asking about it on Instagram. The chatbot should recognize your request, understand the context, and provide a relevant response. However, most existing chatbots treat each channel as a separate entity, lacking shared memory and continuity. Our solution, a multichannel AI agent, bridges this gap by maintaining a unified memory across platforms.
The agent processes voice notes, images, and videos on WhatsApp and responds on Instagram with full contextual awareness. It uses Amazon Transcribe for voice note transcription, TwelveLabs for video analysis, and Claude Vision for image description. All interactions are stored in Amazon Bedrock AgentCore Memory, ensuring that the agent retains information regardless of the channel used.
Architecture Overview
The multichannel AI agent is built using the following components:
- Amazon Bedrock AgentCore: A unified framework for building AI agents that support multiple channels and shared memory.
- Unified Identity: A shared
actor_idacross platforms to identify users consistently. - DynamoDB Message Buffering: A database for storing and retrieving messages across channels.
- AWS CDK and Lambda: For infrastructure provisioning and serverless execution.
The deployment process takes approximately 15 minutes per stack, assuming familiarity with AWS CDK, AWS Lambda, and the WhatsApp/Instagram API concepts.
How the Multichannel AI Agent Works
Processing Voice Notes on WhatsApp
When a user sends a voice note on WhatsApp, the agent automatically transcribes it using Amazon Transcribe. The transcription is stored in memory, allowing the agent to reference it in future conversations. For example:
- User sends a voice note with the phrase "Meet me at the park at 3 PM."
- Agent transcribes the note and stores the text "Meet me at the park at 3 PM."
- User later asks on Instagram, "What time should I meet you?"
- Agent retrieves the transcription and responds, "You suggested meeting at 3 PM."

Analyzing Videos on WhatsApp
For video content, the agent uploads the video to TwelveLabs for visual and audio analysis. It then stores a reference ID in memory, enabling follow-up questions about the same video. For example:
- User sends a video of a sunset.
- Agent analyzes the video using TwelveLabs and stores the ID
vid_1234. - User asks on Instagram, "What was in the video I sent earlier?"
- Agent retrieves the analysis and responds, "The video showed a beautiful sunset."
Analyzing Images on WhatsApp
When a user sends an image, the agent uses Claude Vision to describe the visual content and stores the description in long-term memory. This allows the agent to recall details even after days. For example:
- User sends an image of a cat.
- Agent describes the image as "A black cat sitting on a windowsill."
- User asks on Instagram after a few days, "What was the image I sent?"
- Agent recalls the description and responds, "You sent a photo of a black cat on a windowsill."

Cross-Channel Memory with Shared actor_id
The core of the multichannel AI agent is the shared actor_id in Amazon Bedrock AgentCore Memory. This ID is consistent across WhatsApp and Instagram, allowing the agent to recognize users and retain their context. For example:
- User starts a conversation on WhatsApp, mentioning their preference for coffee.
- User switches to Instagram and asks, "What do you know about me?"
- Agent retrieves the preference stored under the shared
actor_idand responds, "You mentioned that you like coffee."
Expert Insights
Benefits of Shared Memory
- Improved User Experience: Users appreciate consistent interactions across platforms.
- Efficient Context Handling: The agent avoids redundant information, leading to more natural conversations.
- Scalability: The architecture supports adding more platforms and features seamlessly.
Challenges and Solutions
- Data Consistency: Ensuring the
actor_idis correctly managed across platforms. - Performance: Optimizing memory usage to handle large volumes of data.
- Security: Protecting user data with AWS Identity and Access Management (IAM) and encryption.
Future Outlook
The multichannel AI agent is poised to revolutionize customer interactions by bridging the gap between messaging platforms. As more users adopt multiple channels, the need for context-aware agents will grow. With advancements in NLP and cloud technologies, we can expect even more sophisticated agents in the future.
Conclusion
The multichannel AI agent with shared memory represents a significant leap forward in how chatbots interact with users. By leveraging Amazon Bedrock AgentCore, unified identity, and DynamoDB, we ensure that users experience a seamless, context-aware experience across WhatsApp and Instagram. As the demand for multi-channel communication grows, this approach will become increasingly essential for businesses and developers alike.
By addressing the challenge of shared memory, we've created a foundation for more engaging and efficient AI interactions. As technology evolves, we can expect even more sophisticated agents that understand and respond to users' needs with unparalleled precision.
Related Reading
AWS Lambda PII Handling in Production: DynamoDB Field Encryption with KMS
<p>Handling Personally Identifiable Information (or PII for short) in AWS Lambda-backed systems is not difficult because AWS lacks security primitives. It is difficult because the default patterns in backend development encourage storing sensitive da
What Predicts a Hit? I Trained 3 ML Models to Find Out
<p>In many entertainment adaptation decisions, content selections are still instinct-driven. Maybe a producer was vibing with a story or overheard their Gen Alpha nephew mentioning a GOAT title. This subjective approach has often led to expensive mis
I Love Detailed Releases. I Hate Doing Them.
<h2> So I Made an AI Do It For Me. </h2> <p>You know what's fun? Shipping code.</p> <p>You know what's not fun? The 47-step release ceremony afterwards where you squint at a diff, pretend you remember what you changed three days ago, write