Part A · How DMA AI works
A.7The bridge database: one memory
Built in the POC- No.
- A.7
- Relates to DMA's book
- Decision Book p.14, p.44
- Part
- A · the foundation
What this part does · Decision Book p.14, p.44
DMA's book asks for a two-way Nutshell connection, an AI review of all 30,000 records, and an Account Digital Twin: one living picture of each account that every part of the system reads from.
Why DMA needs it: The AI needs fast, complete, remembered context (every note, every chat, every score) without hammering Nutshell's API or storing its conclusions inside Nutshell's own fields.
How we do it
- A PostgreSQL database sits between the AI and Nutshell. It keeps a mirror of Nutshell (accounts, people, leads, notes, activities), kept current by a sync worker, so the AI reads fast and never calls Nutshell directly. The mirror can always be rebuilt from Nutshell.
- Next to the mirror it keeps what the AI owns: facts extracted from notes (each with the quote it came from), scores and tiers with their reasons, the Account Digital Twin, summaries, every conversation in full, and the control plane (approvals, the write gate, the decision log).
- Seven areas, 117 tables in the prototype: the CRM mirror, the AI layer, conversations and memory, the taxonomy, the AI workers' registry, the control plane, and operations.
- It is a protected copy of DMA's data: message bodies and contact details are encrypted, each part of the system connects with its own limited role, and row-level rules mean a rep sees only their own accounts. A record deleted in Nutshell is marked deleted here too and drops out of every list.
The flow
It plays on its own while it's on screen; hover or use the controls to pause or step through.
Nutshell changes
A rep edits a deal in Nutshell.
- Nutshell
- Rule in code
- Stored data
- AI
Where the data goes
The same six stages on every page. Nothing reaches Nutshell except through the write gate.
- 1Nutshell and chats
Source
Nutshell records, website chats, email replies, call transcripts.
- 2Sync
Copies Nutshell changes into the bridge database
Mirrors Nutshell into the bridge, and brings written changes back.
- 3Bridge database
A copy of the CRM data, plus what the AI works out
The mirror, the AI layer, conversations, the control plane: seven areas.
- 4AI
Claude models, only through DMA's own gateway
Reads the bridge; its conclusions are stored here, not in Nutshell.
- 5Write gate
The only way back into Nutshell: checked, approved when needed, sent once
The part of the bridge that holds changes for Nutshell.
- 6Nutshell
The system of record
Remains the system of record for CRM facts.
The tables behind it
Drawn from the POC's database catalogue: structure only, no data.
PK primary keyFK reference the database enforces (solid line)ID reference kept by id (dashed line)
| Table | What it holds | Columns |
|---|---|---|
| crm.accounts | The mirror of Nutshell companies, with where each row came from and when. | 17 |
| crm.leads | The mirror of Nutshell leads: status, value, stage. | 26 |
| ai.extracted_facts | Facts the AI found in notes, each with the exact quote and its confidence. | 15 |
| ai.scores | Scores and tiers with their reasons and the scoring version. | 20 |
| ai.account_twin | The Account Digital Twin: one living picture per account. | 16 |
| conv.messages | Every line of every conversation, encrypted. | 21 |
How the tables connect (7)
| Column | Points to | Kept by |
|---|---|---|
| ai.extracted_facts.prompt_id | agent.prompts | The application (by id) |
| ai.scores.prompt_id | agent.prompts | The application (by id) |
| ai.account_twin.prompt_id | agent.prompts | The application (by id) |
| conv.messages.conversation_id | conv.conversations | The database (foreign key) |
| conv.messages.participant_id | conv.participants | The application (by id) |
| conv.messages.decision_id | ctrl.decision_log | The application (by id) |
| conv.messages.agent_version_id | agent.agent_versions | The application (by id) |
Worked example
Synthetic demo data: every name, business and number is made up.
One account, from Nutshell to the Account Digital Twin
What you see
1.The record in Nutshell
An account as the team sees it in the CRM (here, the simulator standing in for Nutshell).

What happens in the system
- Nutshell
The system of record: the account, its people, leads and notes.
- Conversation service
sync workerMirrors it into the bridge; each row remembers its Nutshell id and when it was fetched.
- Bridge database
crm.accounts · crm.leads · crm.notesThe mirror. Note bodies are stored encrypted.
What the prototype's bridge holds today (synthetic accounts from the demo seed).
The seven areas
| Area | Tables | What it holds |
|---|---|---|
| CRM mirror | 19 | Accounts, people, leads, notes, activities, tasks, as they are in Nutshell |
| AI layer | 20 | Facts with quotes, scores and tiers, the Account Digital Twin, summaries, site reviews, proposals |
| Conversations | 7 | Every chat, email and call, in full, encrypted |
| Taxonomy | 5 | DMA's categories: lost reasons, services, objections, buyer types |
| AI workers | 12 | The workers, versions, tools, prompts, test runs |
| Control plane | 35 | Rules, approvals, the write gate, escalations, consent, the decision log |
| Operations | 19 | Users, sessions, the AI gateway's call log, sync runs |
In the prototype right now
- Accounts mirrored
- 292
- Leads mirrored
- 321
- Notes mirrored
- 612
- Current scores
- 300
- Account Digital Twins
- 292
- Database
- PostgreSQL 17 with pgvector
In the running POC

1 / 3The record in the CRM simulator (standing in for Nutshell).
- 1The AI fields, written through the write gate.
- 2The activity note.
CRM simulator (stands in for Nutshell) · one company record. Captured from the running POC on September 25, 2026; synthetic data.
See it live
Opens the exact screen in the running POC, in a new tab.
| Open | Where | What to try |
|---|---|---|
| Accounts | DMA AI dashboard | Open any account to see its twin. |
| The CRM simulator | CRM simulator (stands in for Nutshell) | The same accounts, as Nutshell holds them. |
Status
Built in the POC. This capability runs in the POC today, on synthetic data, end to end.