Evalgent
Back to Blog
Voice AI Evaluation

How to Test Memory and Context in Voice Agents

Deepesh Jayal
12 min read
How to Test Memory and Context in Voice Agents

# How to Test Memory and Context in Voice Agents

Quick answer

To test memory and context in voice agents, probe three scopes: within a turn, across a long call, and across separate sessions. Check that the agent honors corrections, holds state after tool calls and interruptions, recalls a returning caller's profile, and forgets stale or sensitive data on cue. Score recall, not vibes.

Most teams test whether a voice agent understands a sentence. Far fewer test whether it remembers the last five. The phrase people search for — test memory and context voice agents — actually covers three different jobs, and each one fails in its own way. A misheard word is obvious on the call. A forgotten correction is silent until the wrong order ships.

> Voice agent memory: the agent's ability to retain and reuse information — earlier turns, a stated correction, a caller profile — during a call and across calls. It spans short-term working memory inside one conversation and durable storage that persists between sessions.

This post is scoped to memory. It broadens beyond within-call context retention into memory that survives long calls and separate sessions. For the within-call slice — earlier turns, references, and corrections inside a single conversation — the deeper treatment lives in our context retention guide. Here we widen the lens and cover what the agent should remember, what it should forget, and how you prove it.

Why memory is a separate test from context retention

Context retention and memory overlap, but they are not the same test. Context retention asks whether the agent tracks the current conversation. Memory asks a bigger question. It also covers what the agent carries between conversations.

The distinction matters for coverage. A test suite built only around within-call context will pass an agent that forgets a caller the moment they hang up. That agent looks fine in a demo. It fails a returning customer on day two.

The two also fail differently. Within-call failures show up as confusion in the same call. Cross-session failures show up as a cold or wrong greeting on the next call. You need cases for both, and you need to label which scope each case targets.

There is a third reason to separate them. Memory has a cost and a risk that pure context tracking does not. Storing caller data between calls raises retention and privacy questions. Testing memory means testing when the agent should forget, not only when it should recall.

The three scopes of memory to test

Think of memory as three nested scopes. Each has a different mechanism and a different failure. Testing all three is how you cover the full surface.

Turn scope: the immediate context

Turn scope is the working memory inside a few exchanges. The caller says a name, then refers to "that appointment" two turns later. The agent has to link the pronoun to the thing. This is coreference resolution, and it is where many agents quietly break.

This scope lives inside the model's context window — the tokens it can see at once. If the prompt and history fit, the reference resolves. If earlier turns get trimmed, the link is lost. Turn scope is fast, cheap, and the most common thing teams already test.

Call scope: holding state across a long conversation

Call scope asks whether the agent holds state) late in a long call. Early in a call the caller gives an account number. Fifteen turns later the agent needs it again. Between those points the caller interrupted, the agent ran a lookup, and the topic changed twice.

Long calls stress the context window. As history grows, older facts get summarized or dropped. The agent that nailed the fact at turn three can lose it by turn twenty. Call scope is where tool calls and interruptions do their damage, which we cover below.

Session scope: remembering across separate calls

Session scope is durable, cross-call memory. A session) is one bounded interaction. Session scope is what persists after it ends. This is closer to long-term memory — a store the agent reads from on the next call.

Here the agent recalls a returning caller, their stored preferences, and prior tickets. The mechanism is usually a database plus retrieval, not the context window. So the failure modes shift. The agent can retrieve the wrong record, stale data, or another caller's data entirely.

What breaks in each scope

Each scope maps to a specific thing to test and a specific failure that test catches. Use this as the backbone of a memory suite. Write cases until every row has coverage.

Memory scopeWhat to testFailure it catches
Turn (within a few exchanges)References, pronouns, a just-stated correctionAgent loses the thread; resolves "it" to the wrong thing
Call (across one long call)State held late; recall after a tool call or interruptionAgent drops a fact given early; asks again for known data
Session (across separate calls)Returning-caller recall, stored preferences, prior ticketsCold or wrong greeting; wrong or stale record retrieved
Cross-caller isolationOne caller's data never appears for anotherMemory leak; agent recalls someone else's details
ForgettingStale or sensitive data is dropped on cueAgent retains data it should have discarded

The last two rows are easy to skip and expensive to miss. Cross-caller isolation is a privacy failure. Forgetting is a compliance failure. Both need their own cases.

Common memory failure modes

Memory bugs are rarely loud. They hide behind a call that otherwise sounds smooth. These are the patterns worth targeting directly.

Forgetting a correction

The caller says a date, the agent read it back wrong, the caller corrects it, and the agent proceeds with the original. This is the single highest-value memory test. A correction is an explicit instruction to overwrite a stored value. If the agent honors the first value over the second, the booking is wrong and the call sounded fine.

Test it by stating a value, correcting it once, then asking the agent to act. The correct behavior is to use the corrected value every time. Score the outcome, not the apology.

Losing context after a tool call or interruption

An agent that pauses to run a lookup or check a calendar can come back and forget what the call was about. The same happens after a barge-in. The caller cuts in, the turn structure breaks, and the agent resets to a default. The line between handling the interruption and preserving the topic is exactly where agents fail, a boundary our interruption versus context guide draws in detail.

Test it by planting a fact, forcing a tool call or an interruption, then asking for the fact. The agent should resume where it left off with the fact intact.

Leaking or misremembering cross-session data

Session memory adds a retrieval step, and retrieval can go wrong. The agent might greet a returning caller by the wrong name, quote a closed ticket as open, or surface a preference the caller never set. In the worst case, it recalls a different caller's data. This is a lookup problem, not a language problem, and it is where memory becomes an information retrieval task.

Test it with a caller who has history. Verify the agent retrieves the right record, the current version of it, and nothing that belongs to anyone else.

How to test memory and context in voice agents

Run this as a repeatable suite, not a one-off. Each step targets a scope from the table above and produces a pass or fail you can track over time.

1. Map the scopes your agent claims. List whether it tracks turns, holds call state, and persists across sessions. Test only what it claims, and flag anything it silently persists.

2. Write turn-scope cases. Script references, pronouns, and a mid-turn correction. Confirm the agent resolves each reference and honors the corrected value.

3. Write call-scope cases. Plant a fact early, then stretch the call with topic changes, a tool call, and an interruption. Ask for the fact late and confirm it survived.

4. Write session-scope cases. Give a test caller history — a profile, a preference, a prior ticket. Start a fresh call and confirm the agent recalls the right, current record.

5. Add cross-caller isolation cases. Run two callers with overlapping details. Confirm neither ever sees the other's data.

6. Add forgetting cases. Store data that should expire or stay sensitive. Confirm the agent drops it when policy says to, and never reads it back.

7. Score against expected memory, not tone. Grade each case on whether the exact value was recalled or forgotten. A warm, wrong answer is still a fail.

8. Re-run on every change. Prompt edits, model swaps, and retrieval changes all move memory behavior. Make the suite part of every release.

Evaluate on the transcript and the audio together. A transcript shows what the agent recalled; the audio shows whether it hesitated or guessed. Our take on why both layers matter lives in the transcript versus audio evaluation post. Memory testing sits inside the broader discipline covered in our AI voice agent testing guide.

When a voice agent should forget

Recall is only half the test. The other half is deletion. A memory that never forgets becomes a liability the first time a caller asks what you still hold on them.

Forgetting has three triggers worth testing. The first is staleness. A saved preference from a year ago may no longer apply, and acting on it can be worse than having no memory at all. The second is sensitivity. Some details should never persist past the call that needed them. The third is a caller's explicit request to delete their data, a right formalized in regulation and summarized in the concept of the right to be forgotten.

Test forgetting the way you test recall. Store the data, trigger the condition, then probe whether the agent still has it. The pass condition is that the data is gone and cannot be surfaced. This is where memory testing overlaps with a compliance audit, and it is a reason to keep the two suites close.

Who should judge what a voice agent remembers

Memory is easy to grade generously when you built the agent. You know what it should recall, so you hear success where a stranger would hear a guess. That is why memory belongs in an independent evaluation rather than a self-graded demo.

An independent evaluator writes the caller histories, controls the corrections, and scores recall against a fixed expected answer. It also catches the memory a vendor would rather not surface — the data quietly persisted, the record retrieved from the wrong caller. The case for a neutral judge is laid out in our independent voice AI evaluation explainer, and the wider scoring framework in the voice agent evaluation pillar.

The most credible memory tests use your own callers and your own scenarios, not a generic script. Building that from your real traffic is covered in benchmarking voice agents on your own data. Evalgent runs this kind of memory evaluation as an independent, third-party audit, so the recall numbers you report are ones a buyer can trust.

Frequently asked questions

How do you test memory in a voice agent?

Test memory across three scopes. Check turn scope with references and corrections, call scope by planting a fact and recalling it late, and session scope by giving a caller history and starting a fresh call. Add cases for cross-caller isolation and for forgetting. Score each on exact recall, not tone.

How do you test context retention in a voice agent?

Context retention is the within-call slice of memory. Script a conversation where later turns depend on earlier ones — a pronoun, a reference, a stated preference. Confirm the agent links each back correctly. Then stress it with a long call, a tool call, and an interruption to see whether state survives late in the conversation.

How do you test cross-session memory in a voice agent?

Create a test caller with a stored profile, a preference, and a prior ticket. End the call, then start a new one. Confirm the agent retrieves the right record, its current version, and nothing belonging to another caller. Cross-session memory is a retrieval test, so its failures are wrong, stale, or leaked records.

Does a voice agent remember a returning caller?

Only if it has session-scope memory backed by durable storage. Turn and call memory vanish when the call ends. A returning caller is recalled through a lookup against a database, keyed on identity. Test that the lookup finds the correct record and never returns another caller's data. If the agent has no store, it cannot remember anyone.

How do you test if a voice agent forgets a correction?

State a value, let the agent read it back wrong, correct it once, then ask the agent to act on it. The correct behavior is to use the corrected value every time afterward. If it reverts to the original, it failed. A forgotten correction is silent on the call and only shows up in the wrong outcome.

How do you test what a voice agent remembers between calls?

Seed a test caller's record with known facts before the call. Start a new session and ask questions that require those facts. Compare what the agent recalls against the seeded record. Anything extra it surfaces is a leak; anything missing is a recall gap; anything outdated is a staleness failure. Grade against the fixed record.

Should a voice agent remember data between calls?

Sometimes. Cross-session memory improves a returning caller's experience, but it adds retention and privacy risk. Persist only what the use case needs, for only as long as it needs it, and give callers a way to have it deleted. Test both sides: that useful data is recalled and that sensitive or stale data is forgotten on cue.

How do you test a voice agent after a tool call?

Plant a fact before the tool call, trigger the lookup or action, then ask for the fact once the agent resumes. The agent should return to the conversation with the earlier context intact. Many agents reset to a default state after a tool call or interruption, so this case catches a common and costly memory failure.

The bottom line

Memory testing covers three scopes: the turn, the whole call, and separate sessions. Test recall in each, add cross-caller isolation and forgetting, and score against a fixed expected answer rather than how the call sounded.

Ready to see what your agent actually remembers — and what it should forget? Book a demo and we will run an independent memory evaluation on your own scenarios.

Related Articles