Skip to content
nexional.
ES
Back to the journal
AI & Automation6 min read

AI agents with memory: useful context and secure access in the enterprise

Learn how memory and context retrieval can make enterprise AI assistants more useful while respecting data access permissions for every user.

A glowing sphere connects to folders through a gate with a lock, while another folder remains isolated.

The problem: searching documents is not enough to remember

An employee asks her internal assistant about a company policy and, after receiving an answer, follows up: “Which one applies to me?” In this hypothetical situation, she expects the assistant to understand the follow-up based on their conversation without having to repeat the entire question.

But maintaining continuity can require more than remembering the last exchange. The employee may have mentioned her role or location weeks earlier, in a conversation about something else. Those details could help guide the search, even though they are not part of the document repository. According to AWS, people expect answers to take information they have already shared into account and draw on documents they are authorized to consult.

The tension arises when multiple people use the same assistant. Context that is useful for one person must not become visible to another. The same applies to documents: an answer tailored to an individual should not include content they are not authorized to access. That is why conversational continuity and permissions must be addressed together, for both memories and documentary sources.

What has changed: memory becomes part of retrieval

Searching documents and retrieving memories are complementary tasks, but they are not the same. A knowledge base provides documentary information to support an answer; memory can provide relevant details about the user or the context of an earlier conversation. For example, a follow-up question may depend on something said in the previous turn, while a policy question may require information shared in a different conversation.

AWS describes an optional integration between Amazon Bedrock Managed Knowledge Base and Amazon Bedrock AgentCore memory. When enabled, memory becomes a retrieval source alongside the knowledge base. According to AWS, the service restores the conversation, and its planner decides when a detail about the user might help. If it considers that detail relevant, it retrieves it from long-term memory and uses it to formulate subqueries to the knowledge base. After generating the answer, it saves the exchange to memory.

This design illustrates one specific way to combine memories and documents in a single request. It does not mean that all agents have this capability or that this integration is necessary to build every assistant with memory.

How it works: identity, memory, and authorized documents

In the integration described by AWS, the process begins when the person authenticates. The application validates their identity and includes it in the request, using it both to identify their memory and to provide user context for filtering documents through access control lists.

From there, the service retrieves the session history and can search long-term memory for relevant details. With that context, it queries the knowledge base and returns an answer supported by documents the user is permitted to read, with citations. After generating the answer, it saves the question and answer in the session.

Memory isolation and document access control are separate responsibilities. In a shared application, correctly identifying each person’s memory does not replace checking their document permissions, or vice versa. In the AWS example, the application remains responsible for authenticating the user and passing along their identity.

Nexional’s design recommendation: review what information is retained in memory, how it is updated, and how to verify that each user can access only authorized memories and documents.

What the sources show about integration and scale

The sources present two related but distinct problems. In the memory example, AWS describes a solution that incorporates information from previous conversations into retrieval and filters documents according to the user’s permissions. The excerpt provided explains its capabilities but does not offer measurements of improvements in accuracy, productivity, or savings.

In the second example, an Amazon team built an MCP server as a common gateway between agents and their enterprise data lake. According to the team, the lake contains thousands of datasets, and under the previous approach, onboarding a table could require several days of engineering work in that environment.

The starting problem was not just volume: each agent had its own integration logic, and access controls were fragmented. To address the cost of integration, the team describes a metadata-driven model: to onboard a dataset, a file is added and the server discovers it during the next synchronization. Permission enforcement is centralized on the server.

These details describe a specific environment and do not provide a basis for extrapolating timelines to other companies. Nor do they imply that the MCP server has the memory capabilities described in the first source.

Hypothetical case: an internal assistant for employees

Imagine a company that wants to answer questions about internal procedures that apply across different offices. This is a hypothetical case: the proposed decisions and tests are not measured results.

An employee tells the assistant that she works in a particular office. Later, she asks: “Which procedure applies to me?” The assistant would retrieve her location to guide the search, without treating that memory as sufficient evidence of the procedure. The answer should rely only on documents the employee is authorized to consult and include references to the passages used. If it cannot find enough authorized documentation, it should say so rather than fill in the answer with assumptions.

To validate the design, the company could use two profiles with different permissions and check that each receives only authorized information, with no access to the other person’s memories. A follow-up question would help verify whether the assistant uses the relevant context. Another test would be to change a person’s location and check that the old memory does not determine the answer once it is no longer valid.

The implementation should also provide for permission reviews and mechanisms to correct or delete memories. If there is uncertainty about whether a location is current, the assistant could ask for confirmation before using it in the search.

Conclusion: remembering better also means knowing the limits

Nexional’s analysis: memory, document retrieval, and identity address different needs. Memory provides context from previous conversations; retrieval makes it possible to consult relevant documents; and identity helps determine what information each person can access. Coordinating them requires deciding not only what the assistant can use, but also when and for whom.

In our view, a useful enterprise assistant should not aim to remember everything. It should retrieve the context relevant to each question and do so within clear access boundaries. A detail that was relevant in an earlier conversation may no longer be relevant; likewise, having a document does not mean having permission to show it to every user.

Evaluation should consider these differences together: whether answers are useful and supported by appropriate information, whether memory remains current, and whether permissions are respected both when access is granted and when it is denied. It is also important to plan how stored context can be reviewed or corrected.

For Nexional, remembering better means selecting and setting limits, not accumulating information indiscriminately. Start with a narrowly defined use case and evaluate those three dimensions before expanding it.

Sources

One idea leads to another.

All stories