Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I Built an Enterprise Sales Agent with a Lower-Cost LLM—and Server‑Side Guardrails

Description and use

An AI sales agent built on Claude Haiku 4.5 with server‑side guardrails tracks pending loan files, identifies blockers, and records precise completion dates, reducing manual follow‑ups.

Problem

Sales managers need to track pending loan files, blockers, and commitments, but repeated follow‑ups across employees and customers leave unclear commitments.

Outcome

The agent consistently tracks pending loan files, identifies blockers, and captures precise completion dates, reducing manual follow‑ups and ensuring commitments are stored accurately.

Workflow

  • 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.

Evidence

We built a Sales Productivity Agent to handle these conversations: review pending files, question delays, understand blockers, and capture specific completion dates and times.

Source

Before each call, the backend reads the latest loan pipeline and stored commitments, then builds a shared state object for that turn.

Source

Haiku returns structured JSON containing its reply, proposed commitments, and whether the session should end.

Source

Server‑side guards check that proposal before the reply reaches the employee.

Source

  • Record date: 2026-10-01T07:08:05.395Z