DEV Community

Harika Karankot
Harika Karankot

Posted on

I Built an AI Agent That Remembers Why Teams Decided

AI agents are good at answering questions, but one problem became obvious while building my project: answering a question today is not enough if the agent cannot remember why a decision was made yesterday.

That led me to build DECISIA — an AI Decision Continuity Agent designed to preserve the reasoning behind meetings, decisions, preferences, responsibilities, deadlines, and commitments.

The central idea is simple:

A conversation should not disappear after the meeting ends.

Instead, important information should become persistent memory that an AI agent can recall when the same topic comes up later.

The Problem I Wanted to Solve

In team projects, decisions are often distributed across meetings, chats, documents, and follow-up conversations.

For example, imagine a team discussing a website interface.

During one meeting, the client says:

"We want a clean light-blue and white interface. Please don't use a dark theme."

A few days later, someone asks:

"What interface did the client prefer?"

A normal chatbot may only know what is present in its current conversation.

That creates a continuity problem.

The important information existed, but the agent could not necessarily retrieve it when needed.

I wanted DECISIA to solve this by giving the agent persistent memory.

The architecture became:

User → Conversation → DECISIA → Hindsight RETAIN → Persistent Memory → Hindsight RECALL → Relevant Memories → AI Answer

The memory layer became the most important part of the system.

Why Hindsight Became Important

For DECISIA, I used Hindsight as the persistent memory layer.

Instead of treating every conversation as an isolated interaction, DECISIA stores information from conversations and later retrieves relevant memories when a user asks a question.

The two operations that matter most are RETAIN and RECALL.

RETAIN stores information:

def recall_memory(query: str):
url = f"{HINDSIGHT_URL}/v1/default/banks/{BANK_ID}/memories/recall"

payload = {
    "query": query
}

response = httpx.post(
    url,
    json=payload,
    timeout=120
)

response.raise_for_status()

return response.json()
Enter fullscreen mode Exit fullscreen mode

This changed the behavior of the application.

Instead of asking the LLM to remember everything itself, I created a separate memory layer that DECISIA could query when context was needed.

Building the Decision Intelligence Layer

Persistent memory alone was not enough.

I also wanted DECISIA to understand what was important inside a conversation.

So I added an extraction layer using an LLM.

The system extracts five categories:

Decisions
Preferences
Responsibilities
Deadlines
Commitments

For example, from a conversation such as:
"Sarah will prepare the UI prototype by October 2. The client wants a clean light interface and rejected the dark theme."

DECISIA can extract information such as:

{
"decisions": [
"Use a clean light interface"
],
"preferences": [
"Client prefers a light-blue and white interface",
"Client rejected the dark theme"
],
"responsibilities": [
"Sarah will prepare the UI prototype"
],
"deadlines": [
"October 2, 2026"
],
"commitments": [
"Sarah will prepare the UI prototype"
]
}

This structured information is stored separately so the application can maintain a decision-oriented history.

Connecting Memory With Reasoning

The interesting part happens when the user asks a question later.

DECISIA first sends the question to Hindsight.

For example:

"What did the client prefer for the interface?"

Hindsight retrieves relevant memories.

The application then passes the strongest relevant memories to the language model:
answer = generate_contextual_answer(
question=request.query,
memories=focused_memories
)

The model is instructed to answer using those retrieved memories rather than inventing information.

This creates a simple but important pattern:
Question → Recall → Evidence → Reasoning → Answer

The answer is therefore based on previous project context.

Before and After Persistent Memory

he difference becomes much clearer with a simple example.

Without Persistent Memory

User:

"What interface did the client prefer?"

Agent:

"I don't have enough information to determine the client's interface preference."

After Storing the Conversation

User:

"What interface did the client prefer?"

DECISIA:

"The client wants a clean, light interface—specifically a light-blue and white color scheme—and has rejected any dark theme."
The important change is not simply that the second answer is longer.
The important change is that the agent can use information from a previous interaction.
That is what decision continuity means in DECISIA.

Handling Retrieved Memories

One challenge I encountered was that semantic memory retrieval can return multiple memories describing the same underlying fact.

For example, a single preference may appear in several retrieved memories with slightly different wording.

Displaying all of them would make the interface noisy.

I therefore added a filtering layer that removes exact duplicate memory text before selecting the strongest evidence.

unique_memories = []
seen_memory_text = set()

for memory in memories:
memory_text = (
memory.get("text")
or memory.get("content")
or ""
).strip()

normalized_text = " ".join(
    memory_text.lower().split()
)

if normalized_text in seen_memory_text:
    continue

seen_memory_text.add(normalized_text)
unique_memories.append(memory)
Enter fullscreen mode Exit fullscreen mode

DECISIA then uses a focused set of memories as evidence for the final answer.

This also makes the user interface easier to understand because users can see that the answer came from retrieved project context without being overwhelmed by every stored memory.

The Technology Stack

The project uses several components working together:

React + Vite for the frontend
FastAPI for the backend API
Python for the backend logic
Groq for language-model reasoning
Hindsight for persistent memory
Supabase for structured decision intelligence
GitHub for source-code management

The frontend communicates with the FastAPI backend, while the backend coordinates the LLM, Hindsight, and Supabase.

The most important architectural decision was keeping persistent memory as a separate layer instead of treating the LLM's conversation context as the application's memory.

What I Learned

1. AI Memory Is Different From Conversation History
Saving a conversation is not the same as making an agent capable of using previous experience.
The useful part is retrieving relevant information at the right time.

2. Memory Needs Evidence
An AI answer becomes more useful when the system can connect it to previously stored context.
DECISIA therefore retrieves memories before generating its contextual answer.

3. More Memories Are Not Always Better
Retrieval can produce several memories representing similar information.
A useful memory system therefore also needs filtering and evidence selection.

4. Structured Information and Semantic Memory Complement Each Other
Hindsight provides the persistent memory layer, while the decision extraction layer organizes important information into decisions, preferences, responsibilities, deadlines, and commitments.
Using both gives DECISIA two different ways to understand project history.

5. The Real Value Appears Across Interactions
The most interesting behavior did not happen when DECISIA answered the first question.
It appeared when information from an earlier conversation became useful in a later interaction.
That is where persistent memory changed the behavior of the agent.
**
What DECISIA Is Becoming**

My goal with DECISIA is not to build another chatbot that simply answers questions.

I want it to act as a continuity layer for teams.

A team should be able to ask:

  • What did we decide?
  • What did the client reject?
  • Who was responsible for that task?
  • When was it supposed to be completed?
  • Did our latest decision conflict with something we decided earlier? The agent should be able to retrieve the relevant history and help the team continue from where it left off.

That is the idea behind DECISIA:
Never lose the reasoning behind a decision.

Persistent memory turns past conversations into usable context, and that context gives an AI agent the ability to maintain continuity across interactions.

Project
DECISIA — AI Decision Continuity Agent

GitHub: https://github.com/Harika255/DECISIA

Hindsight: https://github.com/vectorize-io/hindsight

Top comments (0)