DEV Community

Anees
Anees

Posted on

Compass Ai

URL:https://compass-ai-new-813l.vercel.app
How COMPASS AI Uses Hindsight for Competitive Memory

Most AI applications are good at answering questions about what they know right now.

Competitive intelligence requires something different.

When a competitor changes its pricing, launches a product, announces a partnership, or changes its technology strategy, the interesting question is rarely just what happened?

It is:

Has this happened before? What happened around it? Is there a pattern? And what does the historical context tell us about the current event?

That is the problem we designed COMPASS AI to solve.

COMPASS AI stands for Competitive Monitoring, Pattern Analysis & Strategic Signal System. It is an AI-powered competitive intelligence system designed to research current events, retain meaningful historical information, connect related events, detect changes over time, and generate evidence-backed strategic intelligence.

The key part of that architecture is persistent memory.

We use Hindsight as the long-term memory layer for the AI agents.

The problem with a stateless AI analyst

Imagine asking an AI analyst:

"What changed at a competitor recently?"

A conventional AI system can research the latest information and summarize it.

But competitive intelligence usually requires another layer of reasoning:

Has the competitor made similar changes before?
What happened before the latest product launch?
Have pricing changes followed a recurring pattern?
Are several events connected?
Does the current event represent a larger strategic shift?

Those questions depend on historical context.

Simply giving a model more information in its current context is not the same as giving an agent persistent memory.

We therefore designed COMPASS AI around the idea that current research and historical memory should work together.

Designing COMPASS AI around persistent memory

COMPASS AI uses multiple specialized agents rather than treating the application as a generic chatbot:

Research Agent — researches current competitive information.
Competitor Analysis Agent — analyzes competitor activity.
Signal Detection Agent — identifies changes, patterns, and strategic signals.
Historical Memory Agent — retrieves and works with historical context.
Strategic Insight Agent — combines current evidence and historical information into an intelligence report.

The application itself is built using Next.js, TypeScript, Tailwind CSS, shadcn/ui, Recharts, and Framer Motion.

The AI layer uses OpenAI for agent orchestration and current web research. Supabase PostgreSQL handles application data, while Hindsight provides persistent long-term memory.

The important architectural decision was to give memory its own responsibility.

The database can store structured application data such as competitors, events, sources, signals, reports, watchlists, and research runs.

Hindsight handles the historical memory that the agents need when reasoning across events and time.

From current research to persistent memory

When a user enters a company, competitor, industry, or research question, the Research Agent starts by gathering current information.

The research workflow looks for events such as:

Product launches
Pricing changes
Partnerships
Acquisitions
Funding
Technology changes
Hiring trends
Marketing campaigns
Feature releases
Customer sentiment
Regulatory events

Each important finding is structured with information such as the company, event, date, category, source, confidence, evidence, impact, entities, and relationships.

The important part is what happens after the research.

Meaningful long-term competitive facts are sent to Hindsight using RETAIN.

Instead of allowing useful information to disappear when the current interaction ends, the system gives the information a persistent place in the agent's memory.

Conceptually, the workflow becomes:

Current Research
↓
Structured Event
↓
Hindsight RETAIN
↓
Persistent Competitive Memory
The actual Hindsight integration

I am deliberately not fabricating this implementation because the actual repository code is what should appear in the published technical article.

RECALL: bringing history back into the conversation

Retaining information is only useful if the agent can retrieve it later.

Before generating new intelligence, COMPASS AI uses Hindsight RECALL to retrieve historical context relevant to the current question.

For example, a question about pricing can retrieve previous pricing changes.

A question about product launches can retrieve similar historical launches.

A broader strategic question can retrieve relationships between companies, previous conclusions, and historical competitive behavior.

The workflow becomes:

Current Question
↓
Current Research
↓
Hindsight RECALL
↓
Historical Context
↓
Agent Reasoning
↓
Strategic Intelligence

This changes the role of the language model.

The model doesn't have to be responsible for remembering an entire competitive history by itself.

Instead, persistent memory becomes an external capability that the agent can query when it needs historical context.

Going beyond retrieval with REFLECT

Some questions require more than retrieving individual memories.

For example:

"What patterns emerge when the current events are compared with historical competitive behavior?"

This is where Hindsight REFLECT becomes relevant.

The purpose is to reason over the retrieved historical context and identify relationships or patterns that may not be obvious from a single event.

A COMPASS AI insight can therefore be structured around:

CURRENT EVENT
+
HISTORICAL MEMORY
+
PATTERN
+
INTERPRETATION
+
SOURCE EVIDENCE

This structure is important because the system should not turn an unsupported guess into a strategic recommendation.

The underlying evidence remains part of the intelligence workflow.

Making historical memory visible

We also wanted memory to be understandable from the product interface rather than hiding everything behind an AI chat window.

The Historical Competitive Timeline provides a chronological reconstruction of competitive events.

Events can be organized into categories such as:

Pricing
Product launches
Partnerships
Technology

Users can inspect individual events and their associated source information.

The Memory Graph provides another view of the same idea.

It represents relationships between companies, products, events, markets, technologies, and other entities.

The objective is to make relationships between competitive events easier to explore.

Instead of seeing competitive activity as a collection of unrelated records, the system can represent it as connected historical information.

The AI Competitive Analyst

The conversational analyst sits on top of the research and memory infrastructure.

Rather than offering generic chatbot prompts, the interface is designed around questions that require competitive context.

For example:

What changed at Microsoft this month?

How has Google changed its AI pricing
over the last 6 months?

Find recurring patterns in competitor
product launches.

What happened before the last three
pricing changes?

Connect current events with historical
competitor behavior.

These questions require both current and historical information.

The agent can use current research to understand what is happening now and Hindsight memory to understand how that event relates to what happened previously.

That combination is the core of COMPASS AI.

Evidence needs to remain traceable

Competitive intelligence becomes difficult to trust when an AI produces a confident answer without showing where the information came from.

COMPASS AI therefore treats evidence as part of the intelligence itself.

Important factual findings include:

Source
Published date
Event date
Evidence
Confidence

The interface also provides a source panel so users can inspect the underlying evidence.

When sources conflict, the system is designed to surface the conflict rather than silently choosing one version.

The goal is not simply to generate an answer that sounds convincing.

The goal is to make the reasoning traceable back to evidence.

Before and after persistent memory

The architectural difference can be summarized simply.

Without persistent memory:

Question
↓
Current Context
↓
AI Response

With COMPASS AI's memory workflow:

Question
↓
Current Research
↓
Hindsight Memory
↓
Historical Context
↓
Pattern Detection
↓
Evidence-backed Insight

The difference is particularly important for questions involving change over time.

A single pricing event is an event.

Several pricing events connected with product launches, competitor movements, and other historical activity can reveal a pattern.

That is the level of analysis COMPASS AI is designed to support.

What we learned

  1. Memory should be treated as an architectural capability

Persistent memory works differently from simply putting more information into an LLM prompt.

The system needs mechanisms for retaining useful information and retrieving it when future questions require it.

Hindsight gives the agent a dedicated memory layer for that purpose.

  1. Temporal questions benefit from persistent memory

Competitive intelligence naturally produces questions involving:

What changed?
What happened before?
Has this happened previously?
Is this recurring?
What relationships exist between these events?

Those questions make historical memory particularly valuable.

  1. Retrieval needs meaningful information behind it

Storing everything is not necessarily useful.

The system needs to retain meaningful competitive facts and associate them with companies, events, categories, entities, sources, and relationships.

Otherwise, historical memory can become difficult to use effectively.

  1. Evidence should stay connected to the insight

An intelligence report becomes much more useful when an analyst can move from the conclusion back to the supporting source.

Keeping source and confidence information alongside events helps maintain that connection.

  1. Memory does not replace research quality

Persistent memory cannot compensate for poor source quality or incomplete information.

Current research still needs validation, event deduplication, confidence handling, and conflict detection.

Hindsight extends the agent's context; it does not remove the need for reliable information.

Building an AI analyst that remembers

The central idea behind COMPASS AI is simple:

Competitive intelligence is historical.

Understanding what is happening now often requires understanding what happened before.

By combining current web research, specialized AI agents, persistent Hindsight memory, temporal analysis, and evidence-backed reporting, COMPASS AI is designed to connect those two dimensions.

Hindsight provides the long-term memory layer.

The agents provide research, retrieval, analysis, and reasoning.

The interface turns those capabilities into timelines, memory graphs, signals, reports, and conversational intelligence.

The result is an AI competitive intelligence system designed not merely to answer the latest question, but to use what happened before when reasoning about what is happening now.



Top comments (0)