How I Built an Enterprise Sales Agent with a Lower-Cost LLM—and Server‑Side Guardrails
Описание и применение
Создан агент продаж, использующий Claude Haiku 4.5 и серверные контрольные механизмы для отслеживания открытых заявок, выявления блокировок и фиксации точных дат завершения, что снижает необходимость ручных напоминаний.
Задача
Sales managers need to track pending loan files, blockers, and commitments, but repeated follow‑ups across employees and customers leave unclear commitments.
Результат
The agent consistently tracks pending loan files, identifies blockers, and captures precise completion dates, reducing manual follow‑ups and ensuring commitments are stored accurately.
Рабочий процесс
- 1. Backend reads latest loan pipeline and stored commitments, builds a shared state object for the turn.
- 2. Determines customer, handled files, and pending items; treats outdated commitments as obsolete.
- 3. Sends computed context to the model, reducing reconstruction effort.
- 4. Uses latest session summary from MongoDB and filtered semantic retrieval for earlier context, keeping prompt focused.
- 5. Separates fixed instructions from changing employee data, enabling prompt caching of static prefix.
- 6. Model returns structured JSON with reply, proposed commitments, and session end flag.
- 7. Server‑side guards validate the proposal: check missing time, prevent reopening locked files, block early close if unresolved items remain.
- 8. Guard handles confirmation loops by moving directly to missing time request.
- 9. Closing message builds final summary from validated database records for customer names, dates, and times.
- 10. Logging and tests maintain guard correctness.
- 11. Result: cost‑efficient model with consistent workflow and clear commitments.
Доказательства
We built a Sales Productivity Agent to handle these conversations: review pending files, question delays, understand blockers, and capture specific completion dates and times.
Before each call, the backend reads the latest loan pipeline and stored commitments, then builds a shared state object for that turn.
Haiku returns structured JSON containing its reply, proposed commitments, and whether the session should end.
Server‑side guards check that proposal before the reply reaches the employee.
- Дата записи: 2026-10-01T07:08:05.395Z