October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Context Has a Cost: What Building a Memory-Aware Agent Taught Me

Durable memory is not prompt context. A first-person account of building Waada shows how task-specific retrieval, a fixed context budget, dated evidence, and validated output keep an LLM agent grounded, along with the limits of the evaluation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keeping a long account history is not the same as putting that history in front of a model. In the sales-handover application Waada, the author stores everything durably but gives each model call only a small, bounded set of evidence chosen for that call’s task. The store holds the record; the prompt is a temporary reasoning window. The author’s account is a first-person implementation retrospective, published as a DEV Community post on September 29, 2026 (the year is inferred from the page context), and it is available here.

What Waada does with account history

Waada supports sales handovers. It ingests emails, Slack conversations, call and meeting transcripts, audio, and CRM records. Each source has its own parser, and every interaction is converted into one canonical structure containing the account, source ID, type, date, title, participants, content, and source metadata. The author’s reasoning is that retrieval cannot be bounded sensibly when each source represents conversations differently, so normalization comes before any retrieval decision.

As an Amazon Associate I earn from qualifying purchases.

Durable memory sits in a separate layer. The author’s description of the split is: “It is the memory layer. The application asks it for evidence. The LLM reasons over the evidence.” Hindsight is the memory layer in this implementation. That is the author’s characterization of their own design, not a general description of how every Hindsight deployment works.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start retrieval from the task, not from the account

The central design choice is that Waada does not run one generic “retrieve account context” query. Different questions need different evidence, so the application runs separate retrieval intents. The author’s examples of reader-style questions show why:

Commitment ledger: “Which promises are still open?”

This path searches for promise-related evidence: commitments the seller or company made, dates attached to them, and whether later messages closed them. A chronological summary of the account would bury these under unrelated back-and-forth.

Landmines: “What should the new owner know before reopening a difficult topic?”

This path looks for objections, sensitive subjects, and agreements that were accepted. A new account owner needs to know what went badly before, and what the customer already agreed to, more than they need a neutral timeline.

Recent changes: “What changed since July?”

A time-scoped question needs evidence bounded by date, so the application can answer about movement since a given point without reloading the whole history.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stakeholders and direct questions

Other paths address who is involved and answer a specific question a user asks. Each intent has its own selection logic, which is what makes the evidence relevant to the call.

Budget the context after retrieval

Retrieval returns candidates; it does not decide what reaches the model. The author describes a fixed sequence applied to the candidates from every intent:

  1. Deduplicate overlapping items, such as the same message surfaced by two different sources or intents.
  2. Chunk long items so that a single long transcript does not consume the whole window.
  3. Select the chunks that fit the task, favoring the evidence the specific question needs.
  4. Cap the final text against an input budget before the model call.

The budget in this implementation is 5,000 tokens for the LLM layer, as stated by the author in 2026. The author also gives a conservative character estimate of about 12,500 characters for the same budget. That figure is a deliberately cautious approximation, not a tokenizer measurement, and it reflects one project’s configuration. It is not a universal model limit, and other providers or models will have different ceilings.

The author’s framing of the cap is the key point: “I would rather drop low-value context deliberately than let the prompt grow until the provider rejects it.” Another line makes the same design argument at the architecture level: “Provider limits are part of application architecture.” Deciding what to drop is a product decision, and it should be made in code, not left to a provider error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep dates and provenance in the prompt

A short prompt can still mislead if it strips out when something happened and where it came from. A promise made in a call three months ago, and a promise confirmed in an email yesterday, read identically without dates. For that reason the author keeps source context, document IDs, and dates visible in the evidence passed to the model, so the model can say when a commitment was made and what it was based on.

Treat model output as untrusted until it validates

Generation is only one stage of the pipeline. For structured extraction, the described code validates the model’s output with Zod. If validation fails, the system attempts repair guidance, and if that is not enough, it falls back to JSON parsing. When those steps fail, the result can be null, and the application does not accept it as state.

In practice, that gives three distinct outcomes a developer should design for:

  • Valid output passes validation and is written to application state.
  • Invalid output with a successful repair is accepted only after the repaired result passes the same validation.
  • Unrecoverable output becomes null, and the workflow treats it as a failed extraction rather than trusted data.

Run operations sequentially under rate limits

In at least part of the implementation, operations run sequentially to stay inside a provider’s shared rate window. The author presents this as predictable control flow under rate limits, not as a performance optimization. Parallel calls would be faster on paper, but they would make rate-limit failures harder to predict and recover from.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the evaluation showed, and what it does not show

The author compares three approaches: CRM fields alone, a raw chronological summary alone, and the memory-aware approach. The comparison is a live evaluation of this application. The author states that it is not a benchmark of commercial CRM systems and does not establish a universal accuracy advantage for memory-aware designs.

The results were mixed. The memory-aware path showed the retrieval behaviors it was built for, but the run also surfaced structured-output variability, rate-limit pressure, prompt-size problems, and intermittent Hindsight failures. In one run, the summary-only baseline scored higher on the author’s checks. The author reports that run rather than leaving it out, and any summary of this comparison should keep that result.

Two limits matter for how much weight to give the account. First, it is the author’s own implementation report, and the article does not present independently reproduced testing. Second, the current status of the external services described and of any partner program has not been independently verified.

Questions to answer before you build a similar agent

  • Which distinct questions will users ask of the same account, and does each need its own retrieval path?
  • Are all sources normalized into one structure before retrieval, or does each source leak its own format into the prompt?
  • Where does deduplication and chunking happen relative to selection, and is there a hard cap before every model call?
  • Do dates, source identifiers, and participants survive into the evidence the model sees?
  • What happens when structured output fails validation, when the memory service is unavailable, and when a rate limit is hit?
  • Does your evaluation include degraded runs, and does it compare against a simple baseline that might win?

If the answers point toward several intents, a fixed budget, and explicit failure states, the design follows the author’s core argument: the memory store keeps the history, and each prompt receives only the evidence the task needs.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.