How to test AI agent memory: scenarios and quality criteria
Test memory against known data rather than judging it only by a model’s answer.
Agent memory is part of a system that should be tested against known data. A fluent response does not establish that the assistant retrieved the correct project. A test set should include successful cases, failures and situations where the desired record does not exist. You do not need production data or real credentials.
A minimal scenario set
| Scenario | Expected outcome |
|---|---|
| Known entry | Correct record content and version |
| Missing entry | Clear report that no result was found |
| Update | Current content or an identified pending-index state |
| Duplicate write | One intended record, with the actual outcome reported |
| Other project | No disclosure of unauthorized data |
| Version conflict | No blind overwrite |
Prepare a test fixture
Create two fictional projects. In one, save a decision about a website and form; in the other, a separate decision about a report. Grant your test connection the appropriate permissions and compare actual tool responses with expectations. Updating the second project should not affect the first decision. Use dedicated test accounts and roles when evaluating access controls.
What to measure
- Accuracy: how many known records were retrieved as expected.
- Freshness: how often a response reflected the current version.
- Denials: whether unauthorized reads and writes were rejected.
- Resilience: whether retries and conflicts avoided unwanted state changes.
Define criteria before running a test. Do not hide failed cases in an average, especially failures concerning access control. Evaluate semantic retrieval independently from keyword search; fallback is a different execution path. Record the app version, configuration and client type so the test is repeatable.
Retrieve the specified test project. Report each call, actual outcome and discrepancy from expectations. Do not modify other projects or production data.LocalMemory provides MCP/API retrieval and writes, roles, version controls and assisted-capture modes. Test both the integration’s behavior and the model’s choices. A correct API does not guarantee that an assistant will always choose the right tool.
Sources and further reading
Source material used to prepare this article. Feature availability in external services may change.