<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kartik Uttam</title>
    <description>The latest articles on DEV Community by Kartik Uttam (@kartik_uttam_a18f5dd781ab).</description>
    <link>https://dev.to/kartik_uttam_a18f5dd781ab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4232518%2Fae4df27a-446b-45b0-95f7-6510fc882817.png</url>
      <title>DEV Community: Kartik Uttam</title>
      <link>https://dev.to/kartik_uttam_a18f5dd781ab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kartik_uttam_a18f5dd781ab"/>
    <language>en</language>
    <item>
      <title>How Hindsight Helped My Sales Agent Remember a Deal-Killing Deadline</title>
      <dc:creator>Kartik Uttam</dc:creator>
      <pubDate>Sat, 07 Nov 2026 18:04:29 +0000</pubDate>
      <link>https://dev.to/kartik_uttam_a18f5dd781ab/how-hindsight-helped-my-sales-agent-remember-a-deal-killing-deadline-3cf2</link>
      <guid>https://dev.to/kartik_uttam_a18f5dd781ab/how-hindsight-helped-my-sales-agent-remember-a-deal-killing-deadline-3cf2</guid>
      <description>&lt;p&gt;Before call four of a $180,000 deal, my sales agent opened its brief with a warning I could easily have missed: security clearance had to land by November 20, or the whole deal would slip to next year's budget cycle.&lt;/p&gt;

&lt;p&gt;A normal chatbot can't do that. Its brief on call four reads like its brief on call one. This is how I used &lt;a href="https://github.com/vectorize-io/hindsight" rel="noopener noreferrer"&gt;Hindsight&lt;/a&gt; to fix that, and what I would keep if I built it again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;A sales rep talks to the same prospect across several calls. Each call adds objections, new stakeholders and promises with due dates. By call four, the rep is juggling a CFO who wants a guaranteed 90-day payback and board approval, engineers worried about integration complexity and latency, and a security team that wants a SOC 2 Type II audit, penetration test summaries and a completed CAIQ questionnaire.&lt;/p&gt;

&lt;p&gt;Pasting old notes into a prompt works for a couple of calls. After that it gets long and noisy, and the model can't tell which facts are still open. I wanted real &lt;a href="https://vectorize.io/what-is-agent-memory" rel="noopener noreferrer"&gt;agent memory&lt;/a&gt;: store what happened, recall the relevant parts, and reason across deals.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the agent does
&lt;/h2&gt;

&lt;p&gt;The Deal Intelligence Agent remembers every objection, stakeholder concern and commitment across a deal's sales cycle. It briefs the rep before the next call, drafts a personalized follow-up email, and learns which objection-handling approaches win across deals.&lt;/p&gt;

&lt;p&gt;The backend is FastAPI, the LLM is Groq, the memory layer is Hindsight Cloud, and the dashboard has five tabs: Pre-Call Briefing, Memory Comparison, Follow-Up Email, Ingest Call and Playbook &amp;amp; Insights. At the top of the briefing is a switch between "Memory ON" (full Hindsight long-term memory) and "Memory OFF" (latest call only), so anyone can see what memory changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The design decision that mattered: two kinds of banks
&lt;/h2&gt;

&lt;p&gt;Hindsight stores memory in banks, and how you split them decides what your agent can do. I used two kinds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deal-{deal_id}   one isolated bank per deal
playbook         one shared bank across all deals
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each deal gets its own bank, so conversations, stakeholder observations and commitments stay siloed per customer. Nothing leaks from one prospect to another, and a brief can only draw on that deal's history.&lt;/p&gt;

&lt;p&gt;The shared &lt;code&gt;playbook&lt;/code&gt; bank collects outcomes: which deals were won or lost, which objections came up, and which strategies worked. That is where cross-deal learning happens.&lt;/p&gt;

&lt;p&gt;With one bank per deal and nothing shared, the agent could never learn. With one big bank, a brief for one prospect could be polluted by another. Using both gave me precision and learning.&lt;/p&gt;

&lt;p&gt;Each deal bank is created with a focused mission: track every objection, stakeholder concern, commitment, pricing discussion and competitor mention across a B2B sales cycle, and learn which objection-handling approaches lead to won deals. I also set a cautious, evidence-based disposition (&lt;code&gt;skepticism=4&lt;/code&gt;, &lt;code&gt;literalism=4&lt;/code&gt;, &lt;code&gt;empathy=3&lt;/code&gt;), because I wanted the agent to stick to what was actually said instead of smoothing it over.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retain, recall, reflect
&lt;/h2&gt;

&lt;p&gt;Hindsight gives the agent three operations, and each does a different job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Retain&lt;/strong&gt; saves a call. It takes the raw transcript and extracts structured facts, a "When" date and the "Involving" people, instead of a lossy summary. When a deal closes, the outcome is retained into the &lt;code&gt;playbook&lt;/code&gt; bank too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recall&lt;/strong&gt; looks things up. Before it writes any brief, the agent runs four targeted queries against the deal's bank:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Open objections and blockers
2. Stakeholder stances and concerns (CFO vs. CTO)
3. Commitments, promises, and due dates
4. Commercial terms, pricing limits, and technical requirements
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Recall returns grounded facts with the call they came from, so the LLM is writing from memory instead of guessing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflect&lt;/strong&gt; reasons over patterns. Against the shared playbook, the agent asks questions like which objection-handling strategies and pricing concessions win deals with skeptical CFOs, and it turns the answer into tactical recommendations for the next call.&lt;/p&gt;

&lt;p&gt;On top of that, the playbook bank holds two mental models: &lt;em&gt;CFO Budget &amp;amp; Payback Alignment&lt;/em&gt; (turn an upfront fee into amortized quarterly payments with a clear 6 to 9 month break-even) and &lt;em&gt;Technical Risk Inoculation&lt;/em&gt; (answer integration and latency objections early with SOC 2 documentation and benchmark proof).&lt;/p&gt;

&lt;p&gt;The LLM never sees the whole history. It sees what recall and reflect return, and it writes the brief from that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like on one deal
&lt;/h2&gt;

&lt;p&gt;The Northwind Logistics deal ($180,000, Proposal stage, four recorded calls) shows the result well. The brief is split into pieces a rep can scan in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open objections.&lt;/strong&gt; Three are tracked, each with who raised it and in which call: the annual fee exceeds the CFO's quarterly budget limits, integrating customized SAP tables could derail the engineering sprint, and compute overhead on Kafka brokers threatens stability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stakeholders and stances.&lt;/strong&gt; Each person has a role, a stance and their concerns: the CFO is cautious, the engineering lead is concerned, the lead architect is skeptical, the sales engineer is supportive, and the executive sponsor is neutral.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commitments.&lt;/strong&gt; Each promise shows who made it and when it is due, such as custom ERP latency benchmark data due November 12 and the security documentation due November 20.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A playbook recommendation.&lt;/strong&gt; This is the cross-deal part. For deals above $100,000, the agent advises delivering a clear ROI narrative by the fourth call to prevent early disengagement, and it cites its evidence: Apex Retail Technologies, a $120,000 deal that was lost after four calls despite multiple touchpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grounded facts, not guesses
&lt;/h2&gt;

&lt;p&gt;Below the brief, the app lists every fact it recalled, tagged with the call number, the date and the people involved.&lt;/p&gt;

&lt;p&gt;This became the most useful part for me. When the brief says the CFO needs a guaranteed 90-day payback, I can scroll down and see the exact fact from Call 3 behind it. It also makes the agent easier to debug: when a brief is wrong, I can see which memory misled it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory on vs. memory off
&lt;/h2&gt;

&lt;p&gt;With memory off, the agent sees only the latest call. It can write a reasonable brief, but it doesn't know who objected to what earlier or which promises are still open. With memory on, the app reports that it recalled grounded facts from previous calls plus the cross-deal playbook reflection, and the brief is built from them. Same deal, same button, very different brief.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making it hold up
&lt;/h2&gt;

&lt;p&gt;Because LLM calls fail in practice, the backend has unit tests for the cases I worried about most: LLM fallbacks, defensive JSON parsing, and empty-recall edge cases (a deal with no memories yet must not crash a brief).&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell someone building this
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Split memory by scope.&lt;/strong&gt; Per-deal banks plus a shared playbook gave me isolation and learning at once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Store things you can act on.&lt;/strong&gt; Objections, owners and promises with due dates are far more useful than raw transcripts alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show your evidence.&lt;/strong&gt; Listing every recalled fact next to the brief builds trust and makes debugging easy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make memory visible.&lt;/strong&gt; One on/off switch shows the value in seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expect repeats.&lt;/strong&gt; In my recalled-facts list, the same budget objection appears from both Call 1 and Call 3, and the same infosec deadline from Call 1 and Call 4. They are accurate, but repetitive, and deduplicating them is the next thing I'd fix.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;The code is at &lt;a href="https://github.com/abhishek18407-pixel/micro" rel="noopener noreferrer"&gt;github.com/abhishek18407-pixel/micro&lt;/a&gt;. To run the backend:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;backend
uvicorn main:app &lt;span class="nt"&gt;--reload&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 8000
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:8000/admin/seed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need a Hindsight Cloud key and a Groq key in &lt;code&gt;backend/.env&lt;/code&gt;. To learn more about the memory layer, start with the &lt;a href="https://github.com/vectorize-io/hindsight" rel="noopener noreferrer"&gt;Hindsight repository&lt;/a&gt; and the &lt;a href="https://hindsight.vectorize.io/" rel="noopener noreferrer"&gt;Hindsight documentation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>python</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
