Multi-channel AI sales agent
Haris Muhibić is the primary architect of a production AI agent that replies to car-dealership leads over SMS, email, web chat and voice, using live inventory and CRM data.
- Role
- Primary architect (from April 2026)
- When
- 2026
- Stack
The problem
Dealerships lose leads that wait hours for an answer. They need replies within minutes, at any hour, and those replies have to be correct about real cars, real prices and real availability.
My role
I took over a partner-built scaffold in April 2026 and have been its primary architect since. I write the design specs, and I built the message processor, the recommendation service, inbound email, the voice proof of concept, the evaluation harness, the dealership settings stack and the appointment-lifecycle automations that drive the agent from the CRM.
How it works
- Shared agent core on Bedrock. One
core/module owns persistence, tools, scoring, guardrails and the Converse tool-use loop. SMS, email and web chat are thin adapters on that core; voice keeps its own realtime loop and reaches the same Core-1 services (tools, scoring, guardrails) over Lambda and shared tables. Channel is part of conversation identity, so a web-chat reply never also texts the lead. - Orchestration: a tool-using orchestrator on Bedrock (Claude for the customer-facing loop, cheaper models for router, extraction and other sub-tasks). Inventory, CRM, recommendation and lead-capture tools each run as a separate function.
- Delivery: messages are stored first, then processed from a stream. A durable event outbox and dead-letter queues mean no reply is lost when a downstream system fails.
- Routing: the router and extractors return probabilities instead of parsed JSON. Below a confidence threshold, the system falls back to a full model call. If a dependency is down, the reply comes slower; it doesn’t stop.
What’s unusual
- Speculative tool calls. When the router says an inventory lookup is likely, the search starts before the model asks for it, with a hard time cap. First-turn CRM data is prefetched the same way.
- Reply first, extract after. The reply goes out, then lead details are extracted in a cascade: cheap classifiers first, and the expensive pass only when a real signal shows up.
- Two-tier voice. A real-time voice model handles the conversation and passes hard questions, such as finance maths or vehicle comparisons, to a stronger model. It then speaks the answer in its own words.
- Evaluating the whole loop. Candidate models run as the complete agent, with production tools, a golden set and replayed conversations. An independent judge scores them, and each run reports p50 and p95 latency and cost per reply. Models and reasoning effort are settled by bake-off, then flipped by deploy-time config rather than code.
Recent production work (Oct 2026)
- Conversation playbook. Entry strategies, exit codes and post-visit / retention cadence are data, not prompt spaghetti. Suppression gates fail closed; a sold CRM status and other exit states close the thread cleanly. Salespeople get a thread summary with a suggested next step.
- Per-dealership settings. Structured specialties, programmes, live promotions and hours, plus dealer-authored rules that cannot override safety. Lead scoring thresholds and signal weights are configurable per dealer. A guided admin setup and a weekly website check propose values from the dealer’s own site; untrusted website and typed text never become finance figures. A settings chat proposes validated config changes with a change log and undo.
- Videos that fit. Automation and agent sends only attach a library video when it matches the car and the moment in the conversation; other automations write silent context into a running thread instead of sending a second customer message. Sold, lost and lead-age gates that protect the AI agent do not block the product’s separate video automations.
- Send windows and delays. Agent automations honour a custom day/time grid (or all-day). A trigger outside the window waits for the next open slot instead of being dropped, and dealers can set a delay before the first message. Email follows the buyer’s send window without the SMS daily cap.
- Shared phone numbers. When one number sits in more than one customer’s pool, an inbound reply attaches to the right customer’s thread — not whichever row the database returned first.
- Appointment lifecycle. When the dealership confirms or moves an appointment in the CRM, the agent gets its own entry strategies and seeded templates. Reminders already queued for that visit re-anchor to the new time; a cancel before send drops the outbound. Confirmation shares one CRM event with other products so the customer is not double-messaged. Covered by e2e that replays real CRM payloads.
- CRM login verify (spike). A Playwright + Chromium Lambda that signs into the dealer CRM and trusts a 2FA email only when the mail provider’s own SPF/DKIM/DMARC verdicts pass, so a spoofed inbox cannot complete the login.
Building something similar? Book a 30-minute call or email haris@chern0.dev.