AWS Bedrock AgentCore Memory: how to give AI agents long-term memory in Kiro CLI
AWS showed how to give AI agents long-term memory in Kiro CLI. For this, it built a custom MCP server that integrates with Amazon Bedrock AgentCore Memory. Agen

AWS has introduced a way to integrate long-term memory into AI agents that work in the terminal. This is done through Amazon Bedrock AgentCore Memory and a custom MCP server in Kiro CLI — a useful addition for developers who actively use agents in their projects.
Problem: agents lose context
AI agents often work without memory between sessions. A user writes a question — the agent responds, but if you start a new conversation, the agent doesn't remember previous interactions. This becomes a problem in long-term projects where continuity and knowledge accumulation are needed. It's particularly problematic in terminal tools, where a developer might work with a single agent for hours. Each time, you have to re-explain the context and provide the same information again. This reduces efficiency and is frustrating. Amazon Bedrock AgentCore Memory solves this problem by providing a managed service for saving and retrieving interaction history.
What is Kiro CLI
Kiro CLI is a terminal tool designed for quick interaction with Kiro AI agents directly from the command line. It's intended for developers who work extensively in the terminal and don't want to switch to a web interface every time. Kiro CLI allows you to send tasks to agents, receive answers, and manage their parameters directly from bash or zsh. AWS showed how to connect memory management to Kiro CLI through the Model Context Protocol (MCP) — a standard for connecting tools and services to AI models. MCP allows you to extend agent capabilities without changing their core.
How MCP integration works
A custom MCP server acts as a mediator between Kiro CLI and Bedrock AgentCore Memory. When a developer sends a command to the terminal, the server automatically loads relevant context from history, the agent receives complete information, and can provide an accurate answer. Here's what the MCP server does under the hood:
- Saves context and history of each conversation in Bedrock AgentCore Memory
- Retrieves relevant information from past conversations before a new request
- Tracks memory usage and current storage quotas
- Manages agent configuration and their memory parameters
- Provides encryption and security when storing data in the cloud
This process is fully automatic and transparent to the developer — they don't need to manually load context or worry about how to save history.
Practical examples
Imagine: a developer uses an agent to analyze their project's code for several days in a row. Without memory, they would have to load complete project information into the prompt every single day. With AgentCore Memory, the agent remembers the project architecture, bugs found, and decisions made. This makes interaction much more efficient. Another example: an agent helps write documentation. If it remembers which terms have already been explained, what tone is needed in the document, and what target audience it addresses — the quality improves.
What this means
AWS is taking agent memory management upon itself, providing a ready-made, scalable service. Developers don't need to write their own database for interaction history or think about how to preserve context between sessions. This is another step toward making AI agents more practical, cheaper to maintain, and easier to use on real projects.