Architecture
The invisible current that does the real work.
Undertow is an autonomous conversion engine — multi-agent orchestration for the post-reply sales lifecycle. This page explains how it works under the hood.
How a reply flows through Undertow
Every inbound reply follows the same path. The system does not batch, queue, or wait for a human to triage.
- A reply arrives. Email, LinkedIn, SMS — whichever channel is connected. The system picks it up within seconds.
- Six specialists evaluate in parallel. Each one reads the conversation and produces a structured recommendation. They do not see each other’s results.
- The orchestrator merges. It resolves conflicts, picks the best action, and checks the autonomy rules. Does this action need a human to approve, or can the system send on its own?
- The pursuit engine updates. Every reply moves the state machine forward. The objective — book a meeting, capture a referral, handle an objection — either advances or the system decides what to try next.
- The response goes out. On autopilot, it sends. On assisted, the operator sees a draft and approves with one click. On manual, the operator writes from scratch with the agent’s analysis in front of them.
The whole cycle takes milliseconds for the majority of replies — because the majority never need the expensive rung.
The cost ladder
This is the thesis. Not an optimization, not a fallback strategy — the architecture itself.
Every capability in Undertow is organized as a ladder of methods, cheapest at the bottom, most expensive at the top. A reply enters at the bottom and climbs only as far as it needs. The moment a rung is certain enough, it stops. The rungs above it never wake.
| Rung | What it does | Handles | Cost | Speed |
|---|---|---|---|---|
| [7] Full reasoning | Reads the entire thread with an LLM | Ambiguous, multi-intent, sarcasm, “not now vs never” | expensive | seconds |
| [6] Meaning match | Compares meaning against known intents — two models must agree | Long-tail intents, no training data needed | moderate | ~21 ms |
| [5] Trained classifier | A 15-way classification model fine-tuned on labeled data | Subtle intent the simpler models miss | one-time training | ms |
| [4] Similar examples | Finds the 5 nearest labeled examples — all 5 must agree | Paraphrases of things already seen | ~5 ms | ms |
| [3] Pattern match | Statistical classifier with a confidence gate | The bulk of clear-intent replies | near zero | µs |
| [2] Keyword scan | Looks for known phrases — “not interested”, “remove me”, “talk to X” | Surface-level signals | near zero | µs |
| [0] Header check | Reads email headers, MIME types, bounce codes | Auto-replies, calendar accepts, unsubscribes, bounces | zero | µs |
Why it matters. The naive design fires six LLM agents on every inbound reply: 10,000 replies per day × 6 agents × ~2,000 tokens = 120 million tokens per day. That is a token furnace, not a product.
The cost ladder puts the majority in microseconds at near-zero cost. On the held-out evaluation set, only 33.3% of replies reach the top rung — one in three, not six calls in every one. The remaining two-thirds resolve at the seabed, in microseconds, with zero LLM calls.
Some intents must never depend on a model’s mood. Unsubscribe, opt-out, bounce, auto-reply: rung 0, deterministic, compliance-safe by construction.
Specialist agents
Six agents run in parallel on every reply. Each is a specialist — it does one thing and does it with its own cost ladder.
Intent classification
The core engine. Identifies what the prospect means: interested, not now, objection, delegation, scheduling, confirmation, cancellation, and ten more categories. This is the agent that uses the full 7-rung cascade described above.
The confidence gate is the key mechanism. Each rung produces a confidence score. Below the gate threshold, the reply climbs to the next rung. Above it, the rung resolves and the ones above never fire. The gate is tuned on cross-validated training data, never on the test split.
Objection handling
Classifies the objection into one of 15 types (price, competitor, timing, skepticism, bandwidth, and ten more) and selects a response angle from an approved playbook of 30 angles — two per type.
The angle rotates per thread. A prospect never reads the same reframe twice. Type classification runs at rung 2–3 (keyword scan and pattern match). Angle selection is a direct mapping. No LLM in the loop.
Scheduling
Detects scheduling intent, parses natural language dates and times (“Tuesday at 3pm”, “next week after the launch”), resolves timezones from contact metadata, and proposes available slots. Pure calendar math — no model needed for “Monday at 10am works.”
Delegation and routing
Detects when a prospect points elsewhere — “That’d be a RevOps conversation”, “Talk to Dana.” Extracts the referral: name, email, phone, role. Determines the handoff action: spawn a new pursuit for the referred contact, carry the original context forward.
Detection runs at rung 1–2: known phrases plus entity extraction. A pronoun guard ensures “she” binds to Dana and not to the rep who sent the original message. Dana Ferreira was extracted from one sentence.
Tone profiling
Analyzes the prospect’s communication style: sentence length, formality, contraction rate, greeting conventions, punctuation density. Produces a style profile the response generator uses to mirror the prospect’s register.
Pure statistics. Style mirroring is feature extraction, not reasoning — this agent’s ladder has an LLM rung on paper, and it is marked likely never needed.
Recovery
Detects no-shows, cancellations, ghosting. Manages silence timers and attempt counts. When a prospect goes quiet, the recovery agent decides when to re-engage and which channel to try next.
Detection is temporal, not linguistic. The planned next rung is a survival estimator over reply latency, not a model server.
The orchestrator
All six agents produce recommendations independently. The orchestrator merges them into a single decision.
What it decides:
- Action — respond, schedule, delegate, escalate, recover, qualify, close, or withdraw
- Autonomy — can the system send this on its own, or does a human need to approve?
- Draft — templates first (confirmations, invites, acknowledgments), style-adapted templates second, and the LLM only for open replies
Conflict resolution. When agents disagree, compliance wins. An unsubscribe detected at rung 0 overrides an “interested” classification at rung 3. A delegation signal overrides a scheduling proposal. The orchestrator applies a priority order, not a vote.
Autonomy is granular. Not a global on/off switch. Each action type has its own autonomy level — scheduling might be on autopilot while delegation stays manual. First interactions always require human review. Financial or legal language always escalates.
Pursuit engine
Not sequences. Not cadences. Objective-driven.
A pursuit is a state machine with one goal — book a meeting, capture a referral, handle an objection. Every reply, every silence, every no-show moves the state forward. The system does not follow a script; it pursues until the objective closes or an explicit withdrawal is detected.
Seven states:
- Active — pursuing the objective
- Waiting — sent a response, awaiting reply
- Recovering — re-engaging after a no-show or cancellation
- Delegated — handed off to a referred contact (spawns a child pursuit)
- Achieved — objective met
- Withdrawn — prospect explicitly opted out
- Exhausted — maximum attempts or days reached
Delegation chains. When Alex says “Talk to Dana in RevOps,” the system spawns a child pursuit for Dana, carries the context from Alex’s thread, and tracks both independently. If Dana delegates further, the chain extends. Each link is its own state machine.
Channel escalation. If email goes quiet, the system tries the next configured channel — LinkedIn, then SMS. Not as a cadence, but as a response to silence after a configurable number of days.
The eval harness
The system measures itself. This is not an afterthought — it is the arbiter.
The metric is acted precision. Of the replies the system resolves autonomously, how many got the right action? One wrong email is a fire. Coverage and escalation come second — they only count if precision holds.
How it works:
- A held-out set of 75 labeled conversations, never tuned on
- Thresholds chosen on the cross-validated training residue (233 of 303 training items)
- The test split is touched once per stage — not iterated until it looks good
- Results: 50/50 acted precision by action through the full cascade, 33.3% escalation to the LLM rung
Refutations are published. When a method is measured and fails to improve precision, it is recorded — what was tried, what the numbers said, why it was rejected. The refuted ledger lives alongside the results so nobody re-tries an approach by intuition.
Current held-out results:
| Enabled through | Acted precision | Escalation |
|---|---|---|
| Rung ≤ 3 | 25 / 25 | 66.7% |
| + Rung 4 | 35 / 35 | 53.3% |
| + Rung 5 | 47 / 47 | 37.3% |
| + Rung 6 | 50 / 50 by action | 33.3% |
Each rung added is justified by the table. If it did not improve the numbers, it would not ship.
The learning loop
Every human verdict is a training example.
When the system drafts a response on assisted mode, the operator’s action — approve, edit, or reject — becomes labeled data. The pattern-match classifier retrains, the before/after is measured on the same harness, and the system either improves or the change is rolled back.
Autonomy hints. Approval rates per intent accumulate. An action that has been approved unedited often enough becomes eligible for autopilot. The system earns autonomy through measured performance, not configuration.
The guard against contamination. Labels from rungs 4, 5, and 6 — the similarity engine, the trained classifier, the meaning-match judge — never enter the training corpus on their own. They are copies of existing data or a judge’s opinion. Training the cheap rungs to agree with the expensive ones would be circular. Those labels enter only with an explicit human correction. The expensive rungs are auditors, not teachers.
Three planes
Under the hood, the system is organized into three planes:
Knowledge plane. The specialist agents and their cost ladders. This is where classification, extraction, and analysis happen. Each agent reads the conversation and produces a structured recommendation.
State plane. Pursuit tracking, conversation memory, and the learning loop. This is where the system remembers what happened, tracks objectives, and improves over time. Every conversation is a persistent record with full thread history, intent evolution, sentiment trajectory, and style profile.
Interface plane. The orchestrator, the operations layer, the console, and the channel adapters. This is where decisions merge, policies apply, and responses go out. The console shows operators what is happening across all active pursuits — which intents resolved, which actions were taken, where attention is needed.
The three planes are independent. A new specialist agent plugs into the knowledge plane without touching state or interface. A new channel adapter plugs into the interface plane without touching knowledge or state. The eval harness measures across all three.
Design principles
- Cheapest rung first. Every capability climbs only as far as it needs. Expensive rungs are taken when measured to be needed — never reflexively avoided, never reflexively used.
- Precision on action. One wrong email is a fire. Coverage comes second.
- Eval is the arbiter. Every rung placement cites a measurement. Refutations are kept.
- Autonomy is earned. The system starts on assisted. Approval rates build toward autopilot. No action runs unsupervised until the numbers justify it.
- Feedback compounds. Every human edit makes the cheap rungs smarter and the expensive rungs less necessary.
- Compliance is structural. Unsubscribe, opt-out, and bounce are rung 0 — deterministic, not probabilistic. They cannot be overridden by a confident rung 3.
- Channel-agnostic. The engine does not know or care whether the reply came from email, LinkedIn, or SMS. The adapter handles transport; the engine handles meaning.
- Pursuit, not sequence. No cadences, no step lists. An objective and a state machine. Silence moves the pursuit forward, not just replies.