Part A · How DMA AI works
A.9One message, end to end
Built in the POC- No.
- A.9
- Relates to DMA's book
- Decision Book p.2, p.10, p.46
- Part
- A · the foundation
What this part does · Decision Book p.2, p.10, p.46
DMA's book describes the inbound path in one line: a new visitor, an AI conversation, qualification, a score, the right sales approach, Nutshell, then an AI-led close or a hand-off to a person.
Why DMA needs it: Seeing one real message go through every layer shows how the pieces on the other pages fit together, and that each step is checked and recorded.
How we do it
- The visitor's message goes to the conversation service, is stored encrypted and marked as untrusted, and is checked by a fast model and fixed rules before the AI strategist sees it.
- The strategist (the website salesperson worker) gets a short brief, may call its own read-only tools (each checked by the rule engine), and writes a reply through the AI gateway.
- Each sentence of the reply is checked before it is shown. A smaller model then updates the notes, and code turns them into the score and tier.
- Everything above shares one trace id, so DMA can open the whole message on the Observe page, step by step, with the cost of each step. When the visitor books, the lead goes to Nutshell through the write gate.
The flow
It plays on its own while it's on screen; hover or use the controls to pause or step through.
The message arrives
Stored encrypted, marked untrusted, never read as an instruction.
- Person
- Rule in code
- AI
- Stored data
- Routing
- Screen
- Nutshell
Where the data goes
The same six stages on every page. Nothing reaches Nutshell except through the write gate.
- 1Website chat
Source
One visitor message.
- 2Sync
Copies Nutshell changes into the bridge database
Mirrors the lead back once it is written.
- 3Bridge database
A copy of the CRM data, plus what the AI works out
The message, the decisions, the model calls and the notes, under one trace id.
- 4AI
Claude models, only through DMA's own gateway
An input check, the reply and the note-taker, all through the gateway.
- 5Write gate
The only way back into Nutshell: checked, approved when needed, sent once
Creates the lead with its summary and score when the visitor books.
- 6Nutshell
The system of record
The lead, as the salesperson will see it.
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 |
|---|---|---|
| conv.messages | The visitor's line and the reply, encrypted, in order. | 21 |
| ctrl.decision_log | Every step's decision, with the shared trace id. | 28 |
| ops.llm_calls | Every model call of the message: model, tokens, cost, time. | 37 |
| agent.runs | The website salesperson's run for this visitor. | 17 |
How the tables connect (13)
| Column | Points to | Kept by |
|---|---|---|
| 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) |
| ctrl.decision_log.agent_version_id | agent.agent_versions | The application (by id) |
| ctrl.decision_log.run_id | agent.runs | The application (by id) |
| ctrl.decision_log.conversation_id | conv.conversations | The application (by id) |
| ops.llm_calls.agent_version_id | agent.agent_versions | The application (by id) |
| ops.llm_calls.run_id | agent.runs | The application (by id) |
| ops.llm_calls.conversation_id | conv.conversations | The application (by id) |
| ops.llm_calls.decision_id | ctrl.decision_log | The application (by id) |
| agent.runs.agent_version_id | agent.agent_versions | The application (by id) |
| agent.runs.conversation_id | conv.conversations | The application (by id) |
Worked example
Synthetic demo data: every name, business and number is made up.
The recorded message, layer by layer
What you see
1.The visitor types
"I own a dental practice with 3 locations. New patient calls are down this year."

What happens in the system
- Conversation service
conversation serviceReceives the message; trace tr_muh5sw3y109o05zmqjmp6 starts.
- Bridge database
conv.messagesStored encrypted as the next message, marked untrusted.
- LLM gateway
input checkClaude Haiku 4.5: 586 tokens in, 47 out · $0.0008 · 1.8 s. An ordinary message.
Right-hand values come from a real run of the POC on September 25, 2026 (trace tr_muh5sw194tot7e797019, tr_muh5sw3y109o05zmqjmp6…). Rows marked “sample” are illustrative.
A recorded message on the BrightSmile demo site (synthetic visitor, real system): what happened, in order.
The message's steps
| # | Step | Done by | What happened |
|---|---|---|---|
| 1 | Store | Conversation service | The line is stored encrypted, marked untrusted |
| 2 | Input check | Claude Haiku 4.5 | An ordinary message: no attack, nothing to escalate |
| 3 | Fixed routes | Rules | Not a booking, pricing or "person, please" request, so it goes to the strategist |
| 4 | Reply | Claude Sonnet 5 | One reflection of the problem and one question |
| 5 | Sentence checks | Rules | No price, promise or unsourced number: shown as written |
| 6 | Notes and score | Claude Haiku 4.5, then code | Industry, locations and problem recorded; the score recomputed |
In the running POC

1 / 4The recorded message and its reply.
- 1The visitor's message.
- 2The strategist's reply: one reflection, one question.
Website chat · BrightSmile Dental demo site. 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 |
|---|---|---|
| BrightSmile Dental demo site | Demo prospect website | Send a message, then open Observe. |
| Observe | DMA AI dashboard | Open the newest reply as a trace. |
Status
Built in the POC. This capability runs in the POC today, on synthetic data, end to end.