Hindsight Digital Intelligence A developer built Deal Intelligence Agent, a FastAPI service that uses Hindsight Cloud as a persistent memory engine and Groq's openai/gpt-oss-120b to generate per-deal sales briefings and cross-deal objection-resolution patterns. The implementation tags every retained item with a deal_id in content, tags, and metadata, using only the tag for scoped recall while deliberately leaving the filter off for global pattern detection. The project separates memory retrieval from answer generation so that scoping decisions live in application code rather than prompt conventions. A sales briefing can be wrong while every sentence in it is individually true: the CFO’s objection from one account gets attached to another account, and a rep walks into the call with someone else’s pricing history. In this project, one field— deal id —is the difference between useful recall and a confident account mix-up. I built Deal Intelligence Agent as a FastAPI service with three useful API paths. POST /deals/{deal id}/log retains a call, email, or meeting note in Hindsight Cloud and appends a local copy. GET /deals/{deal id}/brief recalls one deal’s history and asks Groq’s openai/gpt-oss-120b to produce a structured briefing. GET /patterns performs a global recall and asks Groq to find one recurring objection-resolution pattern across deals. The web UI is vanilla HTML, CSS, and JavaScript; deals.json supplies deal names and metadata for local inspection. The division of labor matters. Hindsight Cloud is the persistent memory engine, using retain, recall, and its TEMPR retrieval strategy. It is not the final answer generator. The application decides what scope to search, passes the retrieved text to Groq, and returns a response. That makes the application code—not an invisible prompt convention—the place where the most important boundary is expressed. A single shared memory bank is convenient for cross-deal analysis, but dangerous for a deal briefing. The same bank can contain every account’s notes, so every stored item is tagged with its deal identifier. On retain, I put the identifier in three places: in the human-readable content prefix, in the Hindsight tags, and in metadata. Only the tags are used by this implementation to filter recall; the other two carry useful context and traceability. The request path is intentionally boring: the browser calls FastAPI, FastAPI chooses the memory scope, Hindsight Cloud retains or recalls, and Groq turns recalled text into a briefing or playbook rule. The local JSON store only supplies deal metadata and an inspection-friendly copy of logs. flowchart TD UI "Web UI