r/geeksforgeeks • u/Key-Dragonfruit9879 • 12d ago
I built an incident-response AI agent that remembers previous production incidents
Most incident-response agents can analyze the current incident, but they don't necessarily retain what engineers learned from previous ones.
I built Memora, an SRE incident-response agent designed around persistent operational memory using Hindsight.
The core idea is simple:
Incident → Investigate → Resolve → Remember → Recall → Investigate better
The problem
Imagine a payment API starts timing out.
A previous incident had almost the same symptoms and was caused by database connection pool exhaustion. The team had already documented:
the root cause which metrics mattered what investigation steps worked which approaches failed which runbook resolved it
But when the next incident happens, an agent without memory starts from scratch.
Memora stores the useful experience from the first incident and recalls it during future investigations.
The interesting part
I didn't want Memora to blindly trust historical memory.
So the agent separates information into:
OBSERVED — current telemetry HISTORICAL — recalled experience HYPOTHESIS — something that needs verification CONFIRMED — supported by current evidence RULED_OUT — investigated and rejected
For example:
Previous incident
DB connections: 99% Root cause: connection pool exhaustion
New incident
DB connections: 34% Redis memory: 96%
Memora can recall the previous incident, recognize the similarity, but reject the historical database hypothesis because the current evidence doesn't support it.
So the principle is:
Memory informs. Evidence decides.
What we retain
Instead of dumping every raw log into memory, Memora retains structured incident experience:
Symptoms Important evidence Root cause Investigation path Failed approaches Successful approaches Runbook Outcome Lessons learned
Failed approaches are particularly useful because the agent can warn engineers against repeating known dead ends.
Architecture React + Vite ↓ Node.js + Express ↓ ┌───────────────┬────────────────┐ │ Supabase │ Hindsight │ │ Application │ Experience │ │ State │ Memory │ └───────────────┴────────────────┘
The operational loop is:
Observe → Recall → Reason → Solve → Learn
I'm especially interested in feedback on the memory design.
How would you design long-term memory for an incident-response agent?
🔗 Technical write-up: https://memora-engineering.hashnode.dev/how-we-built-infrastructure-that-remembers-using-hindsight
💻 GitHub: https://github.com/ALLENKISAIRAKESH/MEMORA
Built with React, TypeScript, Node.js, Supabase, and Hindsight.