Memory
Persistent, semantic-searchable memory — your agents remember customers across every conversation
Memory
"Can I get your account number again?" — that's what a stateless agent says. A Chanl-powered agent says "Hi Sarah, you called last week about your order. Let me pull that up."
Memory is persistent, semantic-searchable context that follows customers, agents, and sessions. When a customer mentions they're allergic to peanuts in January, the agent remembers in July — across channels, across conversations, without anyone re-entering data.
Three Scopes
| Scope | Persists Across | Use Case |
|---|---|---|
| Customer | All conversations and channels for that person | Preferences, past issues, account notes |
| Agent | All conversations handled by that agent | Shared context, learned patterns, FAQ shortcuts |
| Session | Current conversation only (auto-expires) | Current call context, in-progress data collection |
Customer memory is the most powerful scope. It means your support agent knows a caller's history, your sales agent knows their past objections, and your onboarding agent knows where they left off — all without CRM lookups.
Quick Start
During a conversation, your agent stores context via MCP:
{
"name": "memory_add",
"arguments": {
"customerId": "cust_abc123",
"content": "Prefers email follow-ups over phone. Has 2 active subscriptions (Pro + Enterprise). Timezone: PST.",
"scope": "customer"
}
}This happens automatically during calls — the agent decides what's worth remembering.
curl -X POST "https://api.chanl.ai/api/v1/memory" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cust_abc123",
"content": "Prefers email follow-ups. 2 active subscriptions.",
"scope": "customer"
}'await fetch('https://api.chanl.ai/api/v1/memory', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
customerId: 'cust_abc123',
content: 'Prefers email follow-ups. 2 active subscriptions.',
scope: 'customer',
}),
});Next time this customer calls — days, weeks, or months later — the agent searches memory:
{
"name": "memory_search",
"arguments": {
"customerId": "cust_abc123",
"query": "subscription preferences",
"limit": 5
}
}curl -X POST "https://api.chanl.ai/api/v1/memory/search" \
-H "Authorization: Bearer <access_token>" \
-d '{"customerId": "cust_abc123", "query": "subscription preferences", "limit": 5}'The search is semantic — querying "subscription preferences" finds the memory about "2 active subscriptions (Pro + Enterprise)" even though the exact words don't match.
How Agents Use Memory
During a live conversation, the typical flow looks like this:
The agent doesn't need explicit instructions to use memory. When connected via MCP, memory_search and memory_add are available as tools. A well-prompted agent naturally uses them — searching for context at the start of a call and storing important details before ending.
Customer Memory vs CRM
Why not just use your CRM? You can — and you should, via Tools. But memory and CRM serve different purposes:
| Memory | CRM | |
|---|---|---|
| What it stores | Soft context — preferences, conversation notes, behavioral patterns | Structured data — account info, orders, contracts |
| How it's searched | Semantic (natural language query) | Field-based (exact match) |
| Who writes to it | The agent, automatically during conversations | Humans or integrations |
| Best for | "She mentioned she's traveling next week" | "Account #12345, Plan: Enterprise" |
Use both. Memory for the soft stuff CRM can't capture. CRM for the structured stuff memory doesn't need to duplicate.
Managing Memory
View memories
In the dashboard, go to Build → Memory to browse stored memories by customer or agent. You can search, filter by scope, and delete individual entries.
Delete memories
When a customer requests data deletion (GDPR, CCPA), remove all their memories:
curl -X DELETE "https://api.chanl.ai/api/v1/memory?customerId=cust_abc123" \
-H "Authorization: Bearer <access_token>"