Memory for voice agents
Remember the caller. Check the day before booking.
Callers think aloud, change their minds, and refer to old conversations. ContextDB preserves that context, then evaluates the evidence again before the host books, refunds, reschedules, or updates an account.
recall for conversation → recall_for_action before the tool
Retell AI memory guide LiveKit Agents memory guide Pipecat voice agent memory guide PyAI voice agent memory guide
Booking evidence
“Maybe Friday” should not overwrite “Thursday is confirmed.”
Ordinary recall can keep a call coherent. Action recall applies a
stricter policy to source, confidence, and confirmation before
book_visit reaches the scheduling system.
book_visit(day="Friday") # Heard now: recall("visit day") "Friday might be easier, maybe." source=user_stated confidence=0.40 confirmation=required # Confirmed history: recall_for_action("book visit") "Yes, Thursday afternoon." source=user_stated confidence=0.95
- confirmed
true
The proposed Friday conflicts with the confirmed Thursday. Ask which day to book.
ContextDB advises. The customer host enforces. An API or MCP confirmation records authenticated project-credential context against one scoped memory. It does not authenticate the end user. The customer host authenticates the end user and retains any end-user attestation. A Console confirmation records operator context. No confirmation proves objective truth.
Voice action outcomes
Three outcomes for consequential voice actions.
Personal context can shape the conversation. Only action-trusted evidence can support a booking, refund, or record update.
recall_for_action("book service") → act
A confirmed Saturday morning preference supports
service.book(slot="09:00", tech="Mike"). The host still
checks availability and authorization.
appointment.reschedule(day="Friday") → ask
Tentative Friday conflicts with confirmed Thursday. The host asks the caller for one specific confirmation before changing the appointment.
refund.issue(order_id) → abstain
No action-trusted refund instruction is present. The host skips the financial tool and routes the call to an authorized path.
Pre-action check
The decision payload sits before the voice tool.
The fixture values below explain the contract. They are not a benchmark or a claim about caller accuracy.
- act
- Trusted evidence is available. The host applies its own authorization and business rules.
- ask
- Evidence conflicts or needs confirmation. The host asks before the tool call.
- abstain
- No evidence may support the action. The host does not infer or execute it.
POST /v1/recall_for_action
{
"decision_id": "voice-booking-fixture",
"request": {
"action": "book_visit",
"proposed_day": "Friday"
},
"outcome": "ask",
"reason": "tentative request conflicts with confirmed booking",
"policy_version": "default",
"evidence_ids": [
"confirmed-thursday",
"tentative-friday"
],
"source": "user_stated",
"confidence": 0.40,
"confirmation": "required",
"host_next_step": "ask_caller_before_tool_call"
}
ask → pause tool → collect attestation → evaluate again
Confirmation state is one scoped policy signal. The host still owns authentication, authorization, and the tool call.
The voice-agent host owns the side effect.
ContextDB returns the advisory outcome and evidence references. The voice-agent host owns tool credentials, caller authorization, and the final booking, refund, or update.
Call lifecycle
One memory boundary across the call.
-
01 / During the call
Ground the conversation
Recall preferences and prior statements so the caller does not repeat known context.
recall → conversational context -
02 / Before the tool
Evaluate action evidence
Check the booking, refund, reschedule, or escalation against source, confidence, confirmation, and policy.
recall_for_action → act | ask | abstain -
03 / After the call
Keep the decision trace
Record which evidence and policy supported the result without reconstructing the full prompt.
decision → evidence + policy + reason
Voice call order
Answering a question is cheap. Booking the wrong day is not.
| Step | Memory mode | Why |
|---|---|---|
| Answer a general question | recall |
Relevant context can help while the response remains conversational. |
| Book or reschedule | recall_for_action |
The call creates a commitment in another system. |
| Issue a refund | recall_for_action |
The action changes money or account state. |
| Escalate to a person | Host policy | Missing or conflicting evidence should fail closed. |
Voice-agent FAQ
Common voice-agent memory questions.
Do I keep call transcripts?
No. Keep transcripts and recordings in their appropriate systems. ContextDB stores selected action-relevant memories, their provenance, and the decisions made from them.
Does ContextDB make the tool call?
No. Your voice-agent host receives the decision and must enforce it before calling booking, billing, CRM, or scheduling tools.
Can the agent still use tentative context in conversation?
Yes. Ordinary recall and action recall serve different jobs. Tentative context may help the conversation while remaining held from action.
Test a booking-day conflict.
Store one confirmed preference and one tentative wish, then inspect the result.