DEV Community

Cover image for Building a Sales Deal Assistant That Remembers Customer Objections Across Deal Cycles
srivalli jalla
srivalli jalla

Posted on

Building a Sales Deal Assistant That Remembers Customer Objections Across Deal Cycles

Building AI agents that rely solely on standard prompt contexts often leads to a major bottleneck in real-world workflows: statelessness. When an agent loses history between customer touchpoints, users are forced to repeatedly enter past context, leading to friction and poor user experience.

To solve this issue in sales workflows, I built a Sales Deal Intelligence Assistant. By combining Groq for high-speed inference with Vectorize Hindsight for persistent agent memory, the assistant retains past customer objections and recalls them weeks or months later to draft tailored follow-up strategies.


Architecture Overview

The application is built using standard Python tools and designed for simplicity:

  1. Frontend: Streamlit interactive interface.
  2. LLM Engine: Groq API (llama-3.3-70b-versatile / openai/gpt-oss-120b).
  3. Agent Memory Layer: Vectorize Hindsight SDK using hindsight.retain() and hindsight.recall().

1. Storing Context with hindsight.retain()

When a sales representative finishes a call, they input meeting details into the assistant. The app parses the key points—such as budget limits or feature requests—and sends them to Hindsight memory, indexed by prospect name (bank_id):


python
from hindsight_client import Hindsight

hindsight = Hindsight(api_key=HINDSIGHT_API_KEY)

# Retaining prospect objections into memory
hindsight.retain(
    bank_id="srivalli",
    content="Prospect: srivalli. Objections raised: Price is too high and we need SSO integration. Key features wanted: audit logs."
)


# Recalling stored memory context for a specific prospect
recall_response = hindsight.recall(
    bank_id="srivalli",
    query="What were their main objections and concerns?"
)

# Pass recalled memory context into Groq LLM prompt
prompt = f"""
You are an expert sales assistant. Write a personalized follow-up email.
Recalled prospect memory context:
{recall_response}
"""
Enter fullscreen mode Exit fullscreen mode

Top comments (0)