New: Boardroom MCP Engine!

Ready to put this into action?

Get the complete AI Integration PlaybookPractical AI implementation guide — prompt engineering, workflow automation, and ROI frameworks.

AI Agent Memory: Keep Useful Context Without Preserving Mistakes

You told an assistant that a customer wanted Tuesday delivery. A week later, the customer changes the request to Thursday. What should the assistant remember?

Updated

On this page

Both events may matter for understanding the conversation. Only the current authorized delivery instruction should guide the next action.

That difference is the heart of useful agent memory. Saving more text is easy. Keeping the right information, with the right authority and a clear history, takes design.

Start with the different kinds of information

“Memory” can describe several mechanisms that should have different owners and rules.

InformationPurposeExampleMain control
Conversation contextContinue the current exchange.The user’s last question.Relevant scope and context limits.
Working stateResume a task accurately.Two of three quotations inspected.Persistent state and explicit status.
Reference knowledgeSupply maintained facts and guidance.Current returns policy.Source version, access, and effective date.
PreferencesAdapt work to a person’s stated wishes.Use a short weekly summary.User ownership and correction.
Authoritative recordsEstablish business facts.Accepted order and payment status.The responsible business system.
ProceduresReuse approved ways of working.Steps for reviewing a quotation.Versioning, testing, and change control.

Labels such as episodic, semantic, and procedural memory can be useful research vocabulary. They are analogies for events, knowledge, and procedures. They do not establish that software remembers like a person.

Keep task state separate from a story about the task

A summary saying “the customer was refunded” is not a refund receipt. A conversation saying “ready to send” is not a recorded approval. Store consequential status in explicit fields backed by the system that performed the action.

For a quotation comparison, working state might record which documents were inspected, their revisions, extracted fields, conflicts, and the draft location. If the process restarts, it should resume from those records instead of guessing from an old generated summary.

LangGraph distinguishes thread-scoped state checkpoints from application-defined stores that can be used across threads. Its documentation also notes that in-memory checkpoints disappear when the process restarts. Choose persistence according to the recovery you need. Persistence documentation.

Retrieval helps find information; it does not certify it

Retrieval-augmented generation supplies external material to a generation process. The original RAG paper evaluates a particular retrieval and generation architecture on knowledge-intensive tasks. It does not establish a universal percentage reduction in incorrect answers. RAG research.

An embedding represents information numerically so a system can search for similar material. Similarity is useful when people use different words for related ideas. It is not the same as correctness, authority, or permission.

A passage about “shipping next week” may be semantically close to a current delivery question while referring to another order. An old policy may match the query perfectly but no longer apply.

Use exact record lookup when the task requires an exact record. Use keyword, semantic, or combined search when finding relevant passages is the problem. Apply access controls before material is made available to the model. Ask for source locations so reviewers can check the answer.

Give each stored item enough context to be useful

A practical memory record needs an identifier, subject, content, source, creation time, relevant effective period, access scope, and review status. Include a superseded-by or correction relationship when information changes.

Not every field applies to every item. A casual formatting preference may need a simple owner and update date. An operating policy needs a maintained source and version. A financial transaction belongs in its authoritative ledger, with memory holding a reference rather than an independent substitute.

In the delivery example, preserve Tuesday as the earlier request and record Thursday as the later instruction. Before changing an actual order, confirm that the new request is authorized and applies to the right order. Recency alone does not settle authority.

Treat summaries and reflections as derived material

A summary can reduce reading effort and context size. It can also omit a qualification, combine separate events, or turn a tentative idea into a firm decision.

Preserve links from summaries to their sources. Mark generated interpretations as interpretations. Do not promote a reflection such as “this customer dislikes phone calls” into a lasting preference based only on one missed call.

The Generative Agents paper explored memory, reflection, and planning in a simulated town containing 25 agents. Its evaluation concerned believable behavior in that setting. It is useful architectural background, not evidence that a business memory system improves revenue or reliably preserves every fact. Generative Agents.

Forgetting needs a purpose

Different actions often get called “forgetting”: leaving material out of the current context, reducing its retrieval priority, expiring a preference, deleting a record, or removing it from a model through a separate training-related process. These are not equivalent.

Set retention and correction rules for each store. Identify copies in indexes, summaries, caches, logs, exports, and backups. A deletion request or an access revocation needs a defined process for the relevant systems; deleting one vector does not demonstrate that every copy disappeared.

Choose retention periods from business requirements and applicable obligations. A universal rule such as “delete all raw history after seven days” could remove useful evidence while leaving its inaccurate summary behind.

Prune unnecessary context to improve relevance, but measure the effect. Larger stores do not automatically cause slower searches in a fixed proportion, and aggressive pruning can make a system less useful.

Using new information is different from training

A system can behave differently because its prompt, retrieved documents, procedures, or stored preferences changed. The underlying model may remain unchanged.

ExpeL studies extracting insights from experience and recalling them without requiring model parameter updates. That mechanism is different from fine-tuning. Use its actual title and scope when discussing experiential learning. ExpeL: LLM Agents Are Experiential Learners.

For a business workflow, treat proposed new rules as changes to review. A repeated mistake may indicate a bad source, ambiguous task, or tool defect rather than a need for model training. Keep the evidence, test the correction, and version the accepted change.

Test memory with changes, not just recall questions

Ask whether the system can find a fact, then test what happens when that fact changes. Include two customers with similar names, superseded policies, revoked access, conflicting dates, and a preference the user withdraws.

Test restarting a task, reopening a conversation, and correcting a summary. Verify that the system preserves unknowns instead of filling them with plausible details. For shared memory, test whether one user can retrieve another user’s private content through an indirect query.

Measure task accuracy, source correctness, unnecessary questions, review effort, and the cost of maintaining the store. Longer answers alone are not evidence of better memory. Fewer questions can be harmful if the system stopped asking necessary clarifications.

Begin with one maintained collection and a small set of explicit state fields. Add complexity when a demonstrated need justifies it. Continue with agent orchestration, evaluation, or the business memory chapter.

Get the AI Dispatch

Weekly insights on ai & technology — delivered to your inbox. No spam, unsubscribe any time.

Want to choose specific topics? Customize your interests