Engineering

AI behavior with a logged human-authored reason for every decision

Memory Stack engineering team Memory Stack

The compliance question for AI in regulated environments isn't primarily "did the AI produce the right output." It's a different question: can you demonstrate what governed the AI's behavior, who authorized those rules, and when they were in effect?

This is the auditability requirement. It applies in financial services, healthcare, insurance, and increasingly in any regulated industry where AI is being used to make or assist in decisions with consequences for customers or third parties. And it's a requirement that most current AI deployments fail — not because the AI behaved incorrectly, but because the governance trail doesn't exist.


What "governed by" means

When an AI agent takes an action — dismisses a lead, escalates a claim, routes a support ticket, declines a request — that action was governed by something. Either it was governed by rules the AI derived from its training, rules embedded in the system prompt, or rules loaded from an explicit rule layer.

From an auditability perspective, these three options are not equivalent.

Training-derived behavior is effectively ungoverned — the rules are implicit in the model weights, not reviewable or controllable by the org.

System prompt-embedded rules are partially governed — the rules exist, but they may not be versioned, attributed, or accessible without reading the prompt, and there's typically no log of which version of the prompt was active for a given session.

Explicit rule layer with session citation is fully governed — the rules are versioned, attributed to the person who wrote them, and the session log shows which rules were loaded when. For any session, you can answer: what rules applied, who wrote them, and when were they in effect.


The audit trail Memory Stack produces

Every session that loads rules from Memory Stack generates a rule citation event: the rule ID, the memory ID it came from, the user account associated with the rule's creation, and the timestamp of the session.

For a session that resulted in a specific action, the audit path is:

  1. Session ID → rule citation log → list of rules that governed the session
  2. Rule ID → memory record → the text of the rule, its version history, and the person who wrote each version
  3. Memory ID → creation log → timestamp of when this rule became active

The answer to "what governed this AI's behavior on this date" is a lookup, not a reconstruction. No archaeology through prompt history. No interview with the engineer who wrote the system message two years ago.


Human-authored, not derived

The compliance question often has a specific sub-requirement: the rules must be human-authored and human-authorized. An AI agent that derives its own behavioral rules — from training, from prior sessions, from inference — may be behaving correctly, but its behavior isn't authorized by a human in any auditable sense.

In Memory Stack, every rule in the rule layer was written by a human. The author is attributed. The rule has a history of every update, each attributed to a human. No rule enters the active rule set without a human creating it.

This is the chain of authorization that compliance frameworks look for: a human made a decision about how the AI should behave, that decision was recorded, the AI loaded that decision, the session log shows it.


The regulated industry case

In financial services: an AI agent routing or scoring loan applications is operating under rules. Those rules must be explainable, not discriminatory, and traceable to human decisions about what the agent should consider. Rules embedded in a neural network aren't traceable. Rules logged as attributed memories with session citations are.

In healthcare: an AI agent triaging or summarizing clinical information is operating under protocols. Those protocols must reflect current clinical guidance, be updated when that guidance changes, and the update trail must be auditable. A memory layer with version history and session-level citation produces that trail.

In insurance: an AI agent assisting in claims processing is operating under policy rules. Those rules must reflect the actual policy, be consistent across similar claims, and be defensible if a claim is disputed. A governed rule layer with audit trail is the evidence base for that defense.

These aren't theoretical requirements. They're the questions compliance teams, regulators, and litigants actually ask.


Rules survive the people who wrote them

One compliance failure mode that the rule layer addresses: rules that were written by people who have since left, whose reasoning is unknown, and whose interpretation of the rule might have differed from the org's current intent.

Every Memory Stack rule carries its attribution and history. If a rule was written by someone who left, the rule still exists, the history of why it was written (if the author included reasoning) is still there, and the decision to keep or retire it is an explicit organizational choice — not an implicit one made by leaving the rule in place.

The compliance posture for "we have AI behavioral rules from 2023 that nobody has reviewed" is weaker than "we have AI behavioral rules that are reviewed on a cadence, with the review history attached." The Stale Shelf mechanism supports the latter: rules that haven't been reviewed in a configurable period surface for review automatically.


The honest version

A rule citation log shows what rules were loaded for a session. It doesn't guarantee that the AI followed them precisely in every output. Compliance auditability and output correctness are related but separate claims. The rule layer closes the governance trail gap; output review closes the output correctness gap.

For highly regulated use cases, both are necessary. The rule layer is the governance evidence; the review process is the quality evidence. Neither substitutes for the other.


The auditability requirement for AI isn't unique to regulated industries — it's becoming a baseline expectation for any organization that operates AI with external-facing consequences. The infrastructure to meet it exists. The question is whether it's in the stack before the audit, or assembled after.

Give your AI tools persistent memory

Memory Stack gives every AI tool you use — Claude, Cursor, ChatGPT — access to the same shared context. No download, no key paste, no config file.

Start for free →