DEV Community

Ram Pawar
Ram Pawar

Posted on

Never Ask: Why Did We Do This?

Most AI agents can remember what happened.

The harder problem is remembering why a decision was made — and knowing when the assumptions behind that decision are no longer true.

That was the problem we wanted to explore with DecisionPrint.

Instead of building another chatbot that retrieves old documents and generates a summary, we built a decision engine around Hindsight agent memory that exposes changing constraints, historical precedent, evidence, and outcomes.

The goal was simple:

Turn organizational memory from a pile of documents into something an engineer can actually reason with.

The problem with traditional agent memory

Imagine an engineer asks:

“Should Project Nova use Kafka for event streaming?”

A conventional RAG system might retrieve an old architecture decision:

“Kafka was rejected. RabbitMQ was selected.”

That answer is technically correct.

But it may also be completely wrong for today's system.

In our example, the original decision was made when:

  • consumer_count = 2
  • replay_required = false

The current project has:

  • consumer_count = 15
  • replay_required = true

The important information isn't simply the old answer.

It's the change in premises.

That's where Hindsight became particularly useful.

1. Show the delta, not just the answer

We designed the core Ask interface around a simple comparison:

Then

RabbitMQ was selected because the original constraints didn't justify Kafka.

Now

The system displays the current constraints alongside the historical ones.

Instead of:

Kafka was previously rejected.
Enter fullscreen mode Exit fullscreen mode

the engineer gets something closer to:

consumer_count:   2  → 15
replay_required:  false → true
Enter fullscreen mode Exit fullscreen mode

The agent's memory therefore becomes actionable.

The system isn't just recalling a decision.

It's helping determine whether the reasoning behind that decision still holds.

2. Make memory auditable

AI-generated explanations are easy to distrust.

So every decision card and claim in DecisionPrint has a source reference.

Clicking the reference opens the underlying evidence directly, including the original architectural excerpt and its recorded date.

For example, the UI can surface the original reasoning:

“consumer_count=2, ops team small, no replay needed”

This matters because Hindsight's recall isn't presented as mysterious model-generated context.

The user can inspect the evidence behind it.

3. Connect decisions to outcomes

Another useful property of organizational memory is that decisions don't exist in isolation.

We built an Outcome Chain view that connects:

Decision
   ↓
Implementation
   ↓
System change
   ↓
Incident
   ↓
Postmortem
Enter fullscreen mode Exit fullscreen mode

One example traces the decision to remove automated database backups through the eventual database corruption and postmortem.

The interface exposes the causal relationship and lets the engineer open the underlying postmortem evidence.

That changes the question from:

“What did we decide?”

to:

“What happened because we decided that?”

4. Memory should change agent behavior

This was probably the most important design principle.

Without meaningful memory:

Question → Retrieve documents → Generate answer
Enter fullscreen mode Exit fullscreen mode

With temporal decision memory:

Question
   ↓
Retrieve precedent
   ↓
Recover original constraints
   ↓
Compare with current constraints
   ↓
Detect premise drift
   ↓
Surface supporting evidence
   ↓
Reconsider the decision
Enter fullscreen mode Exit fullscreen mode

That's a fundamentally different interaction.

The memory isn't there just to make the prompt longer.

It changes what the agent considers relevant.

5. Keep the memory layer independent

The frontend never talks directly to vector indices or LLM prompts.

Instead, DecisionPrint communicates through a typed FacadeProtocol.

That means the UI can run against a deterministic local backend or a live Hindsight-backed memory engine without changing the presentation layer.

This separation also made the system much easier to reason about.

The UI asks for decisions, evidence, timelines, and outcomes.

The memory system handles how those things are retained and recalled.

6. Lightweight visualization is often enough

The application is built with Streamlit, but we deliberately avoided pulling in heavy JavaScript visualization libraries.

Instead, we generated SVG primitives directly in Python for:

  • drift gauges
  • progress rings
  • sparklines
  • timeline tracks

For example, the premise-drift gauge can surface a high drift score and flag that a historical decision deserves reconsideration.

The result is lightweight, fast, and easy to inspect.

7. Treat permissions as part of the interface

Memory systems can contain sensitive organizational information.

So access control can't just be a backend concern.

DecisionPrint handles typed ScopeError responses at the UI boundary and converts them into explicit access states instead of crashing the application.

That makes permission boundaries visible without leaking the underlying data.

What I learned

The interesting part of agent memory isn't simply making an LLM remember more facts.

It's giving the agent access to context that has structure over time.

A useful organizational memory system should let an engineer answer:

  • What did we decide?
  • Why did we decide it?
  • What assumptions supported that decision?
  • Which assumptions have changed?
  • What evidence supports the original reasoning?
  • What happened after the decision?

That's why we chose Hindsight agent memory for DecisionPrint.

It gave us a foundation for representing memory as something that evolves rather than a static collection of retrieved text.

The end result is a UI that turns historical engineering artifacts into an active decision system:

remember the decision → expose the reasoning → detect premise drift → inspect the evidence → reconsider when necessary.

That's a much more interesting direction for agent memory than simply giving an LLM a longer context window.

Output Screens:

Top comments (1)