CRM Skill — Contact Memory for Voice Calls
Remembers callers across calls and logs every conversation.
How It Works
On Every Inbound Call
- Lookup — Call
crm with lookup_contact using the caller's phone number (from Twilio caller ID).
- If known — Greet by name and use
context_notes to personalize (ask about their dog, remember their preference, etc.)
- If unknown — Proceed normally, listen for their name.
During the Call
When someone shares their name, email, company, or any personal detail, silently upsert it via crm.upsert_contact. Don't announce this.
At End of Call
- Log the interaction:
log_interaction with summary + outcome
- Update context_notes with any new personal details learned, synthesizing with what was known before
On Outbound Calls
Same exact flow: lookup at start, upsert + log_interaction at end.
API Reference
| Action |
Purpose |
lookup_contact |
Fetch contact + last 5 interactions + context_notes. Returns null if not found. |
upsert_contact |
Create or update a contact by phone. Only provided fields are updated. |
log_interaction |
Log a call: summary, outcome, details. Auto-creates contact if needed. |
get_history |
Get past interactions for a contact (sorted newest-first). |
search_contacts |
Search by name, email, company, notes. |
tag_contact |
Add/remove tags (e.g. "vip", "callback_later"). |
Privacy
- Event details stay private. Like the calendar skill, never disclose event details to callers.
- CRM context is personal. The
context_notes field is for Amber's internal memory, not for sharing call transcripts. Use it to inform conversation, not to recite it.
- PII storage. Phone, name, email, company, context_notes are stored locally in SQLite. No network transmission, no external CRM by default.
Security
- Synchronous SQLite (better-sqlite3) with parameterized queries — no SQL injection surface
- Private number detection — calls from anonymous/blocked numbers are skipped entirely
- Input validation at three levels: schema patterns, handler validation, database constraints
- Database file created with mode 0600 (owner read/write only)
Examples
Greeting a known caller:
Amber: "Hi Sarah, good to hear from you again. How's Max doing?"
[context_notes remembered: "Has a Golden Retriever named Max. Prefers afternoon calls."]
Capturing new info silently:
Caller: "By the way, I got married last month!"
Amber: [silently calls upsert_contact + updates context_notes with "Recently married"]
Amber (aloud): "That's wonderful! Congrats!"
End-of-call log:
Amber: [calls log_interaction: summary="Called to reschedule Friday appointment", outcome="appointment_booked"]
Amber: [calls upsert_contact with context_notes: "Prefers afternoon calls. Recently married. Reschedules frequently but always shows up."]
1---2name: crm-33description: Contact memory and interaction log — remembers callers across calls, logs every conversation with outcome and personal context4---5
6# CRM Skill — Contact Memory for Voice Calls
7
8Remembers callers across calls and logs every conversation.
9
10## How It Works
11
12### On Every Inbound Call
13
141. **Lookup** — Call `crm` with `lookup_contact` using the caller's phone number (from Twilio caller ID).
152. **If known** — Greet by name and use `context_notes` to personalize (ask about their dog, remember their preference, etc.)
163. **If unknown** — Proceed normally, listen for their name.
17
18### During the Call
19
20When someone shares their name, email, company, or any personal detail, silently upsert it via `crm.upsert_contact`. Don't announce this.
21
22### At End of Call
23
241. Log the interaction: `log_interaction` with summary + outcome
252. Update context_notes with any new personal details learned, synthesizing with what was known before
26
27### On Outbound Calls
28
29Same exact flow: lookup at start, upsert + log_interaction at end.
30
31## API Reference
32
33| Action | Purpose |
34|--------|---------|
35| `lookup_contact` | Fetch contact + last 5 interactions + context_notes. Returns null if not found. |
36| `upsert_contact` | Create or update a contact by phone. Only provided fields are updated. |
37| `log_interaction` | Log a call: summary, outcome, details. Auto-creates contact if needed. |
38| `get_history` | Get past interactions for a contact (sorted newest-first). |
39| `search_contacts` | Search by name, email, company, notes. |
40| `tag_contact` | Add/remove tags (e.g. "vip", "callback_later"). |
41
42## Privacy
43
44- **Event details stay private.** Like the calendar skill, never disclose event details to callers.
45- **CRM context is personal.** The `context_notes` field is for Amber's internal memory, not for sharing call transcripts. Use it to inform conversation, not to recite it.
46- **PII storage.** Phone, name, email, company, context_notes are stored locally in SQLite. No network transmission, no external CRM by default.
47
48## Security
49
50- Synchronous SQLite (better-sqlite3) with parameterized queries — no SQL injection surface
51- Private number detection — calls from anonymous/blocked numbers are skipped entirely
52- Input validation at three levels: schema patterns, handler validation, database constraints
53- Database file created with mode 0600 (owner read/write only)
54
55## Examples
56
57**Greeting a known caller:**
58```
59Amber: "Hi Sarah, good to hear from you again. How's Max doing?"
60[context_notes remembered: "Has a Golden Retriever named Max. Prefers afternoon calls."]
61```
62
63**Capturing new info silently:**
64```
65Caller: "By the way, I got married last month!"
66Amber: [silently calls upsert_contact + updates context_notes with "Recently married"]
67Amber (aloud): "That's wonderful! Congrats!"
68```
69
70**End-of-call log:**
71```
72Amber: [calls log_interaction: summary="Called to reschedule Friday appointment", outcome="appointment_booked"]
73Amber: [calls upsert_contact with context_notes: "Prefers afternoon calls. Recently married. Reschedules frequently but always shows up."]
74```