Spots

How Hindsight Turned Audit History Into Agent Memory

The Problem: Compliance Teams Keep Relearning the Same Lessons Most compliance assistants can answer questions about a policy. The harder problem is answering, six months later, “What did the auditor reject last time, who owned the remediation, and is the evidence still valid?” I built this system around a simple idea: for compliance work, long-term memory is not a convenience feature; it is part of the system’s state. What I built The system is a conversational compliance assistant for a bank’s AI governance process. I wired an n8n workflow around an LLM agent and gave it a persistent compliance memory backed by Hindsight on GitHub. recall_memory searches the organization’s long-term audit history. reflect_on_history asks Hindsight to synthesize patterns across that history. retain_memory stores newly reported facts permanently.

There is also short-lived session memory, but I

There is also short-lived session memory, but I deliberately kept that separate from organizational memory. The session buffer is there to make a conversation coherent. Hindsight is where the durable facts live. The workflow then stores the completed conversation back into Hindsight as well. That last step matters more than it initially appears: an audit conversation can itself become evidence about a decision, an interpretation, or an auditor preference that needs to be available later. The basic flow looks like this: Chat message | v Hindsight Auditor agent | +--> recall_memory --------> Hindsight | +--> reflect_on_history ---> Hindsight | +--> retain_memory --------> Hindsight | v Answer | v Remember Conversation -------> Hindsight The repository also separates the interactive path from history ingestion.

In the completed system, that ingestion path is

In the completed system, that ingestion path is where I connect authoritative audit records, control tests, remediation systems, and approved evidence metadata rather than a hand-authored history. The important boundary is that the language model does not become the database. It is the reasoning layer sitting on top of persistent memory. The design decision that changed the project The first mistake I wanted to avoid was treating “memory” as a transcript. A transcript tells me what somebody said. Compliance needs something closer to a structured institutional memory: findings, owners, dates, remediation status, control tests, evidence requirements, and the history of what an auditor accepted or rejected.

That is why the agent’s instructions explicitly require

That is why the agent’s instructions explicitly require memory retrieval before answering questions about systems, audits, findings, remediations, evidence, auditors, owners, deadlines, or earlier conversations. ALWAYS call recall_memory ... before answering. When the user shares new information ... call retain_memory ...

News

How Hindsight Turned Audit History Into Agent Memory

The Problem: Compliance Teams Keep Relearning the Same Lessons Most compliance assistants can answer questions about a policy.

@spots #dev
Source: Dev.to
See more like this